Back to Get Started
Remote Vehicle Control
The Remote Vehicle Control system allows you to operate your IoT car in real time from the dashboard. All control commands are sent through the panel topic dash_177xxxxxxxxxx. Your device receives these commands and controls movement, speed, lights, and horn accordingly.
dash_177xxxxxxxxxxHow It Works
- Create an account if you are a new user, or sign in if you already have an account.
- Create a new panel.
- Add widgets to the panel.
- Save the panel after adding widgets.
- Connect your hardware devices with the respective dashboard topic ID; values will be transmitted and displayed in the widgets.
Before You Start
Make sure your IoT car is connected to the same cloud as KiwisIoT. Your firmware must subscribe to dash_177xxxxxxxxxx and correctly handle incoming control messages. If using a dashboard remote widget, link it to the same topic. For setup help, refer to the documentation or contact support.
What you can control
DirectionForward, backward, left, right; STOP to halt.
SpeedSlider 0–10 for motor speed or throttle.
PowerON/OFF for the vehicle’s main power.
LightsHeadlights or indicator lights ON/OFF.
HornTrigger the horn with a single tap.
Tips
- ★ Sign in or create an account so you can create and save your remote vehicle panel.
- ★ Create a new panel from My Panels and name it (e.g. Remote car).
- ★ Add widgets: remote/joystick for direction, speed, power, lights, and horn.
- ★ Save the panel after adding widgets so your layout is stored.
- ★ Connect your IoT vehicle using the panel dashboard topic ID so control commands reach the device and status shows in the widgets.
IoT Car (ESP32 + KiwisIoT)
#include <KiwisIoT.h>
// ===== WIFI =====
const char* ssid = "IOT";
const char* pass = "12345678";
const char* topic = "dash_1772000574792";
KiwisIoT kiwisiot(ssid, pass, topic);
// ===== MOTOR PINS =====
#define IN1 D3 // Left motor
#define IN2 D4
#define IN3 D5 // Right motor
#define IN4 D6
#define LIGHT_PIN D1
#define HORN_PIN D2
int powerState = 0; // 0 = OFF , 1 = ON
// -------- MOTOR CONTROL --------
void motorForward() {
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW);
}
void motorReverse() {
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
}
void motorRight() {
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
}
void motorLeft() {
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW);
}
void motorStop() {
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, LOW);
}
// -------- IOT CONTROL --------
void onControl(String ch, String val) {
if (ch != "0") return;
Serial.println(val);
// -------- POWER --------
if (val == "power:1") {
powerState = 1;
Serial.println("Power ON");
return;
}
if (val == "power:0") {
powerState = 0;
motorStop();
Serial.println("Power OFF");
return;
}
// -------- LIGHT --------
if (val == "lights:1") {
digitalWrite(LIGHT_PIN, HIGH);
return;
}
if (val == "lights:0") {
digitalWrite(LIGHT_PIN, LOW);
return;
}
// -------- HORN --------
if (val == "horn") {
digitalWrite(HORN_PIN, HIGH);
delay(300);
digitalWrite(HORN_PIN, LOW);
return;
}
// -------- MOVEMENT --------
if (powerState == 0) return;
if (val == "forward") motorForward();
else if (val == "back") motorReverse();
else if (val == "right") motorRight();
else if (val == "left") motorLeft();
else if (val == "stop") motorStop();
}
// -------- SETUP --------
void setup() {
Serial.begin(115200);
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
pinMode(LIGHT_PIN, OUTPUT);
pinMode(HORN_PIN, OUTPUT);
motorStop();
kiwisiot.begin();
kiwisiot.onReceive(onControl);
}
// -------- LOOP --------
void loop() {
kiwisiot.run();
}