Learn Hydruino - 10 Code Examples & CST Typing Practice Test
Hydruino is an educational platform combining Arduino-compatible microcontroller programming with hands-on hydraulic and robotic systems. It allows learners to control actuators, sensors, and fluidic systems through simple programming interfaces.
Learn HYDRUINO with Real Code Examples
Updated Nov 26, 2025
Code Sample Descriptions
Hello World LED Blink with Hydruino
#include <Hydruino.h>
void setup() {
pinMode(13, OUTPUT)
}
void loop() {
digitalWrite(13, HIGH)
delay(1000)
digitalWrite(13, LOW)
delay(1000)
}
A simple Hydruino sketch that blinks an LED connected to pin 13.
Button Press LED Control
#include <Hydruino.h>
void setup() {
pinMode(13, OUTPUT)
pinMode(2, INPUT_PULLUP)
}
void loop() {
if(digitalRead(2) == LOW) {
digitalWrite(13, HIGH)
} else {
digitalWrite(13, LOW)
}
}
Turns an LED on when a button connected to pin 2 is pressed.
PWM LED Brightness Fade
#include <Hydruino.h>
void setup() {
pinMode(9, OUTPUT)
}
void loop() {
for(int i=0; i<=255; i++) {
analogWrite(9, i)
delay(10)
}
for(int i=255; i>=0; i--) {
analogWrite(9, i)
delay(10)
}
}
Fades an LED in and out using PWM on pin 9.
Traffic Light Simulation
#include <Hydruino.h>
void setup() {
pinMode(8, OUTPUT)
pinMode(9, OUTPUT)
pinMode(10, OUTPUT)
}
void loop() {
digitalWrite(8, HIGH)
delay(3000)
digitalWrite(8, LOW)
digitalWrite(9, HIGH)
delay(1000)
digitalWrite(9, LOW)
digitalWrite(10, HIGH)
delay(3000)
digitalWrite(10, LOW)
}
Simulates a traffic light sequence with three LEDs on pins 8, 9, and 10.
Buzzer Tone Example
#include <Hydruino.h>
void setup() {
pinMode(6, OUTPUT)
}
void loop() {
tone(6, 440, 500)
delay(1000)
}
Plays a tone on a buzzer connected to pin 6.
Button Controlled Buzzer
#include <Hydruino.h>
void setup() {
pinMode(6, OUTPUT)
pinMode(2, INPUT_PULLUP)
}
void loop() {
if(digitalRead(2) == LOW) {
tone(6, 523)
} else {
noTone(6)
}
}
Turns on a buzzer while a button on pin 2 is pressed.
Servo Sweep
#include <Hydruino.h>
#include <Servo.h>
Servo myServo
void setup() {
myServo.attach(9)
}
void loop() {
for(int pos=0; pos<=180; pos++) {
myServo.write(pos)
delay(15)
}
for(int pos=180; pos>=0; pos--) {
myServo.write(pos)
delay(15)
}
}
Moves a servo connected to pin 9 back and forth.
Potentiometer LED Brightness
#include <Hydruino.h>
void setup() {
pinMode(9, OUTPUT)
}
void loop() {
int val = analogRead(A0)
analogWrite(9, val/4)
delay(10)
}
Controls LED brightness with a potentiometer on pin A0 and LED on pin 9.
RGB LED Cycle
#include <Hydruino.h>
void setup() {
pinMode(9, OUTPUT)
pinMode(10, OUTPUT)
pinMode(11, OUTPUT)
}
void loop() {
digitalWrite(9, HIGH)
delay(500)
digitalWrite(9, LOW)
digitalWrite(10, HIGH)
delay(500)
digitalWrite(10, LOW)
digitalWrite(11, HIGH)
delay(500)
digitalWrite(11, LOW)
}
Cycles through colors on an RGB LED using pins 9, 10, and 11.
Morse Code with LED
#include <Hydruino.h>
void setup() {
pinMode(13, OUTPUT)
}
void loop() {
// S: ...
for(int i=0;i<3;i++) {
digitalWrite(13, HIGH)
delay(250)
digitalWrite(13, LOW)
delay(250)
}
// O: ---
for(int i=0;i<3;i++) {
digitalWrite(13, HIGH)
delay(750)
digitalWrite(13, LOW)
delay(250)
}
// S: ...
for(int i=0;i<3;i++) {
digitalWrite(13, HIGH)
delay(250)
digitalWrite(13, LOW)
delay(250)
}
delay(2000)
}
Flashes an LED on pin 13 in Morse code for 'SOS'.
Frequently Asked Questions about Hydruino
What is Hydruino?
Hydruino is an educational platform combining Arduino-compatible microcontroller programming with hands-on hydraulic and robotic systems. It allows learners to control actuators, sensors, and fluidic systems through simple programming interfaces.
What are the primary use cases for Hydruino?
Teaching Arduino programming in a hands-on manner. Building hydraulic robotic models and experiments. Integrating electronics with fluidic/mechanical systems. STEM classroom projects and competitions. Exploring real-world automation concepts safely
What are the strengths of Hydruino?
Hands-on STEM learning. Bridges theory and practice. Encourages creative robotics and automation projects. Supports both beginners and advanced learners. Visual feedback with physical hardware interaction
What are the limitations of Hydruino?
Not a full industrial hydraulic platform. Limited scalability for large automation projects. Requires access to hardware kits. Programming complexity increases with larger projects. Dependent on Arduino ecosystem and sensors compatibility
How can I practice Hydruino typing speed?
CodeSpeedTest offers 10+ real Hydruino code examples for typing practice. You can measure your WPM, track accuracy, and improve your coding speed with guided exercises.