This is a red-green brick component specially design for the Arduino board. You can light it red, green, or any color combination of the two.
Using it with Arduino
It connects with three wires to Arduino ( GND for power, IN1 and IN2 for the input signal).
The GND pin on the brick should be connected to the GND pin on the Arduino board, and the IN1 and IN2 pins on the brick should be connected to two pwm pins on the Arduino board.
The LED light intensity is controlled by the Arduino board using 2 PWM ports.
By modifying the two PWM signals frequency you can obtain any color combination between red and green.
Using it with Raspberry PI
Connect the IN1 and IN2 led pins to any of the digital ports for the Raspberry PI board (marked yellow in the above picture). Connect the GND led pin to a Ground Raspberry PI port (marked black in the above picture) – or use a breaboard to get more ground ports.
Source code (Phyton) is below.
#!/usr/bin/env python import time import os import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(4, GPIO.OUT) GPIO.setup(17, GPIO.OUT) while True: GPIO.output(4, True) time.sleep(0.5) GPIO.output(4, False) time.sleep(0.5) GPIO.output(17, True) time.sleep(0.5) GPIO.output(17, False) time.sleep(0.5)
Returns and Exchanges
There are a few important things to keep in mind when returning a product you purchased.You can return unwanted items by post within 7 working days of receipt of your goods.
- You have 14 calendar days to return an item from the date you received it.
- Only items that have been purchased directly from Us.
- Please ensure that the item you are returning is repackaged with all elements.
Ship your item back to Us
Firstly Print and return this Returns Form to:
30 South Park Avenue, San Francisco, CA 94108, USA
Please remember to ensure that the item you are returning is repackaged with all elements.
For more information, view our full Returns and Exchanges information.