hex705

the first creature to discover water was likely not a fish

Posts Tagged ‘arduino

wiiHack – Montreal

leave a comment »

First notes from the wiimote weekend at Hexagram (Montreal).

Spent yesterday compiling a list of tactics for accessing data. Will post full results as today unfolds….

Connecting a chuck to an Arduino

Just give me the code!

The solution I am working on is based upon code and examples from:

Code:

TodBot — code example and developer of the physical adaptor I am using.  This is a great  resource — so you may want to start there if you are stuck

growdown

Windmeadow Labs

Hardware
the adapter I am using can be found at sparkfun

High Level Map
Chuck speak I2C — a form of serial communication. You need 2 libraries to make this code work. The first is wire.h — which ships with Arduino. The second is some form of the wiiChuck libraries that others are developing. I have pulled two pieces of code from the above sites to create my solution.

There is nothing particularly novel about this stage — I just moved the power code block from Todbot over to the library from growdown. The samples I found seemed to have this missing.

I am cleaning code but this bundle is working for me. Set your serial monitor to 19200 to see the data in the Arduino environment.

Advertisements

Written by hex705

October 18, 2009 at 11:05 am

Posted in wii

Tagged with , ,

Communicating with Xbees

with one comment

This is a quick post — will clarify ASAP.

This post will cover a set up for communicating between two Arduinos with Xbee radios.  it is not the only solution but it is a start.  I will also describe how to organize a piece that enables a remote Arduino to communicates with processing via xBees.

I am assuming that you have configured your radios to talk to each other.

Connections for Serial Communication

When communicating between Arduinos with Xbees we need a different circuit than we used to configure the radio.  If you removed your Arduino chip to configure the radios you will need to replace it for the following to work.  Make sure you put the chip in the right way — notched end goes towards the edge of the board (I think that makes sense looking at the board, let me know).

The circuit is simple.  Power the xBee with 3.3V from the Arduino.  Next, for serial communication you need to connect two wires.  Connect Arduino RX (PIN 0) to xBee TX (labeled Dout on the xBee breakout board).  Connect Arduino Tx (PIN 1) to xBee Rx (labeled Din on the xBee breakout board).  If you have your xBee and Arduino facing the same ways as I do, your communication wires will cross over each other.  That is what you want.  (NOTE: this is different that the wiring used to configure the XBees).

Arduino talking to Xbee

Arduino talking to Xbee

Radio Connections Close-up!

Radio Connections Close-up!

A NOTE ON CODING

Important: You will need to disconnect one end of the serial communication wires you just connected EACH time you change the code in your Arduino.  Once the code uploads you can RECONNECT the serial communication wires.

The Whole System

Here is an example that uses xBee radios as a communication bridge between two Arduinos.  You will need:

  • 2 xBee radios
  • 2 Arduinos
  • 2 LEDs
  • 1 button (switch)
  • wires, and some 1k and 10k resistors.
  • sample CODE.

The system requires the sending radio to have the serial communication connections above as well as a digital switch (button) connected to PIN 2 and an LED connected to PIN 3. The receiving side has an xBee connected as above and an LED connected to the receiving Arduino on PIN 2.

xbeesendbtnled

Send Circuits

Recieve Circuits

Recieve Circuits

When working this system will sense button presses, turn on the local LED and send a message via xBees to the remote Arduino. The remote Arduino receives the message and reflects the button state with its LED.

This is a one way system. I will post a two-way system later today.

Ya, But I want to Talk to Processing

If you want to talk to processing from a remote arduino then you have two choices.  Once use the system above — and receive serial from an arduino connected to the computer.

OR

Set up a slightly different system.  I think this is an easier solution — but you may disagree.  Use xBees to replace the cable you are using for communication. (NOTE: you will still need the cable to program your arduino — this is for once you have code in place.  Using radios to code is another story).

The system should be developed and debugged with the programming cable first with radios introduced at the end.  So I will assume you have some code that allows your arduino to talk to processing already — maybe a sensor reading or similar.

Once that is working, remove the programming cable and connect an xBee to your Arduino as above in THIS post.  At the computer side where processing is running connect an xBee as if you were about to configure it (ie with a FTDI breakout or a dechipped Arduino).

If you tell processing to look at the port where you just connected an xBee you should be receiving data — just as you were with the cable.

If I need more HELP?!

As always this is coved in Tom Igoe’s Making Things Talk.

Written by hex705

November 30, 2008 at 10:34 am

Xbee – configuring the radios

with 6 comments

Once your Xbee is wired up, you need to configure it for your application.  For basic use we are only interested in 3 settings in the radios.  Advanced users will want to look at online docs / manuals to get a sense of what else is possible.

Read the rest of this entry »

Written by hex705

November 7, 2008 at 9:42 am

Xbee — Making Connections

with 39 comments

Xbee radios can be connected in countless ways.  The limits are imagination and only to small degree budget.

This post is an overview of some of the strategies for making electrical connections with equipment in our labs.  The start simple and become more complex.
!!!!REMEMBER XBEES ARE 3.3V DEVICES!!!

Read the rest of this entry »

Written by hex705

November 7, 2008 at 2:14 am

Posted in code, MPM32, xbee

Tagged with , , , , , , ,

Embodiment: Objects, Environments and Spaces

leave a comment »

This we week we will examine the idea of embodiment and how it realtes to the development of interactive works.

Readings are posted to blackboard.  One has lots of pictures, the other is online — please look at them both before class.

Sample code will be up this afternoon.

Technology this week will explore scaling values from sensors.  You HAVE to be able to connect your arduino to processing for this.  IF you have not tried to do so –I suggest you get to work tonight and figure it out.  Last time I checking in class more than a third of you had not even tried it yet!

Written by hex705

October 20, 2008 at 8:58 am

Week 1

leave a comment »

Day 2 — Friday May 9th

Introduction to Max/MSP and in-class projector exercise (Part 1)

Read the rest of this entry »

Written by hex705

May 16, 2008 at 10:44 am