Housekeeping
- Please note that ordering things and parts and pieces can TAKE A WHILE -
- don’t let this keep you from finishing for June 2nd. Do group orders, use second delivery, etc.
- digikey, RS, coolcomponents seem to ship here quite quickly
- Input/Output experiments – how did we do? What are the questions that came up for you?
Rationale
Last week we took a quick look at the Arduino basically works – this week we’ll look at a few extensions of the project, that allow for communication via MIDI and Wireless comms. These are optionally to be used for your final exhibition piece in the class. Please WORK on this and ask me questions via email over the next weeks.
Also note that although we can support networking objects to a certain extent – they are VERY difficult to get working on campus… So if your project presentation needs to happen here, you should probably ‘demostrate’ that net-workability via some other mechanism (2 way communication using serial, for example – or setting up your own network).
Software and Arduino: Output
- The basics of last week are contained in a sensor input –> electronic output
- But we can also think of architectures now that
- Take data in from the real world
- Transfer that data to a computer
- Computer does something / processes the data
- Computer sends data back out to Arduino to control something in the ‘real world’
- EXAMPLE: Sending data from Max/MSP to control a motor:
- serialOutputToArduino (max patch)
- motorControlFromSerialInput (arduino example)
Serial Data Revisited
- Once again – What is really going on when we send data ‘up (or down) the USB cable’?
- FTDI Chip – the USB to serial converter (and back)

- Serial Communications – little bits, going down one line, in one direction
- Duplex – TX, RX, 9600
- There are many different kinds of serial data -
- DMX (common in lighting and staging)
- RS-232 (common in PC-world – DE9 cables)
- USB (universal serial bus)
Midi / OSC: One kind of Serial Data
- Midi – simple serial protocol (i.e.: a specified sequence of data)
- 9600 / 31250 data rates
- Arduino can output this protocol, as a way of interfacing directly to audio software, etc.
- Good tutorial here
- Another one here is here
- Outputting MIDI from Arduino requires the use of a (for PC) hardware interface or an synth that supports the MIDI protocol
- Inputting MIDI to Arduino requires the use of the same (for PC) hardware interface or a MIDI controller
- Note that MIDI can and is used as a general control protocol for other things – e.g.: for lights
- As for OSC (remember we used this to talk to Processing from Max/MSP?)
- Seems to be a little stalled, but it is possible
- Need to output to UDP (which is possible via the XPORT/Arduino shield)
- EXAMPLE – midi into max:
- verySimpleMidi (arduino)
- verySimpleMidi2Channel (arduino)
- noteVelocityMidi (arduino)
- EXAMPLE – controlling LIVE from Arduino
Wireless:
- IR serial transfer
- Bluetooth Modules (serial-to-bluetooth) – there is also a Bluetooth Arduino
- 2.4 GHz RF Transceivers (serial-to-radio converters)
- SENA BLUETOOTH
-
- We’ll do an example with the SENA Bluetooth ESD200:
- 30 Meters range
- 1200~230 Kbps (we use 19200 bps = 19.2 Kbps)
- Configure the as-shipped device – use the DEV board (there are other ways of doing this, but they’re a pain in the ass)
- Setup name
- Turn off ‘hardware flow control’
- Change PIN CODE
- etc.
- The User Manual

- Connect via your computer – new device pairing!
- Configure the bluetooth device – add new RS-232 Serial Port (this is an emulated serial port for your chip!)
- Open Max/MSP (or whatever) and look for serial ports – should be listed
- Note the Bluetooth Device is a 3.3V device
- You need to use SOFTWARE SERIAL to do this – or any outbound serial communication
- Then hook up TX/RX, Power and Ground – you’re golden!

- We’ll do an example with the SENA Bluetooth ESD200:
Networking (Difficult to achieve in the University!)
- How does a network work?
- Addresses are addressed with a PORT (or ‘subchannel’) -
- Ports allow for multiple parallel connections to a device
- Any device with a valid IP address can be ‘on the network’ – so
- There are a number of reasons you might want to feed data into/out of Arduino
- You want to make something like this (i.e.: a ‘networked object’)
- You want to talk via network hardware like switches and routers
- You have a long way to go – ETHERNET vs. USB
- Other ideas in “Ubiquitous Computing“
- Other ideas in ambient computing
- Controll motors from the web, shooting an Iraqi
- Interface with projects/platforms like Pachube
- As we know, the Arduino is a serial device – so we need a serial-to-ethernet converter!
- Lantronix Serial to USB converter
- Xport for which there is a shield by Adafruit. Tom Igoe’s now classic email-clock is a good example
- Xport-Direct , Xport-Direct+ , etc … there are others
- The XPORT
- “Embedded Ethernet Device Server”- model XP1001001-03R
- Basically: Serial to Ethernet Converter – 300 bps to 921,600 bps
- Needs 3.3 VDC supply voltage
- Standard serial Tx, Rx hardware (level conversion using resistors)
- Breakout board from Sparkfun
- Can send emails, run web scripts based on user defined ‘triggers’
- Buy one if you think it’s interesting – shield and xport
- (this is not the actual device we’ll be using in class – but it’s a library-support ethernet shield, available in the UK)
To Do
- Next meetup – interactive 3D with GUY SCHOFIELD
- Next (and last) exhibition – Extensions of Man – June 2nd
- Respond to the theme however you like – BUT RESPOND TO THE THEME
- Please read the marking criteria and present what’s required
