Build up a iPad Plarail Patrol with Arduino + OSC

Introduction

This tutorial give you an idea to build up a iPad controlled Parail. Please read my Arduino OSC step by step howto post if you don’t know how to work with Arduino.

1. Hardware Setup

  • Show you how they connected together.
  • The network setup
  • Attach the servo on Plarail component(Rail, Station)

2. Software Setup

  • The exact Arduino coding
  • Sample TouchOSC layout

1. Hardware Setup

Let’s take a look the setup diagram, see how this connected.

  • A servo connected to Digital Pin 19, 20, 21
  • Arduino ethernet assigned a IP 192.168.0.178
  • iOS will be assigned a IP 192.168.0.12 by DHCP

Hardware Components

Components

You need the following component to construct your setup (Shown by bottom up) 1. Arduino board (Mega 2560, UNO…etc) 2. Sensor Shield (Optional) 3. Wireless Module or Wireless router (Optional if run with wired Arduino network) 3. Low power consumption servo unit, recommend a mini or micro sized servo. 4. Power supply, for example 7.4v recommend for wireless, lan, servos at the same time. 5. Wireless AP/Router, DHCP enabled. (For iPad)

Servo extension cable connected to Digital Pin 19,20,21.

The network cable connecting from the wireless module to lan module. Why? because this module only support wireless serial comm., so it cannot setup to listen network socket. Therefore, I configure the modue as a wireless AP that bridge the LAN interface with my router. you may use any router as you like instead of stacking those module like that. Please read my Arduino OSC step by step howtopost to see how to work with generic router.

Plarail Component Setup

You need to work out the servo position with your plarail component, for me, I will just patch it underneath, you may use any skill to make them work together. http://www.youtube.com/watch?v=Hv9IVDAbao0 http://www.youtube.com/watch?v=spidtmUTUuo Continue reading “Build up a iPad Plarail Patrol with Arduino + OSC”