You’ve got graphs

In a quest for groovy graphics, we’ve integrated D3 support in the blog. Stay tuned for more to come…

This graphic was created by Mike Bostock.
We're using the WP-D3 WordPress plugin

Gesture manipulation of a robotic arm

banner

What?

This project explores human-controlled robotics. We manipulate a robotic arm in real-time using five-finger gestures, with a force-sensitive touch interface.

Why?

This project was created for two reasons: First, is to evaluate Sensel’s new force-sensitive touch interface. Second, is a general exploration of a magical sensation; The use of touch gestures to animate a robot.

How?

There are four hand gestures that control the robot arm’s movements:

Force down:

Rotation:

Pinch:

Forward / Backward:

Me too?

To make this project happen, the following items were used:

You can get this project up and running in no time! The code is located here.
First, program the Arduino with the “sketch” code. Next, run the Processing application, and control the robot with five fingers!

Sensel

Sensel is designing next-generation input devices. I’ve had the pleasure of working with their pressure-sensitive, multi-touch interface in this project. The video below is a promo teaser for their upcoming crowd-funding campaign launch.

Check out their offerings, and stay tuned for their kickstarter: http://www.sensel.com/

Software controlled lighting

a USB Serial to DMX adapter

dmxTeensyAdapter

Materials used: 

  • 1 x Teensy 2.0
  • 1 x RS485 Transceiver (LTC1485)  
  • 1 x 3-pin XLR connector (NC3FAH1)  
  • 1 x 100 ohm resistor
  • 2 x 12-position 0.1″ headers  
  • 1 x Mini USB cable
  • 1 x PCB using OSH Park 

Step 1: Make some PCBs!

Download the board design files (“Gerber files”) and use them to order PCBs from the amazing OSH Park.

Step 2: Solder those PCBs

Solder up some boards, inhale fumes, and get a buzz..

If you don’t already own a soldering iron, may I suggest the most excellent Hakko FX-901 

Hakko-FX-902-Cordless-Soldering-Iron

Step 3: Program the Teensy

Use Arduino with the Teensyduino extension to program this code onto your Teensy 2.0

#include <DmxSimple.h>

void setup() {
  Serial.begin(115200);
  Serial.println("SerialToDmx ready");
  Serial.println();
  Serial.println("Syntax:");
  Serial.println(" 123c : use DMX channel 123");
  Serial.println(" 45w  : set current channel to value 45");
  
  DmxSimple.usePin(0);
}

int value = 0;
int channel;

void loop() {
  int c;

  while(!Serial.available());
  c = Serial.read();
  if ((c>='0') && (c<='9')) {
    value = 10*value + c - '0';
  } else {
    if (c=='c') 
      channel = value;
    else if (c=='w') {
      DmxSimple.write(channel, value);
      Serial.print("channel:");
      Serial.println(channel);
      Serial.print(" value:");
      Serial.println(value);
    }
    value = 0;
  }
}

Step 4: Enjoy your DMX adapter

The adapter receives commands in the following format:

ex:  123c 45w

This example sets channel 123 to value 45.

How-to: Raspberry Pi Hosting an AdHoc Network

w/ the Inexpensive Edimax EW-7811Un Wifi Dongle

Pi-Adhoc

Materials used: 

Step 1: Terminal access

Plug the Raspberry Pi into your existing network through a wired connection. Use Adafruit’s Pi Finder to locate and access the terminal of your Pi.

Step 2: Install required packages

  • hostapd is a wireless access point manager
  • udhcpd is a dhcp server that will assign IPs for connected clients
sudo apt-get install  hostapd udhcpd

The version of hostapd that we just installed does not support the Edimax dongle’s hardware. We need to replace some files, to make it compatible.

wget http://www.daveconroy.com/wp3/wp-content/uploads/2013/07/hostapd.zip
unzip hostapd.zip 
sudo mv /usr/sbin/hostapd /usr/sbin/hostapd.bak
sudo mv hostapd /usr/sbin/hostapd.edimax 
sudo ln -sf /usr/sbin/hostapd.edimax /usr/sbin/hostapd 
sudo chown root.root /usr/sbin/hostapd 
sudo chmod 755 /usr/sbin/hostapd

Step 3: Configure hostapd

sudo nano /etc/hostapd/hostapd.conf

Edit the file so that it contains the following text:

interface=wlan0
driver=rtl871xdrv
ssid=Raspi_wifi
hw_mode=g
channel=11
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=somepassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

Hit Control-X to exit. You will be prompted to save changes.

Step 4: Configure udhcpd

sudo nano /etc/udhcpd.conf

Edit the file so that it contains the following text:

start 192.168.0.2 # This is the range of IPs that the hotspot will give to client devices.
end 192.168.0.20
interface wlan0 # The device udhcp listens on.
remaining yes
opt dns 8.8.8.8 4.2.2.2 # The DNS servers client devices will use.
opt subnet 255.255.255.0
opt router 192.168.0.1 # The Pi’s IP address on wlan0 which we will set up shortly.
opt lease 864000 # 10 day DHCP lease time in seconds

Hit Control-X to exit. You will be prompted to save changes.

sudo nano /etc/default/udhcpd

Find the following line:
DHCPD_ENABLED=”no”And prepend it with a pound symbol, like this:
#DHCPD_ENABLED=”no”

Hit Control-X to exit. You will be prompted to save changes.

References: