GPS speedometer and clock
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Shop by category
Shop all componentsSwitch three LEDs on and off individually from a phone app, and read back the state of each one. Uppercase turns an LED on and lowercase turns it off, a small design decision that makes the protocol readable and halves the number of commands to remember. The LED pins sit in an array so the same three lines of code handle all of them, and the state array remembers what is currently on so the board can answer a status request. Pairing is a one- time step: once your phone knows the HC-05, any serial terminal app can send these letters.
Every part for this build comes in the Geekobot Explorer Kit box, a Geekobot exclusive, together with the parts for all 61 projects, from a first blinking LED to a smart fan and a reaction game. The wiring below is the kit's own wiring.
Tick anything you already have and the total updates.
The brain of every Explorer Kit project
Male-to-female and female-to-female leads for the modules
LEDs from the kit's red, green, yellow and blue packs
220 ohm resistors: one in series with every LED segment
HC-05 Bluetooth module: a serial link to your phone
1k and 2.2k resistors: drop the Nano's 5V TX signal to the 3.3V the HC-05 RXD pin expects
Nano I/O shield from the kit: every pin has its own S, V, G header, so modules plug in with jumpers
Follow the colours: red is power, dark grey is ground, blue is a signal.
explorer_kit_44_bluetooth_led_controller.inoVerify & upload in Electrolark#include <SoftwareSerial.h>
SoftwareSerial bt(2, 3);
int ledPins[3] = {5, 6, 7};
String ledNames[3] = {"RED", "YELLOW", "GREEN"};
bool ledState[3] = {false, false, false};
void applyState()
{
for (int i = 0; i < 3; i++)
{
digitalWrite(ledPins[i], ledState[i]);
}
}
void reportState()
{
for (int i = 0; i < 3; i++)
{
bt.print(ledNames[i]);
bt.print(": ");
if (ledState[i])
{
bt.println("ON");
}
else
{
bt.println("OFF");
}
}
}
void setup()
{
for (int i = 0; i < 3; i++)
{
pinMode(ledPins[i], OUTPUT);
}
bt.begin(9600);
Serial.begin(9600);
applyState();
bt.println("Send R G Y to turn on, r g y to turn off, ? for status");
}
void loop()
{
if (!bt.available())
{
return;
}
char command = bt.read();
Serial.println(command);
if (command == 'R') ledState[0] = true;
else if (command == 'r') ledState[0] = false;
else if (command == 'Y') ledState[1] = true;
else if (command == 'y') ledState[1] = false;
else if (command == 'G') ledState[2] = true;
else if (command == 'g') ledState[2] = false;
else if (command == 'A') { ledState[0] = true; ledState[1] = true; ledState[2] =
true; }
else if (command == 'a') { ledState[0] = false; ledState[1] = false; ledState[2]
= false; }
else if (command == '?') { reportState(); return; }
applyState();
}
Use the kit's mini-USB cable, install the CH340 driver on Windows if no port appears, pick Tools > Board > Arduino Nano and try Tools > Processor > ATmega328P (Old Bootloader) if the upload times out.
Turn it round: the long leg (anode) goes to the pin side through the 220 ohm resistor, the short leg to GND.
Pair with the HC-05 using PIN 1234 (or 0000), then connect in a Bluetooth serial terminal app. Unplug TXD and RXD while uploading.
Uppercase turns an LED on and lowercase turns it off, a small design decision that makes the protocol readable and halves the number of commands to remember. The LED pins sit in an array so the same three lines of code handle all of them, and the state array remembers what is currently on so the board can answer a status request. Pairing is a one- time step: once your phone knows the HC-05, any serial terminal app can send these letters.
The phone receives the command list when the board starts. Send R and the red LED lights; send r and it goes out. Send A to light all three, a to clear them.
Yes. It is project 44 of 61 in the Geekobot Explorer Kit, in level 8 (Wireless control). Every part on the list comes in the kit box, and you can also buy the parts one by one from the list above.
No. Every Explorer Kit project is wired on the Nano I/O shield and the breadboard with jumper wires.
9 parts: Generic Nano CH340 Development Board (Soldered), USB Cable, Solderless Breadboard, Dupont Jumper Wires (40 pcs), Through-Hole LED Pack (Pack of 10), Carbon Film Resistor 1/4W 5% (Pack of 10), HC-05 6-Pin Bluetooth Serial Module with Button, Carbon Film Resistor 1/4W 5% (Pack of 10) and Arduino Nano IO Expansion Shield (328P Compatible). On this page you can tick the parts you already have and add only the rest to your cart.
It is a intermediate project and takes about 45 minutes. The build on this page has 5 steps.
No. This page has the complete, tested code (explorer_kit_44_bluetooth_led_controller.ino).
About ₹671 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Smartphone serial pairing; Designing a readable command protocol; Keeping device state in an array; Answering a status query over the same link.
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Records where you went every five seconds, ready to open on a map.
Two boards, two radios: press the button at the gate and it rings indoors.
Check temperature, humidity and pressure from any phone on your Wi-Fi.
Learning project. Check every circuit and the datasheet of each part before you power it up.