Category Archives: arduino/wiring

Fading an LED from a switch

This example uses a digital input to control a fading LED. The LED turns on when the switch goes from off to on, then fades slowly to black.  It illustrates two principles:  the idea of edge detection or state change … Continue reading

Posted in arduino/wiring | Leave a comment

Using an Accelerometer to Sense Which Way Is Up

ITP just got some nifty flat panel mounts that can rotate 360 degrees. They’re very easy to move, it takes only one hand. When I saw them, I thought, “what good is a rotating mount if the content on the … Continue reading

Posted in arduino/wiring, circuits | Tagged , , , , | 6 Comments

Lantronix Analog Sender

Here’s a short Wiring/Arduino program that waits for a connection to the microcontroller via a Lantronix device, and sends out an analog reading when it’s got a connection. The Lantronix device is in connectMode D4, and the TX is connected … Continue reading

Posted in arduino/wiring, Lantronix | Tagged | Leave a comment

Converting an Arduino Diecimila into an ICSP programmer

Kimio Kosaka has made a way to program a virgin Atmega168 without a hardware programmer.  You use a modified version of the avrdude programming software that can access the extra pins of an FTDI USB-to-serial chip, do a little soldering … Continue reading

Posted in arduino/wiring, AVR, circuits, misc | Tagged | Leave a comment

Sensorbase datalogger

Sensorbase.org is an open data repository run by the Center for Embedded Networked Sensing at UCLA. It’s a database of sensor databases. You can upload datasets to it, and you can browse other datasets as well. If you’ve never set … Continue reading

Posted in arduino/wiring, Lantronix, PHP | Tagged , , , , , , , | 2 Comments

Sensor graphing with 3 lines of code!

I’ve been looking for simple ways to graph the data from a sensor attached to a microcontroller lately, because it’s such a necessary activity if you want to look at sensor data over time. Using Apples Grapher program, which comes … Continue reading

Posted in arduino/wiring | Comments Off

iPod control from Arduino or Wiring

Rosie Daniel wrote a nice piece of Arduino code to control an iPod.
Continue reading

Posted in arduino/wiring | Comments Off

Startup Checks

Since this value is stored even when the Arduino is not powered, you’re going to get a new number each time it’s run.Thanks to Hans for the code./* EEPROM reset checker By Hans Steiner Reads a value from the EEPROM on startup, prints it out, and increments the value then stores it back in EEPROM…. Created 25 Oct. 2007*/ #include <EEPROM.h>int potPin = 5; // select the input pin for the potentiometerint motorPin = 9; // select the pin for the LEDint value = 0; // variable to store the value coming from the sensorint resetCountByte = 36;void setup() { // open the serial port Serial.begin(9600); // read the last value stored in the EEPROM: value = EEPROM.read(resetCountByte); // send it out the serial port: Serial.println(value); // increment it and write it back to the EEOPROM: EEPROM.write(resetCountByte, value + 1); pinMode(motorPin, OUTPUT); // declare the motor as an OUTPUT pinMode(13, OUTPUT); // declare the LED pin as an output digitalWrite(13,HIGH); // turn on the LED}void loop() { // you can do anything you want to here.}
Continue reading

Posted in arduino/wiring, circuits | Comments Off

USBTinyISP

Recently, I’d been trying to re-program some Atmega168′s for use in Arduino modules, and was having no luck using my AVRISP MkII programmer…. Even more fortunately, Limor Fried has written some nice instructions on the programmer and on installing and running avrdude to program with it.
Continue reading

Posted in arduino/wiring, circuits | Comments Off

Virtual Color Fader for Max/MSP

This Max/MSP patch reads in a serial string like this:RnnnGnnnBnnnmax v2;#N vpatcher 0 44 587 638;#P window setfont “Sans Serif” 9.;#P comment 137 34 100 196617 Read the serial port every two milliseconds;#P window linecount 1;#P newex 156 276 27 196617 / 4;#P number 156 254 35 9 0 1023 3 3 0 0 0 221 221 221 222 222 222 0 0 0;#P newex 106 276 27 196617 / 4;#P number 106 254 35 9 0 1023 3 3 0 0 0 221 221 221 222 222 222 0 0 0;#P newex 55 276 27 196617 / 4;#P number 55 254 35 9 0 1023 3 3 0 0 0 221 221 221 222 222 222 0 0 0;#P hidden newex 55 303 112 196617 bgcolor 220 120 192;#P user multiSlider 167 145 125 91 0…. 1 3449 15 0 0 2 0 0 0;#M frgb 0 0 0;#M brgb 255 255 255;#M rgb2 127 127 127;#M rgb3 0 0 0;#M rgb4 37 52 91;#M rgb5 74 105 182;#M rgb6 112 158 18;#M rgb7 149 211 110;#M rgb8 187 9 201;#M rgb9 224 62 37;#M rgb10 7 114 128;#P user multiSlider 438 145 125 91 0.
Continue reading

Posted in arduino/wiring, Max/MSP | Comments Off