https://w.electrodragon.com/w/index.php?title=Raspberry_Pi_Relay&feed=atom&action=historyRaspberry Pi Relay - Revision history2024-03-28T21:18:26ZRevision history for this page on the wikiMediaWiki 1.37.2https://w.electrodragon.com/w/index.php?title=Raspberry_Pi_Relay&diff=20067&oldid=prevChao at 08:15, 5 July 20182018-07-05T08:15:13Z<p></p>
<p><b>New page</b></p><div>== How to use ==<br />
* Make sure your RPI has IIC installed, see [[RPI_Hardware]] IIC section<br />
* Plug the board on RPI 26P connector directly<br />
* Test the board by running following command: for MCP23008, default IIC address is 0x20, you can see the image on [[RPI]] page.<br />
sudo i2cdetect -y 1<br />
* Copy code: Make a new py file, paste the following code and chmod it for excute right<br />
nano relay.py<br />
chmod +x relay.py<br />
* If the demo code can not run properly, change the line value 5,8 to 1,4 at "for x in range(5,8):"<br />
* Relay and relevant LEDs will on and off in turns when running this demo code<br />
<br />
* [https://github.com/Edragon/RPI Demo code please find here. you know which folder.]<br />
<br />
<br />
== Schematic ==<br />
[[File:RPI relay shield.png|thumbnail]]<br />
* See shematic on the right<br />
<br />
== Jumpers and Toggle switch ==<br />
* Left jumper to select VCC on either 5V or 3v3, please keep it at 5V for relay use.<br />
* Right jumper for CD pins of ULN2803, keep it on as default.<br />
* Toggle switch from top to bottom are A2, A1, A0 and NC.<br />
<br />
[[category: RPI Hardware]]</div>Chao