interactive objects & spaces 1 - med m/567 - Summer 2007
Philip van Allen -
v a n a l l e n @ a r t c e n t e r . e d u
room 227, tue 2:00-6:00pm

NET Connect Website
all materials on this web site © copyright 2007, Philip van Allen
 
week 01b - demos, assignment, hook it up!

the basics : 


In this course, we're using the Making Things microcontroller. This device is relatively inexpensive ($149), operates in both slave (PC controlled) and embedded (self controlled) modes, and has a good support website.

The Make Controller has the following features:

  • 8 inputs that can be configured as analog (for continuous sensors such as a knob or proximity sensor) or digital inputs (for on/off kinds of sensors like switches)
  • 8 digital outputs that can be configured as switches, PWM outputs (pulse width modulation for changing varying the power such as dimming an LED), or motor controls
  • 4 on-board LEDs
  • 4 servo motor outputs
  • external power inputs

For more detailed information on the Make Controller, see the Making Things website

To control the Make Controller, we're using Adobe's Flash, which can control a variety of media, has a robust programming language, and can communicate via the NET Connect application. In Flash, you'll be using several graphical "widgets" I've developed that make it possible to read sensors and control both media and effectors attached to the Make Controller without any programming.

Download the NET Connect software from the NET Connect website:

newecologyofthings.net/netconnect



the ios kit :  Each student in the course is being provided a kit as part of your lab fee that includes the following:
  • Make Controller microcontroller
  • knob sensor (potentiometer)
  • LED effector
  • USB cable
  • Ethernet cable

This kit is yours to keep, and you are responsible for replacing anything if you break it.

 

 
electrical hookups :  The best procedure for hooking up devices to the microcontroller is:
  • be sure the power and USB cables are disconnected
  • attach any sensors and effectors
  • plug in the Ethernet cable and USB cable to the computer and the microcontroller
  • launch the NET Connect Hub application
  • run your Flash application

Detailed instructions for

  • attach the sensors and effectors before you power up the microcontroller. This reduces the chance that you accidentally short out the microcontroller by crossing wires while you hook things up.
    • ANALOG AND DIGITAL INPUTS
      • each analog/digital input has three different kinds of screw terminals--ground, power, and signal. The signal inputs are numbered from left to right
      • be sure you attach the sensor ground (black), power (red), and signal (white) to the corresponding terminal positions. If you mismatch the connections, you may short out the microcontroller.
      • knobs, proximity, pressure and all other analog sensors typically have 3 wires as noted
      • switches and other digital sensors typically have only 2 wires, power and signal. Some microcontrollers (such as the Brainstem) require three wires with a pull-up resistor. The Make Controller does not need this, and you can hook a switch up without any extra wiring or resistors.
      • by default, the 8th (number 7) input is wired to the trimpot on the board via a jumper. this makes it easy to test the controller without hooking up any external parts.
      • to hook up a knob (potentiometer) to the first input port, using Analog In Bank 1, hook the red power wire to the VIn1, hook the black ground wire to Gnd, and hook the white signal wire to port 0.
        analog inputs
    • DIGITAL OUTPUTS
      • LEDs, relays, and other on/off effectors must be attached to the digital outputs. Usually, these have just two connections, a ground and signal. Do not attach the red power connector.
      • To connect an LED to the first port, hook the ground wire to the Gnd connector in Bank 1, as shown below.
      • Hook the Signal or Power wire to Digital out port 0 in Bank 1
        digital outputs
    • SERVO OUTPUTS
      • Servo motors should be attached to the servo outputs, with the ground brown or black wire at the towards the side of the microcontroller, where GND is printed.
        servo outputs
  • To communicate with the Make Controller via Ethernet, you'll need to set up your computer's network settings -- instructions are on this page on the MakingThings website:
    www.makingthings.com/resources/tutorials/direct-ethernet-communication/index_html/introduction
  • power up the computer, launch the NET Connect Hub, then launch Flash
  • plug the USB and Ethernet cables into the computer and Make Controller. For simple applications, the USB cable provides power to the controller. When you need more power, you can use a battery or wall plug power supply instead of the USB cable.
    • once the power is on, the red LED should go on and the small green LED should blink.
    • if the lights do not come on when you plug the power in, immediately unplug the power. This may indicate that there is a short somewhere, or that you've plugged the power in backwards. Check your connections, fix any problems, and try again. Of course, no lights may also mean that the USB cable is not connected, or the batteries are dead.

 

 
NET Connect Interface :  The NET Connect sample FLash movie is a good starting point to experiment with sensors and effectors. The AnalogInput widget is programmed to read and process the input from analog sensors without writing any ActionScript code (the Flash programming language). Similarly, the ClipControl, SoundControl and DigitalOutput widgets are programmed to control images/audio and effectors respectively without writing any ActionScript code. You can produce many interesting projects using these widgets.

But keep in mind that more sophisticated interactions may require some ActionScript programming. If you do need to do some programming, the widgets are still useful, providing your ActionScript code access to the raw and processed data coming from the sensors.

 

 

exercise :

We'll go into more detail next week on using the NET Connect Interface. Today, we'll use the following widgets:

  • AnalogInput - reads and processes the raw data coming from any analog input on the microcontroller
  • ClipControl- controls a movieClip inside of Flash (a movieClip is an object on the screen)
  • AnalogOutput- controls one of the digital outputs on the microcontroller

To get started with the hardware:

  • using the hookup instructions above, connect the LED to input port 1 -- be sure you connect the right cable colors to the right screw terminals!
  • configure your computer with the right network settings
  • open the NET Connect sample Flash movie
  • connect the USB and Ethernet cables

Now you are ready to use the NET Connect Interface

  • start the NET Connect Hub application
  • in Flash, open "NET Connect Example.fla" and test the movie by selecting CONTROL>TEST MOVIE
  • move the slider up and down on the AnalogInput widget and watch what happens to the TOP graphic
  • close the SWF and select the ClipControl widget, and then open the WINDOW>PROPERTIES>PROPERTIES pallete
  • select parameters, and change the theProperty to rotation
  • test the movie again, and move the fader up and down
  • notice that the graphic rotates many times
  • to fix this, change the max processed value on the sensorMonitor widget to 360 (as in degrees).
  • now move the slider up and down
  • experiment with the other properties of the clipControl widget
  • now activate the "connect" button, and use the trimpot on the Make Controller to change the sensor value

  • to vary the brightness of an LED, drag the AnalogOutput widget from the WINDOWS>COMPONENTS palette onto the stage
  • test the movie, and move the trimpot to see what happens to the fader on the AnalogOutput widget
  • click on the CONNECT button on the AnalogOutput widget and you should see the brightness of the LED

net connect example

 

all materials on this web site © copyright 2007, Philip van Allen

top