Latest Updates: electronics RSS

  • Get Processing and Arduino to talk

    Ellen 15:58 on May 13, 2011 | 35 Permalink | Reply
    Tags: , Duemilanove, electronics, , RXTX

    I want to use the muscles of Processing to get my Arduino do really cool stuff. In order to do this I want both of the softwares to talk to each other. It proves to be a bumpy road depending on versions of you Arduino board and processing. My set up is a Mac OS X 10.6.7, Arduino board Duemilanove with Atmega328. If you already have the Arduino and Processing software installed do the following:

    1. Download the Processing library, unzip it.
    2. Put the folder “arduino” inside a folder that you call “libraries” within your Processing Sketchbook folder.
    3. Connect your Arduino board and open up the Arduino software, upload the sketch StandardFirmata from Examples/Firmata. Close Arduino software.
    4. Add a LED diod to pins Ground and 13 on the Arduino board and run the following code in Processing:

    import processing.serial.*;
    import cc.arduino.*;

    Arduino arduino;
    int ledPin = 13;

    void setup()
    {
    //println(Arduino.list());
    arduino = new Arduino(this, Arduino.list()[0], 57600);
    arduino.pinMode(ledPin, Arduino.OUTPUT);
    }

    void draw()
    {
    arduino.digitalWrite(ledPin, Arduino.HIGH);
    delay(1000);
    arduino.digitalWrite(ledPin, Arduino.LOW);
    delay(1000);
    }

    Whoohooo!!!! You should now see your LED blinking on and off.

    Troubleshooting

    Mismatch of RXTX libraries
    When running your Processing sketch the following error can occur:

    WARNING:  RXTX Version mismatch
    Jar version            = RXTX-2.2pre1
    native lib Version  = RXTX-2.2pre2

    1. Download the latest RXTX library from http://rxtx.qbang.org/

    2. Find the files librxtxSerial.jnilib and RXTXcomm.jar in the unzipped folder structure: MACOSX_IDE/ForPackageMaker/Install/Java/Extensions

    3. Copy the 2 files into the folder: Harddrive/Library/Java/Extensions

    4. Close down Processing and right-click on the application in the “Applications”-folder and select “Show Package Contents”. Go to folder “Contents/Resources/Java/modes/java/libraries/serial/library”. Replace the old RXTXcomm.jar with the new file in this folder.

    5. Replace the file librxtxSerial.jnilib with the new file in the “macosx” folder “Contents/Resources/Java/modes/java/libraries/serial/library/macosx”.

    6. In order for this to work properly also follow these steps taken from here:

    1. Under Finder click on the “Go” Menu
    2. Select “Go to Folder…”
    3. Type “/var/”
    4. Finder will open var folder.
    5. Right click on folder named “lock” and select “Get info”
    6. Open drop arrow titled “Sharing & Permissions”
    7. I set all privileges to: “Read & Write”
    8. Close Info
    9. Go to the Var folder on the finder and open the “spool” folder
    10. Right click on folder named “uucp” and select “Get info”
    11. Open drop arrow titled “Sharing & Permissions”
    12. I set all privileges to: “Read & Write”
    13. Close Info
    14. DONE

    7. Restart your computer and Processing. The output you should see is:

    Stable Library
    =========================================
    Native lib Version = RXTX-2.1-7
    Java lib Version   = RXTX-2.1-7

    RXTX Warning
    If you got this warning. Make sure you went trough the entire step 6 in the previous block and that the user you are logged in as have the permissions to read & write on these files.

    RXTX Warning:  Removing stale lock file. /var/spool/lock/LK.255.000.134

  • Getting values from a flex sensor

    Ellen 14:08 on May 5, 2011 | 0 Permalink | Reply
    Tags: , electronics,

    flex_sensorFirst step in my project:

  • Depressed shoe shelf in action

    Ellen 12:09 on May 25, 2010 | 0 Permalink
    Tags: , , electronics, , , , shoe shelf

    Read more about the process on making The depressed shoe shelf.

  • Your pulse as an input

    Ellen 12:26 on May 3, 2010 | 0 Permalink | Reply
    Tags: electronics, Maria Paz, Nintendo Wii,

    Maria Paz is exploring the field of mood inputs by using your pulse as an input to control your environment. The sensor is sending out light that is reflected in the finger and back to the light sensitive sensor. As blood is pumping and flowing in the finger the amount of light received back alters. The output gives you the pulse of your body. Follow her progress in working on her final project Mood Tunnel on http://themoodtunnel.posterous.com/

    Nintendo Wii introduced the Vitality sensor a few months ago, working as an input to measure your health and can be used in games.

    LEDs translating human pulse from Maria Paz on Vimeo.

  • Building your own humidity sensor in 2 minutes

    Ellen 09:22 on April 14, 2010 | 0 Permalink | Reply
    Tags: electronics,

    I am working on a project where I need to measure the humidity of the space. I want to know when the space has dried up and when it is wet or soaking wet. There are several different humidity sensors on the market but t does not absorb water but only measure the level of humidity around it. They are small and does not attract water. So I tried to build my own DIY version and my first attempt works quite well. Check it out:

  • Sharp GP2Y0D810Z0F IR Sensor

    Ellen 16:23 on March 20, 2010 | 0 Permalink | Reply
    Tags: electronics, GP2Y0D810Z0F, ,

    Trying out the small Sharp GP2Y0D810Z0F IR sensor. It only detects when an object is 2 cm to 10 cm away. Great for detecting close up objects. The sensor is very sensitive so I added a resistor of 1 mega ohm to lighten up the power supply. There are 3 pins on the circuit board of the sensor: ground, power supply (2.7 V to 6.2 V) and analog output. More details on the sensor and circuit board on Pololu’s site who are the manufacturers of the circuit board. There is also another version of this sensor Sharp GP2Y0D805Z0F, detecting objects even closer with a range of 0.5 cm to 5 cm.

    Serial monitor output

    Serial monitor output

  • Detecting infrared light

    Ellen 23:19 on March 1, 2010 | 1 Permalink | Reply
    Tags: detecting, electronics, infrared sensor,

    Magic Mirror Infrared detector

    Magic Mirror Infrared detector

    Building robotics and electronic installations with IR sensors can be a hassle when detecting objects. At the moment I am working with several Sharp IR sensor that I suspect interfere with each other, picking up each others bounce light. I saw this need neat little IR detection card that displays your IR light so you know exactly where your IR sensor bounce back on objects.

    Investigating these cards further I found out you can use a digital camera to catch the light. The human eye can’t see the IR light but the digital camera can! Just turn on your digital camera and view your sensor through the camera.

    Using my iPhone camera I could clearly see where my Sharp GP2D12 reflected back the IR light and I could adjust the IR sensor face the object more accurately.

    Iphone IR detection

    Iphone IR detection

  • Just in! The Flex sensor!

    Ellen 00:30 on November 18, 2009 | 0 Permalink | Reply
    Tags: electronics, ,

    Time to do some interesting stuff with bending a sensor.

    Flex sensor

    Flex sensor

  • Hacking the recordable post card

    Ellen 00:16 on November 18, 2009 | 0 Permalink | Reply
    Tags: , electronics

    I saved this post card where you can record a message and play it. It works with a slim battery but I powered up with a 9V battery. This will be used for something exciting!

    Recordable post card

    Recordable post card

c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
esc
cancel