Software | Arduino

Quick navigation:


General information: Arduino Uno Jump to top of page

Websites

Starterkits


General information: Arduino and Electronics Guidebooks, Component Datasheets Jump to top of page

Tools: Fritzing Jump to top of page

Custom Libraries: Siemens DL1414T Jump to top of page

The DL1414T is a .112" red, 4-character 16 segment plus decimal alphanumeric intelligent display with memory/decoder/driver.

Its Arduino Uno implementation uses 7 data input pins (0 to 6), 2 pins for digit selection (7 and 8) and 1 pin for writing (9). The library provides functions for setting individual digits (both as complete characters, or their individual bits), showing a string, integer, and float, as well as ticker-taping a longer string.

  • Class methods:
    • void setDigitRaw(int digit, boolean bit6, boolean bit5, boolean bit4, boolean bit3, boolean bit2, boolean bit1, boolean bit0);
    • void setDigit(int digit, char character);
    • void clearDigits();
    • void showStr4(char c3, char c2, char c1, char c0);
    • void showStr4(String s);
    • void showInt(int i);
    • void showFloat(float f);
    • void ticker(String s);



Projects: Resistor Man Jump to top of page






Projects: MOSFETs Jump to top of page

MOSFETs are metal-oxide-semiconductor field-effect transistors used for amplifying or switching electronic signals. The following two photographs show examples of a MOSFET connected to the Arduino Uno R3. Each time a pushbutton drives a yellow LED. In the first case we use a simple setup, whereas in the second one we use a more complex setup involving a capacitor.











Projects: Arduino in Action: Reactometer Jump to top of page

The ReactoMeter measures your reaction time. When activated, the red LED initially shines. Once it goes out and the green LED turns on (start indicator), press the push button as fast as possible. In between, the yellow LED sequence lights up. Your reaction time is measured and reported via the serial connection.

Arduino sketch




Projects: Potentio Meter Jump to top of page

The potentio meter controls two actuators: the red-yellow-green LEDs, as well as the pitch of the speaker. The LEDs are grouped per thirds of the potentio meter's full range.

Arduino sketch




Projects: LED Cycler Jump to top of page

The LED cycler traces a sequence of two adjacent LEDs from left to right and back, like a Cylon's eye. If the push button is pressed, the cycler changes its operational mode and mimicks a voice VU meter, randomly expanding LEDs from the centre on. The potentio meter controls the speed of cycling for both operational modes.

Arduino sketch

Demonstration (AVI, 35.09 MiB)




Projects: Light-Controlled Theremin Jump to top of page

When activated, the yellow LED is turned on for 5 seconds, during which you should move your hand back and forth over the light-dependent resistor (LDR). When the yellow LED goes out, the pitch of the speaker is controlled by the amount of light received by the LDR.

Arduino sketch

Demonstration (MP4, 32.27 MiB)




Projects: Morse Code Generator Jump to top of page

When activated, you can type a message in the computer's serial monitor. This message is then sent to the Arduino, which converts it into Morse code. The corresponding pulses are then shown by the blinking yellow LED, as well as a tone emanating from the speaker. The small potentio meter controls the pitch of the tone. Using the push button, a user can manually pulse the Arduino.

Arduino sketch

Demonstration (MP4, 14.8 MiB)






Electrical diagram:


Assembled and soldered protoshield:








Projects: Temperature and Light Logger Jump to top of page

The temperature and light (TaL) logger shield requires stacking it on top of an Adafruit Assembled Data Logging shield for Arduino. In can be used in combination with a suitable standalone battery pack that is connected to the top of the TaL shield via the white connector. Once activated or reset (via the top-left button), the red LED is turned on indicating that the TaL logger is inactive. At this point, the logger can be calibrated by looking at the measured temperatures that are being sent to the serial monitor. To that end, the small potentiometer provides a -5 to +5 °C additive offset to correct the measurements. The centred button switches the logger from inactive to preparation mode, at which point the yellow LED starts blinking for 5 seconds. During this time, no measurements are stored and the unit can be put in its place. Once the preparation time has elapsed, all LEDs go out and the TaL logger starts recording the current date and time, temperature, light level, and internal voltage every second,storing them to the SD-card in successively differently- named files. Note that in case an error during initialisation of or writing to the SD-card occurs, the red and yellow LEDs starts flashing alternatingly. Pressing the centre button again stops the measurements and returns the unit to the inactive state.

Arduino sketch

Processing sketch

MATLAB script


Electrical diagram:


Assembled and soldered protoshield:














Projects: 3x3x3 LED Cube Jump to top of page

This 3x3x3 LED cube consists of 27 LEDs, of which 14 are red and 13 are green, all positioned at alternating positions such that every red one is surrounded by green ones and vice versa.

The cube consists of three planes, each one containing nine LEDs. For these LEDs, all the cathodes are soldered together, so we have a common cathode per plane. All three planes are then stacked on top of each other, whereby we solder the anodes per column together. There is a 150 ohm resistor put in series with each of the nine columns to limit the current on the anodes. They are then connected to nine output pins on the Arduino.

Furthermore, we use three BC547B NPN transistors with their bases put in serial with three 22K resistors to control the cathodes. Each plane's cathode is then connected to a transistor's collector; all the emitters are connected to ground. The bases are connected to three output pins on the Arduino.

In order to turn on a single LED, we select the correct pin in the XY plane, and the pin for the respective Z plane. This technique has one side effect though: if we light a LED in one layer, and another one from another column in another layer, then all LEDs in both columns and planes are lit. To tackle this, we use persistence of vision (POV), whereby we only light one plane at a time, but very rapidly cycle between successive planes. If we do this fast enough (on the order of milliseconds), then we create the illusion of a single image.

Arduino sketch

LinkedList library

Demonstration (mp4, 36.2 MiB)


Electrical diagram:


Assembled and soldered perfboard:














Projects: Simon Says Game Jump to top of page

150 ohm resistors for the LEDs white led = x ohm push buttons = x ohm speaker = x ohm which also attenuates the sound's amplitude => terug uitmeten States: Setup: Play intro tune + blink intro lights Start: Alternatingly blink lights 1-3 + 4 If switch 1-3 is pressed Select difficulty level (1-3) Flash LED from selected difficulty level (green, yellow, red) If switch 4 is pressed Reset all high scores (stored in EEPROM) Flash white LED Repeat Play: Play ready tune Go to play state Play note + blink LED sequences Check user input If correct: add & repeat If incorrect: Get hiscore from EEPROM If higher than hiscore Store new hiscore in EEPROM Play winning tune + blink positively If lower than hiscore Play losing tune + blink negatively

Arduino sketch

SimpleTunePlayer library

Electrical diagram:


Assembled and soldered protoshield: