It’s possible to draw multiple components of different kinds on the MicroView screen at once.
In this blog, the three inputs to an RGB LED are controlled using pulse width modulation (PWM) signals. The three sliders are set up with simple labels ‘R’, ‘G’ or ‘B’ to the left. Each colour is raised to full brightness, then dimmed in sequence. The sliders show this graphically and display the current PWM value from 0-256 in real time.
Pins referenced in code as 3, 5 and 6 (numerical pins 12 to 14) are capable of PWM on the MicroView. These are connected to the LED via 330 ohm resistors in the usual way, with the COMMON of the LED connected to pin 8 (GND).
I have just received the MicroView Education kit, the result of a Kickstarter project by the team at Geek Ammo and I’m pretty impressed.
The hardware is distributed by Sparkfun and essentially comprises the MicroView with the accessories normally included in the (Arduino) Sparkfun Inventors Kit. There are many tutorials and books that use these components and as the MicroView has the same functionality as the Arduino Uno, they can all be used.
This project series is a means by which I am testing out the various ways of blogging similar projects easily. So they are not designed to be instructional as such, more a testbed. Having said that, if they are useful, feel free to use them and have fun!
What the Project Does:
We are going to make 5 LEDs turn on and off, one after the other.
What are we Learning?
How to write a simple Arduino sketch, with comments
How to allocate input/output pins and set them high or low.
How to connect LEDs correctly to the Arduino board.