import Adafruit_BBIO.GPIO as GPIO
import time
GPIO.setup("P9_19", GPIO.OUT)
while True:
GPIO.output("P9_19", GPIO.HIGH)
time.sleep(0.5)
GPIO.output("P9_19", GPIO.LOW)
time.sleep(0.5)
When I got my new bbgw I ran an internet search to find how to use the relay and did not find an easy answer, so here goes:
1. The Grove - SPDT Relay(30A) - uses +5V , so you need to solder the third pin of that groove connector. Disconnect it from the board, and connect it to the input 5v power.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAC%3D1GgFMYszu7ETm7KWi6UvcvzRZFXE5Z2dsy3Bt2wf2tB2ROA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
The groove connector pinout are:
J4 marked as I2C
1- I2C2_SCL - P9_19
2- I2C2_SDA - P9_20
3- VDD 3.3
4- GND
J5 - marked as UART
1- UART2_RXD - P9_22
2- UART2_TXD - P9_21
3- VDD 3.3
4- GND
The pinout of the relay is:
1- Signal
2- not connected
3- +5V
4- GND
If you connect the relay to J4 use this python code, to toggle it on and offimport Adafruit_BBIO.GPIO as GPIO
import time
GPIO.setup("P9_19", GPIO.OUT)
while True:
GPIO.output("P9_19", GPIO.HIGH)
time.sleep(0.5)
GPIO.output("P9_19", GPIO.LOW)
time.sleep(0.5)
The relay kit from seeed, has a buffer transistor and a protection diode. So if you use +5V the relay will turn on.