4. Please describe the bug / issue. Attaching any relevant screenshots would be very helpful! Thanks in advance.
I have a simple switch (old PC power switch) plugged into 15 (GPIO22) and 17 (3.3 volt), with the GPIO set to IN. Once I press the button it keeps toggling between HI and LOW every few seconds.
LOW…
…then HIGH…
…then LOW…
…and so on…
Not sure if I need a resistor or capacitor, or a programming issue - but from memory I had done this previously just with WebIOPi.
The webiopi logs don’t show anything. Is there another log that the GPIO activity is logged? I have looked through the webiopi config and its just all pretty standard stuff. I did switch another GPIO connected to a relay, but it didn’t amend the log at all!
2016-03-22 20:31:48 - WebIOPi - INFO - Starting WebIOPi/0.7.16/Python3.4
2016-03-22 20:31:48 - WebIOPi - INFO - GPIO - Native mapped to REST API /GPIO
2016-03-22 20:31:48 - WebIOPi - INFO - Loading configuration from /etc/webiopi/config
2016-03-22 20:31:48 - WebIOPi - INFO - Temperature - DS18B20(slave=28-000003e9b620) mapped to REST API /devices/000003e9b620
2016-03-22 20:31:48 - WebIOPi - INFO - DigitalActuator - RelaySwitch mapped to REST API /devices/J1nDKuvDLv7xqHEs
2016-03-22 20:31:48 - WebIOPi - INFO - DigitalActuator - ValveSwitch mapped to REST API /devices/wIuurxHFHwxvnEML
2016-03-22 20:31:48 - WebIOPi - INFO - DigitalActuator - RelaySwitch mapped to REST API /devices/xMIJzssoKnqwII0x
2016-03-22 20:31:48 - WebIOPi - INFO - Access protected using /etc/webiopi/passwd
2016-03-22 20:31:48 - WebIOPi - INFO - HTTP Server binded on http://192.168.100.239:8000/
2016-03-22 20:32:07 - WebIOPi - INFO - Stopping…
2016-03-22 20:32:07 - WebIOPi - INFO - HTTP Server stopped
2016-03-22 20:32:34 - WebIOPi - INFO - Starting WebIOPi/0.7.16/Python3.4
2016-03-22 20:32:34 - WebIOPi - INFO - GPIO - Native mapped to REST API /GPIO
2016-03-22 20:32:34 - WebIOPi - INFO - Loading configuration from /etc/webiopi/config
2016-03-22 20:32:34 - WebIOPi - INFO - Temperature - DS18B20(slave=28-000003e9b620) mapped to REST API /devices/000003e9b620
2016-03-22 20:32:35 - WebIOPi - INFO - DigitalActuator - RelaySwitch mapped to REST API /devices/J1nDKuvDLv7xqHEs
2016-03-22 20:32:35 - WebIOPi - INFO - DigitalActuator - ValveSwitch mapped to REST API /devices/wIuurxHFHwxvnEML
2016-03-22 20:32:35 - WebIOPi - INFO - DigitalActuator - RelaySwitch mapped to REST API /devices/xMIJzssoKnqwII0x
2016-03-22 20:32:35 - WebIOPi - INFO - Access protected using /etc/webiopi/passwd
2016-03-22 20:32:35 - WebIOPi - INFO - HTTP Server binded on http://192.168.100.239:8000/
“If you have no pull-up or pull-down resistors attached to an input port, its status is not clearly defined. It is “floating”. It is susceptible to random electromagnetic radiation or static from you, from any devices near or far and from the environment. Any wires attached to the GPIO ports act as antennae for this radiation (it’s mostly radio waves).”
so- tell me- can Cayenne tell the remote device to use the internal pull-up resistors, or shall I use an external SIP resistor pack as pullups?
My current issue:
the internal GPIO INPUT pull-up.
I gotta know-
it’s kind of important to me.
I can design either way, but I gotta know now.
can Cayenne tell the remote Pi unit to use GPIO pull-up?
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP) # Cat5 Orange
GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP) # Cat5 Blue
GPIO.setup(22, GPIO.IN, pull_up_down=GPIO.PUD_UP) # Cat5 Green
GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_UP) # Cat5 Brown