Timeline for Am I using the Correct GPIO Pins?
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 25, 2016 at 17:14 | comment | added | Eugene Tian | ^that code doesnt go in the while loop right or the if statement? It is indented back to the beginning? | |
Jul 23, 2016 at 9:50 | comment | added | KennetRunner | In the top Pi code, after you have printed "hello" introduce a short delay then set GPIO pin 21 back to False... | |
Jul 22, 2016 at 21:24 | comment | added | Eugene Tian | OK so both pis work. However, I want to loop the code. but only the top pi does that. I want to press the button and it displays 'hello' then when I press it again it says hello again on both pis. So far, I have to restart both pis for the button to display hello. Can someone help? | |
Jul 22, 2016 at 20:41 | comment | added | KennetRunner | That looks correct. | |
Jul 22, 2016 at 19:07 | comment | added | KennetRunner | The GPIO pin 21 on the bottom Pi need to be set as an INPUT, because it is 'listening' for the top Pi to change from HIGH to LOW. When the top Pi does this it pulls the bottom Pis GPIO pin 21 to ground so GPIO.input(21) == 0 and the bottom Pi does it's stuff. Do NOT set the bottom Pi GPIO pin 21 as OUTPUT - you will have both GPIO pins driving one another in conflict... | |
Jul 22, 2016 at 18:23 | comment | added | Eugene Tian | Can you explain how the top and bottom pi communicate with ur code above? I tried it yesterday and the button responded to both pis yay! But today I tried it again, im not sure if i changed something but it is not working again. | |
Jul 22, 2016 at 18:22 | comment | added | Eugene Tian | So the bottom Pi does not need the code: GPIO.setup(21, GPIO.OUT, initial=1)? | |
Jul 21, 2016 at 22:38 | history | answered | KennetRunner | CC BY-SA 3.0 |