background preloader


Learning Examples | Foundations | Hacking | Links Started by Carlyn Maw and Tom Igoe Nov, 06 Shifting Out & the 595 chip At sometime or another you may run out of pins on your Arduino board and need to extend it with shift registers. This example is based on the 74HC595. How this all works is through something called "synchronous serial communication," i.e. you can pulse one pin up and down thereby communicating a data byte to the register bit by bit. The "serial output" part of this component comes from its extra pin which can pass the serial information received from the microcontroller out again unchanged. "3 states" refers to the fact that you can set the output pins as either high, low or "high impedance." Here is a table explaining the pin-outs adapted from the Phillip's datasheet. Example 1: One Shift Register The first step is to extend your Arduino with one shift register. The Circuit 1. Make the following connections: 2. 3. Circuit Diagram The Code Here are three code examples. 1. 2. Related:  TUTO ARDUINO74HC595 - Shift registerHack

kalshagar - Arduino and a Nintendo DS touch screen Quite easy to do, with inexpensive components (Touch screen is 10$, break board connector 4$ and just buy it, don't be a hero), but with one or two caveats. Sample, wiring and code here under. Everything is basically an application of Elm-chan's very good tutorial (but not in Japanese). Caveats and what you should know Don't buy the connector alone, just buy the breakboard, it's not posible to solder with a "usual" iron. And buy 2, because it's quite fragile and I killed 2 (hopefully I had spare parts!) Pictures Too many people use this, too few put a diagram. With the 10 kOhm resistors, nice reading, no recalibration : raw results drawn on a 800x800 picture. Arduino 2009 + 4x 10 kOhm + Connector + DS touch screen. Links Shopping Documentation and tutorials Sparkfun's tutorial Reading values WORKING Same as the link here under BUT in Japanese BUT with a schema ! Code

multiple rgb leds with shift registers Yes, I've made a thing using 96 RGB LEDs with 12 shiftregisters for the LEDs. Actually I'm not finished programming the thing yet (TTT), but the display works :-) In my case it's organized as 6 matrices of 4 by 4 LEDs each, hence 2 shiftregisters per matrix. Using 4 bits as row multiplexers, which really is identical in all of them, so I could have saved some shiftregisters (two or three). But I wanted to have them identical. I haven't really tested the limits yet, but I have tested with 8 PWM levels with no problem (no flicker), probably could up it to 16 at the cost of slowing down processing power for everything else. Like MikMo says, there are PWM LED driver chips, but they are not as cheap (don't remember price right now). So yes, it's possible with shiftregisters. Another thing to consider, is the evenness of the LEDs.

arduino-tvout - A composite video output library for AVR/Arduino The goal of this project is to create a simple interupt driven library for generating composite video on a single AVR chip. Currently the output is NTSC or PAL at a resolution of 128x96 by default. The library currently works on ATmega168,328,1280,2560,644p,1284p,AT90USB1286 and more can be added by editing one file. Beta1 for version 1.0 is out!!! It has some it changes the hardware connections as well as some of the function calls see the wiki for full details. SYNC is on OCR1A and AUDIO is on OC2A There are some timing issues with the m1284p, may be related to sanguino core. Wayne and Layn LLC now makes a shield that uses this library, the video game shield. nootropic design is selling a stand alone arduino compatible board the hackvision. Very simple as they may be.

ArduinoBoardDuemilanove Overview The Arduino Duemilanove ("2009") is a microcontroller board based on the ATmega168 (datasheet) or ATmega328 (datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. "Duemilanove" means 2009 in Italian and is named after the year of its release. Summary Schematic & Reference Design EAGLE files: Schematic: arduino-duemilanove-schematic.pdf Power The Arduino Duemilanove can be powered via the USB connection or with an external power supply. External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The board can operate on an external supply of 6 to 20 volts. The power pins are as follows: VIN. Memory The ATmega168 has 16 KB of flash memory for storing code (of which 2 KB is used for the bootloader); the ATmega328 has 32 KB, (also with 2 KB used for the bootloader). AREF.

The World Famous Index of Arduino & Freeduino Knowledge A Multi-Protocol Infrared Remote Library for the Arduino Do you want to control your Arduino with an IR remote? Do you want to use your Arduino to control your stereo or other devices? This IR remote library lets you both send and receive IR remote codes in multiple protocols. It supports NEC, Sony SIRC, Philips RC5, Philips RC6, and raw protocols. If you want additional protocols, they are straightforward to add. The library can even be used to record codes from your remote and re-transmit them, as a minimal universal remote. To use the library, download from github and follow the installation instructions in the readme. How to send This infrared remote library consists of two parts: IRsend transmits IR remote packets, while IRrecv receives and decodes an IR message. #include <IRremote.h> IRsend irsend; void setup() { Serial.begin(9600); } void loop() { if ( ! This sketch sends a Sony TV power on/off code whenever a character is sent to the serial port, allowing the Arduino to turn the TV on or off. How to receive Hardware setup

ShiftPWM support topic. Latest update: Support not using the SPI Update August 9 2012:I finally had the time to completely rewrite the documentation. You can now find schematics for normal RGB LED's, LED strips and high power LED's on I also updated the library to include load balancing and made the initialization much cleaner. Switching between SPI and no-SPI has become a lot easier. Old stuff: Update May 9 2012:Support for NOT using the SPI pin. 2.5x slower, but the freedom to use your SPI port for something else.Download here: files to libraries/ShiftPWM/ and open one of the examples. Update May 8 2012:Led setup flexibility: Based on some great suggestions that I got in this thread I have updated ShiftPWM to use the SPI bus.That took down the number of clock cycles per shift register from 108 to 43. Even Older stuff: First some pictures to get your attention: Video of ShiftPWM_example1:

LED matrix | PlanetArduino Use the Maxim MAX7219 LED display driver with Arduino in Chapter 56 of our Arduino Tutorials. The first chapter is here, the complete series is detailed here. Introduction Sooner or later Arduino enthusiasts and beginners alike will come across the MAX7219 IC. Here’s an example of a MAX7219 and another IC which is a functional equivalent, the AS1107 from Austria Microsystems. When shopping for MAX7219s you may notice the wild price fluctuations between various sellers. At first glance you may think that it takes a lot of real estate, but it saves some as well. You can even switch the display off for power saving mode, and still send it data while it is off. Before continuing, download and install the LedControl Arduino library as it is essential for using the MAX7219. Controlling LED matrix displays with the MAX7219 First of all, let’s examine the hardware side of things. The MAX7219 drives eight LEDs at a time, and by rapidly switching banks of eight your eyes don’t see the changes.

playground - InterfacingWithHardware These topics cover the hardware and software setup required to connect an Arduino device with a variety of electronic parts, chips and devices. A related topic not covered under this section is the shield, boards that plug directly into an Arduino's pin layout. Information on the creation and use of specific shields belongs in that section. Information on shields in general and their creation belongs here. See here for a table of shields and the Arduino pins they use. Arduino has limits on how much current can be sourced or sunk by its I/O pins. Navigation Output Input User interface Buttons,Encoders,Keypads Unified Input InterfaceText-based user interfacemicroBox Linux Shell look and feel for Arduino Phi_prompt user interface LibraryMenuSamplePhi_prompt glcd user interface Library This is being planned. Communication General Common Pinouts Examples and information for specific output devices and peripherals: How to connect and wire up devices and code to drive them. Visual Audio Output Bar Codes

Arduino to Twitter over USB - There are many reasons to want a project with the ability to provide status feedback. One useful method for providing feedback is by posting updates to Twitter. This enables one (or many people) to monitor a system from anywhere. It is even possible to, then, receive SMS updates to your phone. I will describe how your Arduino can become a versatile Twitter-enabled device. A simple Google search shows that there is plenty of documentation available for using an Arduino with an ethernet shield. For this tutorial, I will be using the Python programming language to help my device post to Twitter. Functional Overview The basic software flow of this project (sans configuration) is shown in Figure1. Figure1: Functional Flow Diagram Observe that the Arduino prints status updates to the serial port. Twitter APIBefore your project can integrate with Twitter, you must register your application and get an API key. Consumer KeyConsumer SecretAccess TokenAccess Token Secret status = arduino.readline()

Arduino BitBang Sources Tuto qu'on a suivi Pourquoi ? Si vous achetez un atmel, qui ne coute qu'environ 3€, vous pouvez le programmer aussi bien qu'un arduino, et c'est plus facile a integrer dans un montage Seul problème: le programmeur coute une fortune, pas besoin de depenser d'argent si vous avez déja un arduino! Comment ? On va utiliser la puce qui se trouve sur l'arduino pour communiquer en usb entre le pc et l'atmel. Partie Materielle Pins sur l'arduino Il faut souder les 4 pins secables sur l'arduino, attention de ne pas faire cramer la puce! Branchement de l'atmel on va recuperer l'alimentation du port icsp de l'arduino, et le reste des 4 pins que l'on vient de souder. On a maintenant une prise icsp qui peut programmer n'importe quel atmel! Du côté de l'atmel, justement nous avons deux choix qui s'offre a nous: Exemple de documentation atmega16 Voici le schema de la connectique en 2x3 et 2x5 pins: Le montage terminé ressemble a ceci: Partie logicielle Envoi du programme dans l'atmel Que reste t'il a faire ?

ShiftPWM | Control many PWM outputs with only 3 Arduino pins ShiftPWM is a software PWM library for Arduino that uses shift registers to expand the number of PWM outputs. With only 3 data pins, you can control an almost unlimited amount of PWM outputs. Because ShiftPWM is a software PWM library, it is not limited by the number of hardware PWM outputs on the Arduino. Easy to use The library is written to be as easy to use as possible: It provides intuitive functions like SetRGB and SetHSV to directly set an LED to a certain color. To SPI or not to SPI You can use ShiftPWM with the hardware SPI or without. Demo For a quick demonstration of ShiftPWM, see the video below. To give you an idea of how easy it is to use ShiftPWM, the movie below shows the result of this example code. The easiest way to get started with ShiftPWM is to open one of the examples that come with the library. Downloading and installing ShiftPWM Configuring ShiftPWM This sets the number of brightness steps. Debugging ShiftPWM Schematics

20mm square 8*8 LED Matrix - Red - LEDs - Affichage Voltage to apply : 3.3v. Always use it with correct resistors or you will burn the leds. ABCDEFGH Connect to Anode Power. 12345678 Connect to Cathode Power.

Related:  programmingComponentes