On your laptop, connect to the Robo wireless network (password provided by your teachers), open the Terminal app, and type:
ssh student@192.168.21.XXX
...where XXX is the number of your RoboPi (robo-XXX)
SSH Password: Engineering!1
You will be using SSH to remotely control the robot. Use the code from the BSMRKRS robo-control repository.
...where XXX is the number of your RoboPi (robo-XXX)
For more information visit D3v3lopment Notes
For examples clone robo-web
https://github.com/BSMRKRS/robotonomy
This code has examples for using sensors and sending feedback to the web interface.
Start the camera:
/home/student/start_camera.sh &
Stop the camera:
/home/student/stop_camera.sh
View the camera:
*If the camera becomes delayed on the stream, just refresh the page
Read through this tutorial on using the shell: http://ryanstutorials.net/linuxtutorial/navigation.php
Then see more Here
Important Pin Info:
Correct Pin Numbers (Mikronauts's Pin Labeling is incorrect):
Servos are controlled by electrical pulses (PWM)
1.5 pulse makes it turn 90°, less than that will make it go to 0°, more will go to 180°
Servos except a pulse every 20ms → 50 pulses per second or Hz
RPL.servoWrite(0, 1500)
RPL.servoWrite(1, 1500) # 1500 in y value → makes motors even
RPL.servoWrite(0, 0)
RPL.servoWrite(0, 0) # 0 in y value actually stops it
1 = right motor
0= left motor
0,1400: moves forward
0,1600: moves backward
1,1600: moves forward
1,1400: move backward
(Must be run in 'RoboPi_controller' file)
*If this command does not work, you may have to update the pi it's running on*
RPL.pwmWrite(pin, motor_speed, motor_speed * 2) #first input is the pin number, second input is the 'on' value for electral pulses, third input it the total amount of electrical inputs given to the motor
This example code shows how to control both motors at the same time. Everything bolded is instructions; switch out the words READING and SPEED for actual readings and speeds. Remember, there are only 2 readings: 1 and 0. When dealing with speeds, use 0 instead of 1500 to make the motor stop. This generally works better.