Make an Android phone app to control your littleBits projects

Lead Image © Kenny Kiernan, 123RF.com

App Your littleBits

, ,

Make a remote control paddleboat with the littleBits Arduino module, DC motors, and generic Bluetooth module and control the boat with a phone app that uses the MIT App Inventor package.

Before we settled on the paddleboat configuration we describe in this article, we tried a few different designs, so you should experiment to find out what works best for you. The most important thing about the design is the paddles: They need to be waterproof and long enough to touch the water. (See the "Parts" box for the supplies we used.)

Parts

For this project, we used:

  • 1 littleBits Arduino module [1]
  • 2 littleBits wires
  • 2 littleBits DC motors
  • 1 littleBits power module with battery or battery pack
  • 1 littleBits Proto module
  • 1 littleBits mounting board
  • 1 Bluetooth serial module ($6) [2]
  • 4 male-female jumper wires
  • Duct tape
  • Thin cardboard (cereal or cracker box)
  • Plastic container

Construction

The first step is to cut four rectangles out of thin cardboard (from cereal or cracker boxes). For our design, we used paddles that were 2x4.75 inches (5x12cm). We cut slits half way in each paddle blade, so that the two pieces would fit together (Figure 1). Next, we put the paddles into the littleBits DC Motor bit with the slotted motorMate attachment and covered them in duct tape. You need to make sure the cardboard is completely covered or it will get wet and break down.

Figure 1: Construction steps.

For the boat, we used a plastic container 6 inches (15cm) wide in which to fit the littleBits mounting plate (Figure 2). Duct tape on the bottom and sides of the littleBits mounting plate secured it to the plastic container. We found that our boat floated a little higher in the water than we wanted, so we added some weight by using 6 AA batteries for power (Figure 3).

Figure 2: The plastic container and mounting.
Figure 3: littleBits paddleboat.

littleBits Setup

A JY-MCU Bluetooth serial module handles communications between the littleBits hardware and an Android phone. Arduino Bluetooth communications typically take place on ports 0 and 1 (d0 and d1); however, we chose to use ports 10 and 11, because that required one less littleBits Proto module. (d0 and d1 each have their own snap bit at one end of the Arduino module, whereas d10 and d11 are pins that can be connected to the serial module via jumper wires.) This configuration left the default port (d0 and d1) free for debugging.

The Bluetooth module received power through the littleBits Proto module. If you don't have a Proto module, you could use an external 3V battery.

The wiring for the JY-MCU Bluetooth module was:

  • JY-MCU TX to littleBits Arduino pin 10
  • JY-MCU RX to littleBits Arduino pin 11
  • JY-MCU GND to Proto module GND pin (inflow pin)
  • JY-MCU VCC to Proto module VCC pin (outflow pin)

The littleBits DC Motors were wired on pins d5 and d9. These DC motors have a direction toggle. For the paddles to spin in the same direction, it is important to set one of the motor's direction toggles to left and the other to right (Figure 4).

Figure 4: littleBits circuit.

Buy this article as PDF

Express-Checkout as PDF

Pages: 6

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Build cool stuff with littleBits, a Pi, and some Lego Bricks

    Connect the littleBits Arduino module to a Raspberry Pi and you open a world of projects and a world of fun.

  • Control your littleBits projects with a homemade wireless remote

    Make a custom handheld wireless remote control with littleBits Wireless Transmitter and Receiver bits and slider, knob, button, or toggle bits.

  • Create a remote control motorized robot arm

    Use an Arduino Mega to manage a 4-motor robot arm and a 2-motor car chassis. The MIT App Inventor package was used to create an Android app that controlled-the robot.

  • New Products

    What's new in the SBC, IoT, and maker realm

  • Power to You

    Small-board computers (SBCs) are getting more and more powerful. The Raspberry Pi 3 (RPi3), which just came out in February of this year, is a case in point. This latest in the Rasp Pi line now has four cores running at 1200MHz with 1GB of RAM and on-board WiFi and Bluetooth. If you need even more power in a small computer, however, you are not left wanting. In this issue, we look at three SBCs with more cores, more memory, more ports, and more possibilities.