An intelligent Arduino control system that allows you to control Arduino devices using natural language through an AI-powered web interface. The system uses Google's Gemini AI to interpret commands and execute them on connected Arduino hardware.
- Natural Language Control: Control your Arduino using plain English commands
- Real-time Communication: Instant feedback and status updates
- Advanced LED Control:
- Basic on/off control
- Blinking with custom rates
- Fading effects
- Morse code display
- Custom patterns
- Pin Control: Digital and analog pin manipulation
- PWM Control: Precise PWM output control
- Servo Control: Servo motor positioning
- Custom Code Execution: Execute custom Arduino code dynamically
- Web Interface: Clean, responsive web UI with real-time status indicators
- Node.js (v14 or higher)
- Arduino IDE or compatible development environment
- Arduino board (tested with Arduino Uno)
- Google Gemini API key
- Connect your Arduino to your computer via USB
- The Arduino should appear as
/dev/ttyACM0on Linux systems - Upload the provided Arduino sketch to your board
-
Visit: arduino-control.ai π
-
Download Arduino Bridge for your OS:
-
Install & run the bridge on your computer
-
Connect Arduino via USB (bridge auto-detects it)
-
Get free API key from Google AI Studio π
-
Start controlling with natural language! π
-
Clone the repository:
git clone https://github.com/luka-loehr/arduino-ai-control.git cd arduino-ai-control/arduino-control-app -
Install dependencies:
npm install
-
Start the application:
npm start
-
Open browser β
http://localhost:3000 -
Follow setup wizard for automatic configuration
- Cloud Interface: Easy to use, no setup, always up-to-date
- Local Development: Full control, offline capable, development-friendly
Both options are 100% transparent with complete source code available!
Web browsers cannot access USB devices directly for security. The bridge runs locally on your computer and provides secure communication between your Arduino and the cloud AI service.
Nothing. No user accounts, no command logging, no usage analytics. Your API key stays in your browser memory only.
- Main Repository: https://github.com/luka-loehr/arduino-ai-control
- Arduino Bridge: https://github.com/luka-loehr/arduino-ai-control/tree/main/arduino-bridge
- Cloud Interface: https://github.com/luka-loehr/arduino-ai-control/tree/main/cloud-interface
- Transparency Doc: TRANSPARENCY.md
- β Open source - audit every line of code
- β Local bridge - your Arduino stays under your control
- β Encrypted communication - all data protected in transit
- β No data storage - nothing persisted on our servers
- β Your API key - never sent to our servers
- "Turn on the LED" / "Turn off the LED"
- "Make the LED blink fast" / "Blink slowly"
- "Fade the LED"
- "Show 'HELLO' in morse code"
- "Set pin 9 to output mode"
- "Write HIGH to pin 13"
- "Set PWM on pin 9 to 128"
- "Move servo on pin 6 to 90 degrees"
- "Execute: digitalWrite(13, HIGH)"
- "Run rainbow effect continuously"
arduino-ai/
βββ arduino-control-app/ # Main application
β βββ server.js # Express server with AI integration
β βββ public/
β β βββ index.html # Web interface
β βββ arduino-serial/
β β βββ arduino-serial.ino # Arduino firmware
β βββ package.json # Dependencies
β βββ .env # Environment variables
βββ package.json # Root package.json
βββ README.md # This file
POST /chat- Send natural language commands to the AIGET /led/state- Get current LED state
The Arduino firmware supports these serial commands:
ON/OFF- Basic LED controlEXEC:code- Execute single line of Arduino codeMULTI:lines:code- Execute multiple lines (separated by |)LOOP:code- Set code to run continuouslyRESET- Reset Arduino to default state
pinMode(pin, mode)digitalWrite(pin, value)analogWrite(pin, value)digitalRead(pin)analogRead(pin)delay(ms)setRGB(r, g, b)- RGB LED controlrainbow()- Rainbow effectfade(pin, speed)- Fading effectblink(pin, rate)- Blinking effect
- Ensure Arduino is connected via USB
- Check that it appears as
/dev/ttyACM0(Linux) or update the port inserver.js - Verify the Arduino sketch is uploaded correctly
- On Linux, you may need to add your user to the
dialoutgroup:sudo usermod -a -G dialout $USER - Log out and log back in for changes to take effect
- Ensure your Google Gemini API key is valid and has the necessary permissions
- Check that the
.envfile is in the correct location
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the ISC License.
For issues and questions, please open an issue on the GitHub repository.