Download presentation
Presentation is loading. Please wait.
1
Raspberry Internet Rover Dipto Pratyaksa www.linuxcircle.com
2
Why did I create this? Physical computing
Why did I create this? Physical computing I wondered how codes can be translated into movements and vice-versa Sense the world via webcam and sensors
3
Why the Rover? Cat patrol
Why the Rover? Cat patrol I want to stare at my cat at home while I'm at work
4
Why the Rover? Cat patrol
Why the Rover? Cat patrol Watch her! Poke her! Run into her!
5
Plan it! Features: Move 8 directions + stop Light on / off Camera tilt
React to obstacles Feed camera remotely Access: Controlled remotely via web browser
6
Key Ingredient 1: 4WD Chasis
Key Ingredient 1: 4WD Chasis $45 4 motors Battery Pack 2 layers of platform 3 stands / holders
7
Key Ingredient 2: DFRobot Romeo Controller
Key Ingredient 2: DFRobot Romeo Controller $30 2 DC motor ports 5 Test buttons Several IO ports Power Supply input Micro USB port
8
Key Ingredient 3: Raspberry Pi
Key Ingredient 3: Raspberry Pi
9
Key Ingredient 4: Power Supply
Key Ingredient 4: Power Supply 5 V 2 Amps Micro USB port Anything large enough to run for 3 hours Be Eco-friendly: Solar Rechargeable
10
Key Ingredient 5: USB & other devices
Key Ingredient 5: USB & other devices USB Hub 4-7 ports Wipi = Wifi dongle USB cables Web cam Led Ultrasonic distance sensor
11
Let's Cook!
12
Assemble this!
13
The Recipe Assemble the 4WD Chassis kit
The Recipe Assemble the 4WD Chassis kit Connect motors to Romeo via 4 motor ports Connect Romeo to Raspberry Pi via USB port Prep your USB devices Prep your codes
14
Architecture The Controller: Arduino Script
Architecture The Controller: Arduino Script The Pi WebServer: NodeJS and PySerial The Client: HTML with CoffeScript
15
Arduino Script http://www.linuxcircle.com/
void advance(char a,char b) //Move forward { analogWrite (E1,a); //PWM Speed Control digitalWrite(M1,HIGH); analogWrite (E2,b); digitalWrite(M2,HIGH); direction = "forward"; } void turn_L (char a,char b) //Turn Left { analogWrite (E1,a); digitalWrite(M1,LOW); analogWrite (E2,b); digitalWrite(M2,HIGH); }
16
http://www.linuxcircle.com/ if(Serial.available()){
char val = Serial.read(); if(val != -1) { switch(val) case 'w'://Move Forward advance (200,200); //move forward in half (max speed 255) Serial.println("Forward"); break; case 'x'://Move Backward back_off (175,175); //move back in slow spee Serial.println("Reverse"); case 'a'://Turn Left turn_L (255,255); Serial.println("Left"); case 'd'://Turn Right turn_R (255,255); Serial.println("Right");
17
Datagram Server: Python Codes
Datagram Server: Python Codes Open Serial Ports Open Socket Connection on port: 9001 Listen for datagram commands from NodeJS Send command to Arduino via Serial Ports
18
WebServer NodeJS Codes
Host Client HTML code Listen for Socket connections on port 1338 Send instructions to Datagram Server on port 9001
19
The Client
20
Implement Additional Features
Implement Additional Features Webcam Blinking light Collision Detector Beeper
21
Other Applications House Surveillance Hobby Toy Field Surveyor Spying
Driver-less transportation Teach kids programming and robotics
22
Demo Log into the webserver 10.1.1.71:1338 via your smart phone!
Demo Log into the webserver :1338 via your smart phone!
23
Questions Codes are available on: www.linuxcircle.com
Questions Codes are available on:
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.