Jump to content
Arduino.lk Community Sri Lanka
  • Announcements

    • Team Arduino.lk

      Arduino Stater Kit 2 එකක් දිනාගන්න.   11/13/2017

      arduino.lk community වෙත ඔබව සාදරයෙන් පිළිගනිමු. ඔබගේ ගැටළු අදහස් මෙහි පළකර Rs 3650.00 වටිනා Arduino Stater Kit 2 එකක් දිනාගන්න. ඔබ කල යුත්තේ Arduino, හා සම්බන්ධ අදහස්, ලිපි, කමෙන්ට් මෙහි පල කර මෙහි ඇති LeaderBoard එකේ පළමු තැනට පැමිණීමයි. සැම මාසකම අවසාන දින 11.55 PM හොදම Contributor තෝරනු ලැබේ
    • Team Arduino.lk

      Arduino Uno r3 දැන් Rs 950.00 යි.   11/13/2017

      Arduino Uno r3 දැන් Rs 950.00 යි. ගෙදරටම ගෙන්වා ගන්න දැන්ම පිවිසෙන්න https://shop.arduino.lk

Search the Community

Showing results for tags 'raspberry pi'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Genaral
    • Welcome
    • News
  • Arduino
    • Installation & Troubleshooting
    • Programming in Arduino
    • General electronics
    • Microcontrollers
    • LEDs and Multiplexing
    • Displays
    • Motors, Mechanics and Power
    • Sensors
    • Network Protocols and Devices
    • Storage
    • Construction
    • Documentation
  • Other
    • Tutorials
    • Arduino Projects
    • Off-Topic
    • Jobs / Job offers
  • NSBM Arduino Club's Topics
  • STEM education of srilanka's Stem srilanka
  • CSNE Ardunio (Atmel Studio)'s Atmel Studio

Calendars

  • Community Calendar

Blogs

There are no results to display.

There are no results to display.

Categories

  • Files
  • eBooks
  • Datasheets
  • Library
    • Sensor
    • Modules
    • Shields

Categories

  • Articles

Categories

  • Lessons
  • Tutorials

Found 1 result

  1. If you want to switch things like lights with your Raspberry Pi, you need a relay board. A relay is an electronic switch that can be switched with a low-voltage signal. Exactly what the Raspberry Pi offers as GPIO pins. The relay board I’ve found is ideal for the Raspberry Pi. It has 8 relays and every relay can separately be switched with the Raspberry Pi because it has 8 GPIO pins. Also, the voltage needed to switch the relays is 5V, this can be taken directly from the RPi. This is why you don’t need any additional electronics. Hardware You need the following things. I’ve bought these on arduino.lk, but they’re widely available. 5V 8 channel relay board Female to female jumper cables Raspberry Pi Pin scheme WiringPi uses its own pin numbering system. The scheme below connects relay 1 to WiringPi number 0, relay 2 to number 1, etc. See this page to find the right pins on the Raspberry Pi. Pin on RPi Pin on relay board WiringPi number 5V power VCC GND GND GPIO17 INS1 0 GPIO18 INS2 1 GPIO27 INS3 2 GPIO22 INS4 3 GPIO23 INS5 4 GPIO24 INS6 5 GPIO25 INS7 6 GPIO4 INS8 7 (This scheme is based on a revision 2 Raspberry Pi) Software I’m using WiringPi as library to control the connected relay board. WiringPi is widely supported for popular languages like NodeJS, PHP, Python, etc. Install WiringPi Set every pin on OUT mode 1 2 3 4 5 6 7 8 gpio mode 0 out gpio mode 1 out gpio mode 2 out gpio mode 3 out gpio mode 4 out gpio mode 5 out gpio mode 6 out gpio mode 7 out Write 0/1 to the ‘WiringPi number’ from the pin scheme to test the relays 1 2 3 4 gpio write 0 0 gpio write 0 1 gpio write 1 0 gpio write 1 1 Now startup your IDE and build something awesome to control the electronics connected to the relay board!
×