├── .gitattributes ├── .gitignore ├── Assembly_and_Programming ├── GoPiGo1 │ ├── dexterindustries.com-0 GoPiGo Tutorials amp Documentation.pdf │ ├── dexterindustries.com-1 Assemble the GoPiGo.pdf │ ├── dexterindustries.com-2 SD Card.pdf │ ├── dexterindustries.com-3 Power Up.pdf │ ├── dexterindustries.com-4 Connect to the GoPiGo.pdf │ └── dexterindustries.com-5 Using your GoPiGo for the first time.pdf ├── GoPiGo2 │ ├── Assembly_and_Getting_Started │ │ ├── dexterindustries.com-5 Update Software for the GoPiGo2.pdf │ │ ├── dexterindustries.com-Add trim to the motors.pdf │ │ ├── dexterindustries.com-Assemble the GoPiGo.pdf │ │ ├── dexterindustries.com-Assemble the Servo Package.pdf │ │ ├── dexterindustries.com-Attaching a Camera or Ultrasonic Sensor.pdf │ │ └── dexterindustries.com-Get Started With the GoPiGo.pdf │ ├── Programming │ │ ├── Python │ │ │ ├── dexterindustries.com-Disable communication timeout on the GoPiGo.pdf │ │ │ ├── dexterindustries.com-Enable communication timeout on the GoPiGo.pdf │ │ │ ├── dexterindustries.com-Installing the GoPiGo Python Library.pdf │ │ │ ├── dexterindustries.com-Read communication timeoutnbspstatus.pdf │ │ │ ├── dexterindustries.com-Read encoder targeting status.pdf │ │ │ ├── dexterindustries.com-Read encoder values.pdf │ │ │ ├── dexterindustries.com-Read status register on the GoPiGo.pdf │ │ │ ├── dexterindustries.com-bwd.pdf │ │ │ ├── dexterindustries.com-decrease_speed.pdf │ │ │ ├── dexterindustries.com-disable_encoders.pdf │ │ │ ├── dexterindustries.com-disable_servo.pdf │ │ │ ├── dexterindustries.com-enable_encoders.pdf │ │ │ ├── dexterindustries.com-enable_servo.pdf │ │ │ ├── dexterindustries.com-enc_tgt.pdf │ │ │ ├── dexterindustries.com-fw_ver.pdf │ │ │ ├── dexterindustries.com-fwd.pdf │ │ │ ├── dexterindustries.com-increase_speed.pdf │ │ │ ├── dexterindustries.com-led DEPRECATED.pdf │ │ │ ├── dexterindustries.com-led_off.pdf │ │ │ ├── dexterindustries.com-led_on.pdf │ │ │ ├── dexterindustries.com-left.pdf │ │ │ ├── dexterindustries.com-left_rot.pdf │ │ │ ├── dexterindustries.com-motor_bwd.pdf │ │ │ ├── dexterindustries.com-motor_fwd.pdf │ │ │ ├── dexterindustries.com-right.pdf │ │ │ ├── dexterindustries.com-right_rot.pdf │ │ │ ├── dexterindustries.com-servo.pdf │ │ │ ├── dexterindustries.com-set_left_speed.pdf │ │ │ ├── dexterindustries.com-set_right_speed.pdf │ │ │ ├── dexterindustries.com-set_speed.pdf │ │ │ ├── dexterindustries.com-stop.pdf │ │ │ ├── dexterindustries.com-us_dist.pdf │ │ │ └── dexterindustries.com-volt.pdf │ │ ├── dexterindustries.com-Python Programming.pdf │ │ └── dexterindustries.com-Scratch Programming.pdf │ └── dexterindustries.com-Troubleshooting GoPiGo2.pdf └── README.md ├── Firmware ├── Firmware_version.txt ├── Old HEX │ ├── fw_ver_10.cpp.hex │ ├── fw_ver_11.cpp.hex │ ├── fw_ver_13.cpp.hex │ └── integ_fw_1.cpp.hex ├── README.md ├── SoftwareServo │ ├── SoftwareServo.cpp │ ├── SoftwareServo.h │ ├── examples │ │ └── SerialServo │ │ │ └── SerialServo.pde │ └── keywords.txt ├── firmware_update.sh ├── fw_ver_10 │ └── fw_ver_10.ino ├── fw_ver_11 │ └── fw_ver_11.ino ├── fw_ver_12 │ └── fw_ver_12.ino ├── fw_ver_13 │ ├── firmware_update_13.sh │ ├── fw_ver_13.cpp.hex │ └── fw_ver_13.ino ├── fw_ver_14 │ ├── IRSendRev.cpp │ ├── IRSendRev.h │ ├── IRSendRevInt.h │ ├── README.md │ ├── firmware_update_14.sh │ ├── fw_ver_14.cpp.hex │ └── fw_ver_14.ino ├── fw_ver_15 │ ├── README.md │ ├── SoftwareServo.cpp │ ├── SoftwareServo.h │ ├── firmware_update_15.sh │ ├── fw_ver_15.cpp.hex │ └── fw_ver_15.ino ├── fw_ver_16.cpp.hex ├── fw_ver_16 │ ├── README.md │ ├── SoftwareServo.cpp │ ├── SoftwareServo.h │ ├── firmware_update_16.sh │ ├── fw_ver_16.cpp.hex │ └── fw_ver_16.ino ├── gopigo_firmware_update.sh └── old │ ├── encoder_interrupt │ └── encoder_interrupt.ino │ ├── encoder_targetting1 │ └── encoder_targetting1.ino │ ├── encoder_test_led │ └── encoder_test_led.ino │ ├── encoder_testoct22b │ └── encoder_testoct22b.ino │ ├── fw_ver_9 │ └── fw_ver_9.ino │ ├── grove_connectors │ └── grove_connectors.ino │ ├── linesensortest │ └── linesensortest.ino │ ├── motor_battery_level_test │ └── motor_battery_level_test.ino │ ├── motor_encoder │ └── motor_encoder.ino │ ├── motor_encoder1 │ └── motor_encoder1.ino │ ├── motor_i2c │ └── motor_i2c.ino │ ├── motor_i2c_1 │ └── motor_i2c.ino │ ├── motor_integ_i2c_1 │ └── motor_integ_i2c_1.ino │ ├── motor_oct22d │ └── motor_oct22d.ino │ ├── motor_pid3 │ └── motor_pid3.ino │ ├── move_Forward_sweep_servo │ └── move_Forward_sweep_servo.ino │ ├── robot_integ_i2c │ ├── bkp │ ├── bkp2 │ └── robot_integ_i2c.ino │ ├── robot_integration │ └── robot_integration.ino │ ├── robot_move_with_servo │ └── robot_move_with_servo.ino │ └── servo_test │ └── servo_test.ino ├── GoPiGo_Chassis-300.jpg ├── GoPiGo_Front_Facing_Camera300.jpg ├── Hardware ├── GoPiGo_16_schematics.pdf └── README.md ├── Projects ├── AgentKK │ ├── README.md │ ├── ReadyToGuardYourDoor.png │ ├── agentKK.py │ ├── agentKK.sb │ └── yells.mp3 ├── Alexabot │ ├── README.md │ └── alexabot-flask-app.py ├── Empathybot │ ├── Emotions.jpg │ ├── Empathybot.jpg │ ├── README.md │ └── empathybot.py ├── GiftBot │ ├── README.md │ └── deer.py └── README.md ├── README.md ├── Setup ├── README.md ├── gopigo ├── install.sh └── update_gopigo.sh ├── Software ├── C │ ├── CMakeLists.txt │ ├── README.md │ ├── basic_test_all.c │ ├── cmake │ │ ├── gopigoConfig.cmake.in │ │ └── gopigoConfigVersion.cmake.in │ ├── gopigo │ ├── gopigo.c │ ├── gopigo.h │ ├── gopigo.pc.in │ └── line_follower │ │ ├── README.md │ │ ├── line_sensor.c │ │ ├── line_sensor.h │ │ └── sensor_read.c ├── CSharp │ ├── .gitattributes │ ├── .gitignore │ ├── Driver │ │ ├── Assets │ │ │ ├── LockScreenLogo.scale-200.png │ │ │ ├── SplashScreen.scale-200.png │ │ │ ├── Square150x150Logo.scale-200.png │ │ │ ├── Square44x44Logo.scale-200.png │ │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ │ ├── StoreLogo.png │ │ │ └── Wide310x150Logo.scale-200.png │ │ ├── Driver.csproj │ │ ├── Package.appxmanifest │ │ ├── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ ├── StartupTask.cs │ │ ├── project.json │ │ └── project.lock.json │ ├── GoPiGo.sln │ ├── GoPiGo │ │ ├── Commands.cs │ │ ├── Constants.cs │ │ ├── DeviceFactory.cs │ │ ├── EncoderController.cs │ │ ├── GoPiGo.cs │ │ ├── GoPiGo.csproj │ │ ├── Motor.cs │ │ ├── MotorController.cs │ │ ├── Pin.cs │ │ ├── PinMode.cs │ │ ├── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ └── GoPiGo.rd.xml │ │ ├── Sensors │ │ │ ├── Led.cs │ │ │ ├── SensorStatus.cs │ │ │ ├── Sensorcs.cs │ │ │ └── UltrasonicRangerSensor.cs │ │ ├── State.cs │ │ ├── project.json │ │ └── project.lock.json │ ├── README.md │ └── packages │ │ └── System.Numerics.Vectors.4.0.0 │ │ ├── License-Stable.rtf │ │ ├── System.Numerics.Vectors.4.0.0.nupkg │ │ ├── [Content_Types].xml │ │ └── lib │ │ ├── portable-net45+win8+wpa81 │ │ ├── System.Numerics.Vectors.dll │ │ └── System.Numerics.Vectors.xml │ │ └── win8 │ │ ├── System.Numerics.Vectors.WindowsRuntime.dll │ │ ├── System.Numerics.Vectors.WindowsRuntime.xml │ │ ├── System.Numerics.Vectors.dll │ │ └── System.Numerics.Vectors.xml ├── Client_Server │ ├── README.md │ ├── cli.py │ └── serv.py ├── Java │ ├── README.md │ ├── config │ │ └── default.properties │ ├── doc │ │ ├── allclasses-frame.html │ │ ├── allclasses-noframe.html │ │ ├── com │ │ │ └── dexterind │ │ │ │ └── gopigo │ │ │ │ ├── Gopigo.html │ │ │ │ ├── GopigoListener.html │ │ │ │ ├── behaviours │ │ │ │ ├── Motion.html │ │ │ │ ├── class-use │ │ │ │ │ └── Motion.html │ │ │ │ ├── package-frame.html │ │ │ │ ├── package-summary.html │ │ │ │ ├── package-tree.html │ │ │ │ └── package-use.html │ │ │ │ ├── class-use │ │ │ │ ├── Gopigo.html │ │ │ │ └── GopigoListener.html │ │ │ │ ├── components │ │ │ │ ├── Board.html │ │ │ │ ├── Encoders.html │ │ │ │ ├── IRReceiverSensor.html │ │ │ │ ├── Led.html │ │ │ │ ├── Motor.html │ │ │ │ ├── Servo.html │ │ │ │ ├── UltraSonicSensor.html │ │ │ │ ├── class-use │ │ │ │ │ ├── Board.html │ │ │ │ │ ├── Encoders.html │ │ │ │ │ ├── IRReceiverSensor.html │ │ │ │ │ ├── Led.html │ │ │ │ │ ├── Motor.html │ │ │ │ │ ├── Servo.html │ │ │ │ │ └── UltraSonicSensor.html │ │ │ │ ├── package-frame.html │ │ │ │ ├── package-summary.html │ │ │ │ ├── package-tree.html │ │ │ │ └── package-use.html │ │ │ │ ├── events │ │ │ │ ├── StatusEvent.html │ │ │ │ ├── VoltageEvent.html │ │ │ │ ├── class-use │ │ │ │ │ ├── StatusEvent.html │ │ │ │ │ └── VoltageEvent.html │ │ │ │ ├── package-frame.html │ │ │ │ ├── package-summary.html │ │ │ │ ├── package-tree.html │ │ │ │ └── package-use.html │ │ │ │ ├── package-frame.html │ │ │ │ ├── package-summary.html │ │ │ │ ├── package-tree.html │ │ │ │ ├── package-use.html │ │ │ │ └── utils │ │ │ │ ├── Commands.html │ │ │ │ ├── Debug.html │ │ │ │ ├── Statuses.html │ │ │ │ ├── class-use │ │ │ │ ├── Commands.html │ │ │ │ ├── Debug.html │ │ │ │ └── Statuses.html │ │ │ │ ├── package-frame.html │ │ │ │ ├── package-summary.html │ │ │ │ ├── package-tree.html │ │ │ │ └── package-use.html │ │ ├── constant-values.html │ │ ├── deprecated-list.html │ │ ├── help-doc.html │ │ ├── index-all.html │ │ ├── index-files │ │ │ ├── index-1.html │ │ │ ├── index-10.html │ │ │ ├── index-11.html │ │ │ ├── index-12.html │ │ │ ├── index-13.html │ │ │ ├── index-14.html │ │ │ ├── index-15.html │ │ │ ├── index-16.html │ │ │ ├── index-17.html │ │ │ ├── index-18.html │ │ │ ├── index-19.html │ │ │ ├── index-2.html │ │ │ ├── index-3.html │ │ │ ├── index-4.html │ │ │ ├── index-5.html │ │ │ ├── index-6.html │ │ │ ├── index-7.html │ │ │ ├── index-8.html │ │ │ └── index-9.html │ │ ├── index.html │ │ ├── overview-frame.html │ │ ├── overview-summary.html │ │ ├── overview-tree.html │ │ ├── package-list │ │ ├── resources │ │ │ └── inherit.gif │ │ ├── script.js │ │ ├── serialized-form.html │ │ └── stylesheet.css │ ├── scripts │ │ ├── Test.sh │ │ └── compile.sh │ ├── src │ │ └── com │ │ │ └── dexterind │ │ │ └── gopigo │ │ │ ├── Gopigo.java │ │ │ ├── GopigoListener.java │ │ │ ├── behaviours │ │ │ └── Motion.java │ │ │ ├── components │ │ │ ├── Board.java │ │ │ ├── Encoders.java │ │ │ ├── IRReceiverSensor.java │ │ │ ├── Led.java │ │ │ ├── Motor.java │ │ │ ├── Servo.java │ │ │ └── UltraSonicSensor.java │ │ │ ├── events │ │ │ ├── StatusEvent.java │ │ │ └── VoltageEvent.java │ │ │ └── utils │ │ │ ├── Commands.java │ │ │ ├── Debug.java │ │ │ └── Statuses.java │ └── test │ │ ├── Test.java │ │ └── tests │ │ └── GopigoCommanderTest.java ├── NodeJS │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── libs │ │ ├── .gitignore │ │ ├── README.md │ │ ├── behaviours │ │ │ └── motion.js │ │ ├── commands.js │ │ ├── components │ │ │ ├── IRReceiverSensor.js │ │ │ ├── board.js │ │ │ ├── encoders.js │ │ │ ├── led.js │ │ │ ├── motor.js │ │ │ ├── servo.js │ │ │ └── ultraSonicSensor.js │ │ ├── gopigo.js │ │ ├── index.js │ │ └── package.json │ └── tests │ │ └── basicTest.js ├── Python │ ├── Examples │ │ ├── Basic_Robot_Control │ │ │ ├── Basic_Raspberry_Pi_Robot_Control.jpg │ │ │ ├── README.md │ │ │ └── basic_robot.py │ │ ├── Basic_Robot_Control_GUI │ │ │ ├── Basic_Raspberry_Pi_Robot_Control_GUI.jpg │ │ │ ├── README.md │ │ │ └── basic_robot_gui.py │ │ ├── Basic_Servo │ │ │ ├── README.md │ │ │ └── basic_servo.py │ │ ├── Browser_Streaming_Robot │ │ │ ├── COPYING │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── Raspberry_Pi_Camera_controlled-by-mobile-browser.jpg │ │ │ ├── Raspberry_Pi_Camera_streaming-to-computer-browser.jpg │ │ │ ├── Raspberry_Pi_Camera_streaming-to-mobile-browser.jpg │ │ │ ├── browser_stream_setup.sh │ │ │ ├── camera_streamer.py │ │ │ ├── robot_controller.py │ │ │ ├── robot_web_server.py │ │ │ └── www │ │ │ │ ├── config.html │ │ │ │ ├── css │ │ │ │ ├── config.css │ │ │ │ ├── modal.css │ │ │ │ └── style.css │ │ │ │ ├── images │ │ │ │ └── ajax-loader.gif │ │ │ │ ├── index.html │ │ │ │ ├── js │ │ │ │ ├── jquery.joystick.js │ │ │ │ ├── jquery.js │ │ │ │ └── sockjs-0.3.min.js │ │ │ │ └── logs.html │ │ ├── Compass_Robot │ │ │ ├── README.md │ │ │ └── compass_bot.py │ │ ├── Find_Hole │ │ │ ├── README.md │ │ │ ├── control.py │ │ │ └── findhole.py │ │ ├── GPS_Bot │ │ │ ├── README.md │ │ │ ├── gps.py │ │ │ └── gps_hardware_test.py │ │ ├── GPS_Guided_Robot │ │ │ ├── GPS_Guided_Robot.py │ │ │ ├── README.md │ │ │ └── gps_hardware_test.py │ │ ├── Gamepad │ │ │ ├── Readme.md │ │ │ ├── gamepad.py │ │ │ ├── gpg_and_f710.jpg │ │ │ └── show_buttons.py │ │ ├── LED_Blink │ │ │ ├── README.md │ │ │ ├── grove_port_led_blink.py │ │ │ └── led_blink.py │ │ ├── Mouse_Control │ │ │ ├── GoPiGo-Mouse-Control-with-Raspberry-Pi.jpg │ │ │ ├── README.md │ │ │ ├── mouse_control_buttons.py │ │ │ └── mouse_control_movement.py │ │ ├── Office_Cannon │ │ │ ├── Office-cannon-with-raspberry-pi.jpg │ │ │ ├── README.md │ │ │ ├── office_cannon_v1.py │ │ │ └── old_source │ │ │ │ ├── USBshooter.py │ │ │ │ └── old_mouse.py │ │ ├── PS3_Control │ │ │ ├── PS3-controller-for-raspberry-pi.jpg │ │ │ ├── Readme.md │ │ │ ├── ps3.py │ │ │ ├── ps3_gpg_example.py │ │ │ └── sixpair │ │ ├── README.md │ │ ├── Streaming_Video_Example │ │ │ ├── README.md │ │ │ ├── stream_end.sh │ │ │ └── stream_start.sh │ │ ├── Ultrasonic_Basic_Obstacle_Avoider │ │ │ ├── README.md │ │ │ └── basic_obstacle_avoid.py │ │ └── Ultrasonic_Servo │ │ │ ├── README.md │ │ │ └── us_servo_scan.py │ ├── README.md │ ├── basic_test_all.py │ ├── control_panel │ │ ├── GoPiGo.png │ │ ├── control_panel_gui.py │ │ └── gopigo_control_panel.desktop │ ├── easygopigo.py │ ├── enc_val_read.py │ ├── gopigo.py │ ├── hardware_test.py │ ├── hardware_test_2.py │ ├── ir_remote_control │ │ ├── README.md │ │ ├── debugging │ │ │ └── ir_debug_logger.py │ │ ├── examples │ │ │ ├── gopigo_ir_control_bot.py │ │ │ ├── ir_recv_example.py │ │ │ └── lirc_example.py │ │ ├── lirc │ │ │ ├── hardware_copy.conf │ │ │ ├── install.sh │ │ │ ├── ir_install_manually.sh │ │ │ ├── lircd_keyes.conf │ │ │ ├── lircrc_keyes │ │ │ └── setup_older_version.sh │ │ └── server │ │ │ ├── di_ir_reader.py │ │ │ ├── install.sh │ │ │ ├── ir-server.service │ │ │ ├── ir_receiver.py │ │ │ └── setup.py │ ├── other_scripts │ │ ├── Mouse_Control_example.py │ │ ├── bvt.py │ │ ├── demo.py │ │ ├── enc_tgt.py │ │ ├── encoder_tgt_complete_test.py │ │ ├── gopigo_status.py │ │ ├── gps.py │ │ ├── gps.py.save │ │ ├── individual_motor_control.py │ │ ├── led_test.py │ │ ├── linesensor.py │ │ ├── ls.py │ │ ├── motor_speech.py │ │ ├── motortest.py │ │ ├── mouse_controll.py │ │ ├── serial_comm.py │ │ ├── servo_test.py │ │ ├── stop.py │ │ ├── streaming_video_example_firmware │ │ │ ├── motor_i2c.ino │ │ │ ├── motor_i2c │ │ │ │ └── motor_i2c.ino │ │ │ └── motortest.py │ │ ├── tts.py │ │ ├── tts1.py │ │ └── us_test1.py │ ├── requirements.txt │ ├── sensor_examples │ │ ├── dht │ │ │ └── Adafruit_Python_DHT │ │ │ │ ├── .github │ │ │ │ ├── ISSUE_TEMPLATE.md │ │ │ │ └── PULL_REQUEST_TEMPLATE.md │ │ │ │ ├── .gitignore │ │ │ │ ├── Adafruit_DHT │ │ │ │ ├── Beaglebone_Black.py │ │ │ │ ├── Raspberry_Pi.py │ │ │ │ ├── Raspberry_Pi_2.py │ │ │ │ ├── Test.py │ │ │ │ ├── __init__.py │ │ │ │ ├── common.py │ │ │ │ └── platform_detect.py │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── examples │ │ │ │ ├── AdafruitDHT.py │ │ │ │ ├── google_spreadsheet.py │ │ │ │ └── simpletest.py │ │ │ │ ├── ez_setup.py │ │ │ │ ├── setup.py │ │ │ │ └── source │ │ │ │ ├── Beaglebone_Black │ │ │ │ ├── bbb_dht_read.c │ │ │ │ ├── bbb_dht_read.h │ │ │ │ ├── bbb_mmio.c │ │ │ │ └── bbb_mmio.h │ │ │ │ ├── Raspberry_Pi │ │ │ │ ├── pi_dht_read.c │ │ │ │ ├── pi_dht_read.h │ │ │ │ ├── pi_mmio.c │ │ │ │ └── pi_mmio.h │ │ │ │ ├── Raspberry_Pi_2 │ │ │ │ ├── pi_2_dht_read.c │ │ │ │ ├── pi_2_dht_read.h │ │ │ │ ├── pi_2_mmio.c │ │ │ │ └── pi_2_mmio.h │ │ │ │ ├── Test │ │ │ │ ├── test_dht_read.c │ │ │ │ └── test_dht_read.h │ │ │ │ ├── _Beaglebone_Black_Driver.c │ │ │ │ ├── _Raspberry_Pi_2_Driver.c │ │ │ │ ├── _Raspberry_Pi_Driver.c │ │ │ │ ├── _Test_Driver.c │ │ │ │ ├── common_dht_read.c │ │ │ │ └── common_dht_read.h │ │ ├── grove_analog_read.py │ │ ├── grove_button.py │ │ ├── grove_distance_sensor.py │ │ ├── grove_led_blink.py │ │ ├── grove_led_fade.py │ │ ├── grove_motion_sensor.py │ │ ├── grove_temp_humidity_example.py │ │ └── grove_temperature_sensor.py │ ├── setup.py │ └── tests │ │ ├── enc_test.py │ │ ├── enc_tgt_test.py │ │ ├── firmware_version_cpu_test.py │ │ ├── servo_test.py │ │ ├── speed_test.py │ │ ├── test_mutex.py │ │ ├── timeout_response_test.py │ │ └── timeout_test.py ├── README.md └── Scratch │ ├── Examples │ ├── GoPiGo control_panel.sb │ ├── GoPiGo_Basic_test.sb │ ├── GoPiGo_DHT_MarsRover.sb │ ├── GoPiGo_IR_Remote_Example.sb │ ├── GoPiGo_Ultrasonic_radar.sb │ ├── Line_Follower_Example.sb │ ├── Scratch Sensor Read Example.sb │ └── icons │ │ ├── arrow89.png │ │ ├── fast19.png │ │ ├── light59.png │ │ ├── off.png │ │ └── stop.png │ ├── GoPiGoScratch.py │ ├── GoPiGo_Ports-Bottom.jpg │ ├── GoPiGo_Ports-Top.jpg │ ├── GoPiGo_Scratch_Scripts │ ├── GoPiGoScratch_debug.sh │ ├── GoPiGo_Scratch_Start.desktop │ ├── GoPiGo_Scratch_Start.sh │ ├── README.md │ └── Scratch_setup.txt │ ├── readme.md │ └── scratch_functions.png └── Troubleshooting ├── README.md ├── all_tests.sh ├── avrdude_test.sh ├── complete_test.sh ├── firmware_version_test.sh ├── i2c_test1.sh ├── motor_enc_led_test.sh └── software_status.sh /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=lf 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | 24 | .sh text eol=lf 25 | .py text eol=lf 26 | .md text eol=lf 27 | .txt text eol=lf 28 | .html text eol=lf 29 | .java text eol=lf 30 | .c text eol=lf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo1/dexterindustries.com-0 GoPiGo Tutorials amp Documentation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo1/dexterindustries.com-0 GoPiGo Tutorials amp Documentation.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo1/dexterindustries.com-1 Assemble the GoPiGo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo1/dexterindustries.com-1 Assemble the GoPiGo.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo1/dexterindustries.com-2 SD Card.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo1/dexterindustries.com-2 SD Card.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo1/dexterindustries.com-3 Power Up.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo1/dexterindustries.com-3 Power Up.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo1/dexterindustries.com-4 Connect to the GoPiGo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo1/dexterindustries.com-4 Connect to the GoPiGo.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo1/dexterindustries.com-5 Using your GoPiGo for the first time.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo1/dexterindustries.com-5 Using your GoPiGo for the first time.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Assembly_and_Getting_Started/dexterindustries.com-5 Update Software for the GoPiGo2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Assembly_and_Getting_Started/dexterindustries.com-5 Update Software for the GoPiGo2.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Assembly_and_Getting_Started/dexterindustries.com-Add trim to the motors.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Assembly_and_Getting_Started/dexterindustries.com-Add trim to the motors.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Assembly_and_Getting_Started/dexterindustries.com-Assemble the GoPiGo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Assembly_and_Getting_Started/dexterindustries.com-Assemble the GoPiGo.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Assembly_and_Getting_Started/dexterindustries.com-Assemble the Servo Package.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Assembly_and_Getting_Started/dexterindustries.com-Assemble the Servo Package.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Assembly_and_Getting_Started/dexterindustries.com-Attaching a Camera or Ultrasonic Sensor.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Assembly_and_Getting_Started/dexterindustries.com-Attaching a Camera or Ultrasonic Sensor.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Assembly_and_Getting_Started/dexterindustries.com-Get Started With the GoPiGo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Assembly_and_Getting_Started/dexterindustries.com-Get Started With the GoPiGo.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-Disable communication timeout on the GoPiGo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-Disable communication timeout on the GoPiGo.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-Enable communication timeout on the GoPiGo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-Enable communication timeout on the GoPiGo.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-Installing the GoPiGo Python Library.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-Installing the GoPiGo Python Library.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-Read communication timeoutnbspstatus.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-Read communication timeoutnbspstatus.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-Read encoder targeting status.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-Read encoder targeting status.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-Read encoder values.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-Read encoder values.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-Read status register on the GoPiGo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-Read status register on the GoPiGo.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-bwd.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-bwd.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-decrease_speed.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-decrease_speed.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-disable_encoders.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-disable_encoders.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-disable_servo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-disable_servo.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-enable_encoders.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-enable_encoders.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-enable_servo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-enable_servo.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-enc_tgt.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-enc_tgt.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-fw_ver.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-fw_ver.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-fwd.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-fwd.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-increase_speed.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-increase_speed.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-led DEPRECATED.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-led DEPRECATED.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-led_off.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-led_off.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-led_on.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-led_on.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-left.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-left.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-left_rot.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-left_rot.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-motor_bwd.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-motor_bwd.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-motor_fwd.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-motor_fwd.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-right.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-right.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-right_rot.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-right_rot.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-servo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-servo.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-set_left_speed.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-set_left_speed.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-set_right_speed.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-set_right_speed.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-set_speed.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-set_speed.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-stop.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-stop.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-us_dist.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-us_dist.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-volt.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/Python/dexterindustries.com-volt.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/dexterindustries.com-Python Programming.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/dexterindustries.com-Python Programming.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/Programming/dexterindustries.com-Scratch Programming.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/Programming/dexterindustries.com-Scratch Programming.pdf -------------------------------------------------------------------------------- /Assembly_and_Programming/GoPiGo2/dexterindustries.com-Troubleshooting GoPiGo2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Assembly_and_Programming/GoPiGo2/dexterindustries.com-Troubleshooting GoPiGo2.pdf -------------------------------------------------------------------------------- /Firmware/Firmware_version.txt: -------------------------------------------------------------------------------- 1 | v1.6 -------------------------------------------------------------------------------- /Firmware/README.md: -------------------------------------------------------------------------------- 1 | ## Uploading a new firmware to the GoPiGo 2 | First make the update script executable 3 | > sudo chmod + firmware_update.sh 4 | 5 | Make sure that the motors are disconnected from the GoPiGo and then run the firmware update: 6 | > sudo ./firmware_update.sh 7 | 8 | ## Making changes to the GoPiGo Firmware 9 | 10 | The GoPiGo uses software servo to control the Servo's so when making changes to the code, do remember to add the **Software Servo library** to the Arduino Libraries folder 11 | 12 | Use this tutorial to load the library http://www.dexterindustries.com/Arduberry/how-to-program-the-arduberry/#new_lib . 13 | 14 | Press "CTRL+SHIFT+U" to upload the code 15 | 16 | 17 | ## License 18 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi. 19 | Copyright (C) 2017 Dexter Industries 20 | 21 | This program is free software: you can redistribute it and/or modify 22 | it under the terms of the GNU General Public License as published by 23 | the Free Software Foundation, either version 3 of the License, or 24 | (at your option) any later version. 25 | 26 | This program is distributed in the hope that it will be useful, 27 | but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | GNU General Public License for more details. 30 | 31 | You should have received a copy of the GNU General Public License 32 | along with this program. If not, see . 33 | -------------------------------------------------------------------------------- /Firmware/SoftwareServo/SoftwareServo.h: -------------------------------------------------------------------------------- 1 | #ifndef SoftwareServo_h 2 | #define SoftwareServo_h 3 | 4 | #include 5 | #include 6 | 7 | class SoftwareServo 8 | { 9 | private: 10 | uint8_t pin; 11 | uint8_t angle; // in degrees 12 | uint16_t pulse0; // pulse width in TCNT0 counts 13 | uint8_t min16; // minimum pulse, 16uS units (default is 34) 14 | uint8_t max16; // maximum pulse, 16uS units, 0-4ms range (default is 150) 15 | class SoftwareServo *next; 16 | static SoftwareServo* first; 17 | public: 18 | SoftwareServo(); 19 | uint8_t attach(int); // attach to a pin, sets pinMode, returns 0 on failure, won't 20 | // position the servo until a subsequent write() happens 21 | void detach(); 22 | void write(int); // specify the angle in degrees, 0 to 180 23 | uint8_t read(); 24 | uint8_t attached(); 25 | void setMinimumPulse(uint16_t); // pulse length for 0 degrees in microseconds, 540uS default 26 | void setMaximumPulse(uint16_t); // pulse length for 180 degrees in microseconds, 2400uS default 27 | static void refresh(); // must be called at least every 50ms or so to keep servo alive 28 | // you can call more often, it won't happen more than once every 20ms 29 | }; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /Firmware/SoftwareServo/examples/SerialServo/SerialServo.pde: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | SoftwareServo servo1; 4 | SoftwareServo servo2; 5 | 6 | void setup() 7 | { 8 | pinMode(13,OUTPUT); 9 | servo1.attach(2); 10 | servo1.setMaximumPulse(2200); 11 | servo2.attach(4); 12 | servo2.setMaximumPulse(2200); 13 | Serial.begin(9600); 14 | Serial.print("Ready"); 15 | } 16 | 17 | void loop() 18 | { 19 | static int value = 0; 20 | static char CurrentServo = 0; 21 | 22 | if ( Serial.available()) { 23 | char ch = Serial.read(); 24 | switch(ch) { 25 | case 'A': 26 | servo1.attach(2); 27 | CurrentServo='A'; 28 | digitalWrite(13,LOW); 29 | break; 30 | case 'B': 31 | servo2.attach(4); 32 | CurrentServo='B'; 33 | digitalWrite(13,HIGH); 34 | break; 35 | case '0' ... '9': 36 | value=(ch-'0')*20; 37 | if (CurrentServo=='A') 38 | { 39 | servo1.write(value); 40 | } 41 | else if (CurrentServo=='B') 42 | { 43 | servo2.write(value); 44 | } 45 | break; 46 | } 47 | } 48 | SoftwareServo::refresh(); 49 | } 50 | -------------------------------------------------------------------------------- /Firmware/SoftwareServo/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map SoftwareServo 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | SoftwareServo KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | attach KEYWORD2 15 | detach KEYWORD2 16 | write KEYWORD2 17 | read KEYWORD2 18 | attached KEYWORD2 19 | setMinimumPulse KEYWORD2 20 | setMaximumPulse KEYWORD2 21 | refresh KEYWORD2 22 | 23 | ####################################### 24 | # Constants (LITERAL1) 25 | ####################################### 26 | -------------------------------------------------------------------------------- /Firmware/firmware_update.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | REPO_PATH=$(readlink -f $(dirname $0) | grep -E -o "^(.*?\\GoPiGo)") 4 | 5 | if [ "$(whoami)" != 'root' ]; then 6 | echo "You have no permission to run $0 as non-root user." 7 | echo "Run using sudo and try again." 8 | exit 1; 9 | fi 10 | 11 | echo "ATTENTION! Important!" 12 | echo "BEFORE PROGRAMMING THE GOPIGO FIRMWARE, DISCONNECT THE MOTORS." 13 | echo "Please confirm that you've disconnected the motors." 14 | echo "Have you disconnected the motors before programming the firmware? (y/n)" 15 | 16 | read motors 17 | y='y' 18 | 19 | if [ $motors = $y ]; then 20 | echo "Updating the GoPiGo firmware" 21 | echo "=============================" 22 | 23 | data='date' 24 | now=$($data) 25 | echo "$now" 26 | 27 | source $REPO_PATH/Firmware/gopigo_firmware_update.sh 28 | update_gopigo_firmware 29 | echo "=============================" 30 | else 31 | echo "Disconect your motors and retry!" 32 | fi 33 | -------------------------------------------------------------------------------- /Firmware/fw_ver_13/firmware_update_13.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | if [ "$(whoami)" != 'root' ]; then 4 | echo "You have no permission to run $0 as non-root user." 5 | echo "Run using sudo and try again." 6 | exit 1; 7 | fi 8 | 9 | echo "ATTENTION! Important!" 10 | echo "BEFORE PROGRAMMING THE GOPIGO FIRMWARE, DISCONNECT THE MOTORS." 11 | echo "Please confirm that you've disconnected the motors." 12 | echo "Have you disconnected the motors before programming the firmware? (y/n)" 13 | 14 | read motors 15 | y='y' 16 | 17 | if [ $motors = $y ]; then 18 | echo "Updating the GoPiGo firmware" 19 | echo "=============================" 20 | 21 | data='date' 22 | now=$($data) 23 | echo "$now" 24 | 25 | var='avrdude -c gpio -p m328p -U lfuse:w:0x7F:m' 26 | output=$($var) 27 | echo "$output" 28 | 29 | avrdude -c gpio -p m328p -U flash:w:fw_ver_13.cpp.hex 30 | echo "=============================" 31 | else 32 | echo "Disconect your motors and retry!" 33 | fi 34 | -------------------------------------------------------------------------------- /Firmware/fw_ver_14/README.md: -------------------------------------------------------------------------------- 1 | ## Firmware v14 2 | 3 | This firmware has upgrades for the hardware changes coming to the GPG v16 but is backward compatible. 4 | 5 | The firmware also brings support to the IR receiver which can be now used to control the GoPiGo. 6 | 7 | Firmware v14 might cause your GoPiGo to stop working. Please use this on your own risk and do report any problems that you encounter in the forums. 8 | -------------------------------------------------------------------------------- /Firmware/fw_ver_14/firmware_update_14.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | if [ "$(whoami)" != 'root' ]; then 4 | echo "You have no permission to run $0 as non-root user." 5 | echo "Run using sudo and try again." 6 | exit 1; 7 | fi 8 | 9 | echo "ATTENTION! Important!" 10 | echo "BEFORE PROGRAMMING THE GOPIGO FIRMWARE, DISCONNECT THE MOTORS." 11 | echo "Please confirm that you've disconnected the motors." 12 | echo "Have you disconnected the motors before programming the firmware? (y/n)" 13 | 14 | read motors 15 | y='y' 16 | 17 | if [ $motors = $y ]; then 18 | echo "Updating the GoPiGo firmware" 19 | echo "=============================" 20 | 21 | data='date' 22 | now=$($data) 23 | echo "$now" 24 | 25 | var='avrdude -c gpio -p m328p -U lfuse:w:0x7F:m' 26 | output=$($var) 27 | echo "$output" 28 | 29 | avrdude -c gpio -p m328p -U flash:w:fw_ver_14.cpp.hex 30 | echo "=============================" 31 | else 32 | echo "Disconect your motors and retry!" 33 | fi 34 | -------------------------------------------------------------------------------- /Firmware/fw_ver_15/README.md: -------------------------------------------------------------------------------- 1 | ## Firmware v15 2 | 3 | This firmware has upgrades for the hardware changes coming to the GPG v16 but is backward compatible. 4 | 5 | The firmware has removed the support for the IR receiver which would be added back in the future update 6 | 7 | Firmware v15 might cause your GoPiGo to stop working. Please use this on your own risk and do report any problems that you encounter in the forums. 8 | -------------------------------------------------------------------------------- /Firmware/fw_ver_15/SoftwareServo.h: -------------------------------------------------------------------------------- 1 | #ifndef SoftwareServo_h 2 | #define SoftwareServo_h 3 | 4 | #include 5 | #include 6 | 7 | class SoftwareServo 8 | { 9 | private: 10 | uint8_t pin; 11 | uint8_t angle; // in degrees 12 | uint16_t pulse0; // pulse width in TCNT0 counts 13 | uint8_t min16; // minimum pulse, 16uS units (default is 34) 14 | uint8_t max16; // maximum pulse, 16uS units, 0-4ms range (default is 150) 15 | class SoftwareServo *next; 16 | static SoftwareServo* first; 17 | public: 18 | SoftwareServo(); 19 | uint8_t attach(int); // attach to a pin, sets pinMode, returns 0 on failure, won't 20 | // position the servo until a subsequent write() happens 21 | void detach(); 22 | void write(int); // specify the angle in degrees, 0 to 180 23 | uint8_t read(); 24 | uint8_t attached(); 25 | void setMinimumPulse(uint16_t); // pulse length for 0 degrees in microseconds, 540uS default 26 | void setMaximumPulse(uint16_t); // pulse length for 180 degrees in microseconds, 2400uS default 27 | static void refresh(); // must be called at least every 50ms or so to keep servo alive 28 | // you can call more often, it won't happen more than once every 20ms 29 | }; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /Firmware/fw_ver_15/firmware_update_15.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | if [ "$(whoami)" != 'root' ]; then 4 | echo "You have no permission to run $0 as non-root user." 5 | echo "Run using sudo and try again." 6 | exit 1; 7 | fi 8 | 9 | echo "ATTENTION! Important!" 10 | echo "BEFORE PROGRAMMING THE GOPIGO FIRMWARE, DISCONNECT THE MOTORS." 11 | echo "Please confirm that you've disconnected the motors." 12 | echo "Have you disconnected the motors before programming the firmware? (y/n)" 13 | 14 | read motors 15 | y='y' 16 | 17 | if [ $motors = $y ]; then 18 | echo "Updating the GoPiGo firmware" 19 | echo "=============================" 20 | 21 | data='date' 22 | now=$($data) 23 | echo "$now" 24 | 25 | var='avrdude -c gpio -p m328p -U lfuse:w:0x7F:m' 26 | output=$($var) 27 | echo "$output" 28 | 29 | avrdude -c gpio -p m328p -U flash:w:fw_ver_15.cpp.hex 30 | echo "=============================" 31 | else 32 | echo "Disconect your motors and retry!" 33 | fi 34 | -------------------------------------------------------------------------------- /Firmware/fw_ver_16/README.md: -------------------------------------------------------------------------------- 1 | ## Firmware v16 2 | 3 | Minor firmware improvements to make the firmware more stable 4 | -------------------------------------------------------------------------------- /Firmware/fw_ver_16/SoftwareServo.h: -------------------------------------------------------------------------------- 1 | #ifndef SoftwareServo_h 2 | #define SoftwareServo_h 3 | 4 | #include 5 | #include 6 | 7 | class SoftwareServo 8 | { 9 | private: 10 | uint8_t pin; 11 | uint8_t angle; // in degrees 12 | uint16_t pulse0; // pulse width in TCNT0 counts 13 | uint8_t min16; // minimum pulse, 16uS units (default is 34) 14 | uint8_t max16; // maximum pulse, 16uS units, 0-4ms range (default is 150) 15 | class SoftwareServo *next; 16 | static SoftwareServo* first; 17 | public: 18 | SoftwareServo(); 19 | uint8_t attach(int); // attach to a pin, sets pinMode, returns 0 on failure, won't 20 | // position the servo until a subsequent write() happens 21 | void detach(); 22 | void write(int); // specify the angle in degrees, 0 to 180 23 | uint8_t read(); 24 | uint8_t attached(); 25 | void setMinimumPulse(uint16_t); // pulse length for 0 degrees in microseconds, 540uS default 26 | void setMaximumPulse(uint16_t); // pulse length for 180 degrees in microseconds, 2400uS default 27 | static void refresh(); // must be called at least every 50ms or so to keep servo alive 28 | // you can call more often, it won't happen more than once every 20ms 29 | }; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /Firmware/fw_ver_16/firmware_update_16.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | if [ "$(whoami)" != 'root' ]; then 4 | echo "You have no permission to run $0 as non-root user." 5 | echo "Run using sudo and try again." 6 | exit 1; 7 | fi 8 | 9 | echo "ATTENTION! Important!" 10 | echo "BEFORE PROGRAMMING THE GOPIGO FIRMWARE, DISCONNECT THE MOTORS." 11 | echo "Please confirm that you've disconnected the motors." 12 | echo "Have you disconnected the motors before programming the firmware? (y/n)" 13 | 14 | read motors 15 | y='y' 16 | 17 | if [ $motors = $y ]; then 18 | echo "Updating the GoPiGo firmware" 19 | echo "=============================" 20 | 21 | data='date' 22 | now=$($data) 23 | echo "$now" 24 | 25 | var='avrdude -c gpio -p m328p -U lfuse:w:0x7F:m' 26 | output=$($var) 27 | echo "$output" 28 | 29 | avrdude -c gpio -p m328p -U flash:w:fw_ver_16.cpp.hex 30 | echo "=============================" 31 | else 32 | echo "Disconect your motors and retry!" 33 | fi 34 | -------------------------------------------------------------------------------- /Firmware/gopigo_firmware_update.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | REPO_PATH=$(readlink -f $(dirname $0) | grep -E -o "^(.*?\\GoPiGo)") 3 | update_gopigo_firmware(){ 4 | # Check if this function is called from a Dexter script like 5 | # /Raspbian_For_Robots/upd_script/update_GoPiGo_Firmware.sh 6 | if [[ "$1" == "Dexter" ]] 7 | then 8 | REPO_PATH=/home/pi/Dexter/GoPiGo 9 | fi 10 | # Checking if the REPO_PATH contains GoPiGo folder 11 | if ! echo "$REPO_PATH" | grep -q "/GoPiGo" 12 | then 13 | echo "Error in REPO_PATH:$REPO_PATH" 14 | exit 15 | fi 16 | echo "GoPiGo is found at :$REPO_PATH" 17 | sudo avrdude -c gpio -p m328p -U lfuse:w:0x7F:m 18 | sudo avrdude -c gpio -p m328p -U hfuse:w:0xDA:m 19 | sudo avrdude -c gpio -p m328p -U efuse:w:0x05:m 20 | # avrdude -c gpio -p m328p -U flash:w:/home/pi/Desktop/GoPiGo/Firmware/fw_ver_13.cpp.hex 21 | sudo avrdude -c gpio -p m328p -U flash:w:$REPO_PATH/Firmware/fw_ver_16/fw_ver_16.cpp.hex 22 | } 23 | -------------------------------------------------------------------------------- /Firmware/old/encoder_interrupt/encoder_interrupt.ino: -------------------------------------------------------------------------------- 1 | //Code for testing interrupts for the encoder signal 2 | volatile int state = LOW; 3 | volatile int s=0; 4 | void setup() 5 | { 6 | Serial.begin(115200); 7 | attachInterrupt(0, step, RISING); 8 | } 9 | void loop() 10 | { 11 | if(s%36==0) 12 | Serial.println(s/36); 13 | } 14 | void step() 15 | { 16 | s++; 17 | } 18 | -------------------------------------------------------------------------------- /Firmware/old/encoder_targetting1/encoder_targetting1.ino: -------------------------------------------------------------------------------- 1 | //Code for testing interrupts for the encoder signal 2 | volatile int state = LOW; 3 | volatile int s1=0,s2=0; 4 | int i11=7; 5 | int i12=8; 6 | int i21=4; 7 | int i22=13; 8 | int s_1=9; 9 | int s_2=6; 10 | int sp1=200; 11 | void f(int m) 12 | { 13 | if(m==1) 14 | { 15 | digitalWrite(i11, LOW); 16 | digitalWrite(i12, HIGH); 17 | } 18 | if(m==2) 19 | { 20 | digitalWrite(i21, LOW); 21 | digitalWrite(i22, HIGH); 22 | } 23 | } 24 | void b(int m) 25 | { 26 | if(m==1) 27 | { 28 | digitalWrite(i11, HIGH); 29 | digitalWrite(i12, LOW); 30 | } 31 | if(m==2) 32 | { 33 | digitalWrite(i21, HIGH); 34 | digitalWrite(i22, LOW); 35 | } 36 | } 37 | void s(int m) 38 | { 39 | if(m==1) 40 | { 41 | digitalWrite(i11, HIGH); 42 | digitalWrite(i12, HIGH); 43 | } 44 | if(m==2) 45 | { 46 | digitalWrite(i21, HIGH); 47 | digitalWrite(i22, HIGH); 48 | } 49 | } 50 | void motor_speed(int motor, int spd) 51 | { 52 | if(motor==1) 53 | analogWrite(s_1,spd); 54 | if(motor==2) 55 | analogWrite(s_2,spd); 56 | } 57 | int mot=1; 58 | void setup() 59 | { 60 | delay(5000); 61 | Serial.begin(115200); 62 | pinMode(i11, OUTPUT); 63 | pinMode(i12, OUTPUT); 64 | pinMode(i21, OUTPUT); 65 | pinMode(i22, OUTPUT); 66 | attachInterrupt(1, step1, RISING); 67 | attachInterrupt(0, step2, RISING); 68 | } 69 | int flag=1; 70 | void loop() 71 | { 72 | if(flag) 73 | { 74 | b(mot); 75 | flag=0; 76 | } 77 | motor_speed(mot,sp1); 78 | if(s2==72) 79 | { 80 | f(mot); 81 | delay(20); 82 | s(mot); 83 | } 84 | Serial.print(s1); 85 | Serial.print(" "); 86 | Serial.println(s2); 87 | delay(10); 88 | } 89 | void step1() 90 | { 91 | s1++; 92 | } 93 | void step2() 94 | { 95 | s2++; 96 | } 97 | -------------------------------------------------------------------------------- /Firmware/old/encoder_test_led/encoder_test_led.ino: -------------------------------------------------------------------------------- 1 | //Code for encoder testing- Rotate the wheels with hand to make the LED's blink 2 | volatile int state = LOW; 3 | volatile int s=0; 4 | volatile int f=0,f1=0; 5 | int i11=7; 6 | int i12=8; 7 | int i21=4; 8 | int i22=13; 9 | void setup() 10 | { 11 | pinMode(i11, OUTPUT); 12 | pinMode(i12, OUTPUT); 13 | pinMode(i21, OUTPUT); 14 | pinMode(i22, OUTPUT); 15 | attachInterrupt(0, step1, CHANGE); 16 | attachInterrupt(1, step2, CHANGE); 17 | pinMode(10,OUTPUT); 18 | pinMode(5,OUTPUT); 19 | } 20 | void loop() 21 | { 22 | if(f==1) 23 | digitalWrite(10,HIGH); 24 | if(f1==1) 25 | digitalWrite(5,HIGH); 26 | f1=f=0; 27 | delay(50); 28 | digitalWrite(10,LOW); 29 | digitalWrite(5,LOW); 30 | } 31 | void step1() 32 | { 33 | f=1; 34 | } 35 | void step2() 36 | { 37 | f1=1; 38 | } 39 | 40 | -------------------------------------------------------------------------------- /Firmware/old/encoder_testoct22b/encoder_testoct22b.ino: -------------------------------------------------------------------------------- 1 | //Code for testing interrupts for the encoder signal 2 | volatile int state = LOW; 3 | volatile int s=0; 4 | volatile int f=0,f1=0; 5 | int i11=7; 6 | int i12=8; 7 | int i21=4; 8 | int i22=13; 9 | void setup() 10 | { 11 | pinMode(i11, OUTPUT); 12 | pinMode(i12, OUTPUT); 13 | pinMode(i21, OUTPUT); 14 | pinMode(i22, OUTPUT); 15 | attachInterrupt(0, step1, CHANGE); 16 | attachInterrupt(1, step2, CHANGE); 17 | pinMode(10,OUTPUT); 18 | pinMode(5,OUTPUT); 19 | } 20 | void loop() 21 | { 22 | if(f==1) 23 | digitalWrite(10,HIGH); 24 | if(f1==1) 25 | digitalWrite(5,HIGH); 26 | f1=f=0; 27 | delay(50); 28 | digitalWrite(10,LOW); 29 | digitalWrite(5,LOW); 30 | } 31 | void step1() 32 | { 33 | f=1; 34 | } 35 | void step2() 36 | { 37 | f1=1; 38 | } 39 | 40 | -------------------------------------------------------------------------------- /Firmware/old/grove_connectors/grove_connectors.ino: -------------------------------------------------------------------------------- 1 | void setup() 2 | { 3 | pinMode(0, OUTPUT); 4 | pinMode(1, OUTPUT); 5 | pinMode(5, OUTPUT); 6 | pinMode(11, OUTPUT); 7 | pinMode(12, OUTPUT); 8 | pinMode(13, OUTPUT); 9 | pinMode(A3, OUTPUT); 10 | pinMode(A1, OUTPUT); 11 | pinMode(A2, OUTPUT); 12 | } 13 | int a0,a1,a2,a3; 14 | void loop() 15 | { 16 | digitalWrite(A3, HIGH); 17 | digitalWrite(A1, HIGH); 18 | digitalWrite(A2, HIGH); 19 | digitalWrite(0, HIGH); 20 | digitalWrite(1, HIGH); 21 | digitalWrite(5, HIGH); 22 | digitalWrite(11, HIGH); 23 | digitalWrite(12, HIGH); 24 | digitalWrite(13, HIGH); 25 | 26 | delay(100); 27 | digitalWrite(A3, LOW); 28 | digitalWrite(A1, LOW); 29 | digitalWrite(A2, LOW); 30 | digitalWrite(0, LOW); 31 | digitalWrite(1, LOW); 32 | digitalWrite(5, LOW); 33 | digitalWrite(11, LOW); 34 | digitalWrite(12, LOW); 35 | digitalWrite(13, LOW); 36 | delay(100); 37 | } 38 | -------------------------------------------------------------------------------- /Firmware/old/linesensortest/linesensortest.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define SLAVE_ADDRESS 0x04 4 | int number = 0; 5 | int state = 0; 6 | 7 | byte b[7]; 8 | int aRead1=0, aRead2=0,aRead3=0; 9 | 10 | void setup() { 11 | Wire.begin(SLAVE_ADDRESS); 12 | Wire.onRequest(sendData); 13 | } 14 | 15 | void loop() 16 | { 17 | aRead1=analogRead(1); 18 | aRead2=analogRead(2); 19 | aRead3=analogRead(3); 20 | 21 | b[1]=aRead1/256; 22 | b[2]=aRead1%256; 23 | b[3]=aRead2/256; 24 | b[4]=aRead2%256; 25 | b[5]=aRead3/256; 26 | b[6]=aRead3%256; 27 | } 28 | 29 | 30 | void sendData() 31 | { 32 | Wire.write(b, 7); 33 | } 34 | 35 | -------------------------------------------------------------------------------- /Firmware/old/motor_battery_level_test/motor_battery_level_test.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define SLAVE_ADDRESS 0x04 4 | int number = 5; 5 | int state = 0; 6 | 7 | void setup() 8 | { 9 | analogReference(EXTERNAL); 10 | pinMode(13, OUTPUT); 11 | pinMode(2, OUTPUT); 12 | pinMode(3, OUTPUT); 13 | pinMode(4, OUTPUT); 14 | pinMode(5, OUTPUT); 15 | // Serial.begin(9600); 16 | 17 | Wire.begin(SLAVE_ADDRESS); 18 | 19 | Wire.onReceive(receiveData); 20 | Wire.onRequest(sendData); 21 | 22 | //Serial.println("Ready!"); 23 | } 24 | int st=0; 25 | void loop() 26 | { 27 | if(st==1) 28 | { 29 | analogWrite(6,255); 30 | analogWrite(7,255); 31 | digitalWrite(2, LOW); 32 | digitalWrite(3, HIGH); 33 | digitalWrite(4, LOW); 34 | digitalWrite(5, HIGH); 35 | } 36 | } 37 | 38 | void receiveData(int byteCount){ 39 | while(Wire.available()) 40 | { 41 | number = Wire.read(); 42 | Serial.print("data received: "); 43 | Serial.println(number); 44 | } 45 | } 46 | 47 | // callback for sending data 48 | byte b[3]; 49 | int d; 50 | void sendData(){ 51 | st=1; 52 | d=analogRead(0); 53 | //Serial.println(d); 54 | b[1]=d/256; 55 | b[2]=d%256; 56 | Wire.write(b, 3); 57 | } 58 | 59 | -------------------------------------------------------------------------------- /Firmware/old/motor_encoder/motor_encoder.ino: -------------------------------------------------------------------------------- 1 | //Code for testing interrupts for the encoder signal 2 | volatile int state = LOW; 3 | volatile int s=0; 4 | volatile int f=0,f1=0; 5 | int i11=7; 6 | int i12=8; 7 | int i21=4; 8 | int i22=13; 9 | int s_1=9; 10 | int s_2=6; 11 | int sp=140; 12 | void forward() 13 | { 14 | digitalWrite(i11, LOW); 15 | digitalWrite(i12, HIGH); 16 | digitalWrite(i21, LOW); 17 | digitalWrite(i22, HIGH); 18 | } 19 | void setup() 20 | { 21 | attachInterrupt(0, step1, RISING); 22 | attachInterrupt(1, step2, RISING); 23 | pinMode(i11, OUTPUT); 24 | pinMode(i12, OUTPUT); 25 | pinMode(i21, OUTPUT); 26 | pinMode(i22, OUTPUT); 27 | pinMode(10,OUTPUT); 28 | pinMode(11,OUTPUT); 29 | forward(); 30 | analogWrite(s_1,sp); 31 | analogWrite(s_2,sp); 32 | Serial.begin(115200); 33 | Serial.println("Ready"); 34 | } 35 | void loop() 36 | { 37 | 38 | Serial.println("v"); 39 | if(f%18==0) 40 | { 41 | Serial.println(f); 42 | 43 | 44 | digitalWrite(10,HIGH); 45 | } 46 | if(f1%18==0) 47 | { 48 | digitalWrite(11,HIGH); 49 | Serial.println(f1); 50 | } 51 | //f1=f=0; 52 | delay(10); 53 | digitalWrite(10,LOW); 54 | digitalWrite(11,LOW); 55 | 56 | } 57 | void step1() 58 | { 59 | f++; 60 | } 61 | void step2() 62 | { 63 | f1++; 64 | } 65 | 66 | -------------------------------------------------------------------------------- /Firmware/old/motor_encoder1/motor_encoder1.ino: -------------------------------------------------------------------------------- 1 | //Code for testing interrupts for the encoder signal 2 | volatile int state = LOW; 3 | volatile int s=0; 4 | volatile int f=0,f1=0; 5 | int i11=7; 6 | int i12=8; 7 | int i21=4; 8 | int i22=13; 9 | int s_1=9; 10 | int s_2=6; 11 | int sp=140; 12 | void forward() 13 | { 14 | digitalWrite(i11, LOW); 15 | digitalWrite(i12, HIGH); 16 | digitalWrite(i21, LOW); 17 | digitalWrite(i22, HIGH); 18 | } 19 | void setup() 20 | { 21 | attachInterrupt(0, step1, RISING); 22 | attachInterrupt(1, step2, RISING); 23 | pinMode(i11, OUTPUT); 24 | pinMode(i12, OUTPUT); 25 | pinMode(i21, OUTPUT); 26 | pinMode(i22, OUTPUT); 27 | pinMode(10,OUTPUT); 28 | pinMode(11,OUTPUT); 29 | forward(); 30 | analogWrite(s_1,sp); 31 | analogWrite(s_2,sp); 32 | } 33 | void loop() 34 | { 35 | 36 | 37 | if(f%18==0) 38 | digitalWrite(10,HIGH); 39 | if(f1%18==0) 40 | digitalWrite(11,HIGH); 41 | //f1=f=0; 42 | delay(10); 43 | digitalWrite(10,LOW); 44 | digitalWrite(11,LOW); 45 | 46 | } 47 | void step1() 48 | { 49 | f++; 50 | } 51 | void step2() 52 | { 53 | f1++; 54 | } 55 | 56 | -------------------------------------------------------------------------------- /Firmware/old/motor_oct22d/motor_oct22d.ino: -------------------------------------------------------------------------------- 1 | int m1a=7; 2 | int m1b=8; 3 | int m2a=4; 4 | int m2b=13; 5 | int c1=9; 6 | int c2=12; 7 | void setup() 8 | { 9 | pinMode(m1a, OUTPUT); 10 | pinMode(m1b, OUTPUT); 11 | pinMode(m2a, OUTPUT); 12 | pinMode(m2b, OUTPUT); 13 | } 14 | void loop() 15 | { 16 | analogWrite(c1,100); 17 | analogWrite(c2,255); 18 | digitalWrite(m1a, LOW); 19 | digitalWrite(m1b, HIGH); 20 | digitalWrite(m2a, LOW); 21 | digitalWrite(m2b, HIGH); 22 | } 23 | 24 | -------------------------------------------------------------------------------- /Firmware/old/servo_test/servo_test.ino: -------------------------------------------------------------------------------- 1 | // Sweep 2 | // by BARRAGAN 3 | // This example code is in the public domain. 4 | 5 | 6 | #include 7 | 8 | Servo myservo,m1; // create servo object to control a servo 9 | // a maximum of eight servo objects can be created 10 | 11 | int pos = 0; // variable to store the servo position 12 | 13 | void setup() 14 | { 15 | myservo.attach(5); // attaches the servo on pin 9 to the servo object 16 | m1.attach(11); 17 | } 18 | 19 | 20 | void loop() 21 | { 22 | for(pos = 0; pos < 180; pos += 1) // goes from 0 degrees to 180 degrees 23 | { // in steps of 1 degree 24 | myservo.write(pos); // tell servo to go to position in variable 'pos' 25 | m1.write(pos); 26 | delay(10); // waits 15ms for the servo to reach the position 27 | } 28 | for(pos = 180; pos>=1; pos-=1) // goes from 180 degrees to 0 degrees 29 | { 30 | myservo.write(pos); // tell servo to go to position in variable 'pos' 31 | m1.write(pos); 32 | delay(10); // waits 15ms for the servo to reach the position 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /GoPiGo_Chassis-300.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/GoPiGo_Chassis-300.jpg -------------------------------------------------------------------------------- /GoPiGo_Front_Facing_Camera300.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/GoPiGo_Front_Facing_Camera300.jpg -------------------------------------------------------------------------------- /Hardware/GoPiGo_16_schematics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Hardware/GoPiGo_16_schematics.pdf -------------------------------------------------------------------------------- /Hardware/README.md: -------------------------------------------------------------------------------- 1 | # GoPiGo 2 | 3 | The GoPiGo is a delightful and complete robot for the Raspberry Pi that turns your Pi into a fully operating robot. GoPiGo is a mobile robotic platform for the Raspberry Pi developed by [Dexter Industries.](http://www.dexterindustries.com/GoPiGo) 4 | 5 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Chassis-300.jpg) 6 | 7 | This repository contains hardware designs and design materials for the GoPiGo. 8 | 9 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Front_Facing_Camera300.jpg) 10 | 11 | # See Also 12 | 13 | - [Dexter Industries] (http://www.dexterindustries.com/GoPiGo) 14 | - [Kickstarter Campaign] (http://kck.st/Q6vVOP) 15 | - [Raspberry Pi] (http://www.raspberrypi.org/) 16 | 17 | ## License 18 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi. 19 | Copyright (C) 2017 Dexter Industries 20 | 21 | This program is free software: you can redistribute it and/or modify 22 | it under the terms of the GNU General Public License as published by 23 | the Free Software Foundation, either version 3 of the License, or 24 | (at your option) any later version. 25 | 26 | This program is distributed in the hope that it will be useful, 27 | but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | GNU General Public License for more details. 30 | 31 | You should have received a copy of the GNU General Public License 32 | along with this program. If not, see . -------------------------------------------------------------------------------- /Projects/AgentKK/README.md: -------------------------------------------------------------------------------- 1 | # Agent KK Guard Robot 2 | 3 | Build and program this little GoPiGo to protect your wardrobe, your closet, or even your whole room! Hide GoPiGo behind a closed door and when the door is opened, it will attack your siblings, scaring them, and even taking a picture as trespassing proof! That way, even mom will have to be on your side! 4 | 5 | ![GoPiGo](ReadyToGuardYourDoor.png) 6 | 7 | This repository contains the code for this project in both Python and Scratch. 8 | The sound effect comes from https://www.freesound.org/ 9 | 10 | The project is documented at [AgentKK](http://www.dexterindustries.com/projects/agent-kk-2/) 11 | 12 | GoPiGo is documented at [GoPiGo](http://www.dexterindustries.com/shop/gopigo-starter-kit-2/) 13 | 14 | # See Also 15 | 16 | - [Dexter Industries](http://www.dexterindustries.com/GoPiGo) 17 | - [Kickstarter Campaign](http://kck.st/Q6vVOP) 18 | - [Raspberry Pi](http://www.raspberrypi.org/) 19 | 20 | ## License 21 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi. 22 | Copyright (C) 2016 Dexter Industries 23 | 24 | This program is free software: you can redistribute it and/or modify 25 | it under the terms of the GNU General Public License as published by 26 | the Free Software Foundation, either version 3 of the License, or 27 | (at your option) any later version. 28 | 29 | This program is distributed in the hope that it will be useful, 30 | but WITHOUT ANY WARRANTY; without even the implied warranty of 31 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 32 | GNU General Public License for more details. 33 | 34 | You should have received a copy of the GNU General Public License 35 | along with this program. If not, see . 36 | -------------------------------------------------------------------------------- /Projects/AgentKK/ReadyToGuardYourDoor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Projects/AgentKK/ReadyToGuardYourDoor.png -------------------------------------------------------------------------------- /Projects/AgentKK/agentKK.sb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Projects/AgentKK/agentKK.sb -------------------------------------------------------------------------------- /Projects/AgentKK/yells.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Projects/AgentKK/yells.mp3 -------------------------------------------------------------------------------- /Projects/Alexabot/README.md: -------------------------------------------------------------------------------- 1 | # [ Alexabot ](https://www.dexterindustries.com/projects/alexabot-amazon-alexa-controlled-robot/) 2 | 3 | In this tutorial we build [Alexabot, the Amazon Alexa Controlled Robot, using the Raspberry Pi](https://www.dexterindustries.com/projects/alexabot-amazon-alexa-controlled-robot/). We will walk through the steps of building a voice controlled robot with the Raspberry Pi and GoPiGo. With Alexabot, you can command the Raspberry Pi Robot around with commands like “Alexa Forward!” or “Alexa Coffee!”. GoPiGo is a mobile robotic platform for the Raspberry Pi developed by [Dexter Industries.](http://www.dexterindustries.com/GoPiGo) 4 | 5 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Chassis-300.jpg) 6 | 7 | This repository contains the code for the Alexabot Project for the GoPiGo. 8 | 9 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Front_Facing_Camera300.jpg) 10 | 11 | # See Also 12 | 13 | - [Dexter Industries] (http://www.dexterindustries.com/GoPiGo) 14 | - [Kickstarter Campaign] (http://kck.st/Q6vVOP) 15 | - [Raspberry Pi] (http://www.raspberrypi.org/) 16 | 17 | ## License 18 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi. 19 | Copyright (C) 2016 Dexter Industries 20 | 21 | This program is free software: you can redistribute it and/or modify 22 | it under the terms of the GNU General Public License as published by 23 | the Free Software Foundation, either version 3 of the License, or 24 | (at your option) any later version. 25 | 26 | This program is distributed in the hope that it will be useful, 27 | but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | GNU General Public License for more details. 30 | 31 | You should have received a copy of the GNU General Public License 32 | along with this program. If not, see . 33 | -------------------------------------------------------------------------------- /Projects/Empathybot/Emotions.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Projects/Empathybot/Emotions.jpg -------------------------------------------------------------------------------- /Projects/Empathybot/Empathybot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Projects/Empathybot/Empathybot.jpg -------------------------------------------------------------------------------- /Projects/Empathybot/README.md: -------------------------------------------------------------------------------- 1 | # Empathybot: The Raspberry Pi Robot That Reads Human Emotion 2 | 3 | ![ GoPiGo ](https://github.com/DexterInd/GoPiGo/raw/master/Projects/Empathybot/Empathybot.jpg) 4 | 5 | In this project we built emotional intelligence to our robot. We developed a Raspberry Pi Robot with the GoPiGo that will drive up to you, read your emotions, and then try to have a conversation with you, based on how you’re feeling. We will show you how you too can build your own DIY emotion-reading robot with a Raspberry Pi. 6 | 7 | ![ GoPiGo ](https://github.com/DexterInd/GoPiGo/raw/master/Projects/Empathybot/Emotions.jpg) 8 | 9 | This folder contains the code you need to build Empathybot! [You can see the full project here.](http://www.dexterindustries.com/projects/empathybot-raspberry-pi-robot-with-emotional-intelligence/) 10 | 11 | 12 | # See Also 13 | 14 | The GoPiGo is a delightful and complete robot for the Raspberry Pi that turns your Pi into a fully operating robot. GoPiGo is a mobile robotic platform for the Raspberry Pi developed by [Dexter Industries.](http://www.dexterindustries.com/GoPiGo) 15 | 16 | - [Dexter Industries](http://www.dexterindustries.com/GoPiGo) 17 | - [Kickstarter Campaign](http://kck.st/Q6vVOP) 18 | - [Raspberry Pi](http://www.raspberrypi.org/) 19 | 20 | ## License 21 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi. 22 | Copyright (C) 2019 Dexter Industries 23 | 24 | This program is free software: you can redistribute it and/or modify 25 | it under the terms of the GNU General Public License as published by 26 | the Free Software Foundation, either version 3 of the License, or 27 | (at your option) any later version. 28 | 29 | This program is distributed in the hope that it will be useful, 30 | but WITHOUT ANY WARRANTY; without even the implied warranty of 31 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 32 | GNU General Public License for more details. 33 | 34 | You should have received a copy of the GNU General Public License 35 | along with this program. If not, see . 36 | -------------------------------------------------------------------------------- /Projects/README.md: -------------------------------------------------------------------------------- 1 | # GoPiGo 2 | 3 | The GoPiGo is a delightful and complete robot for the Raspberry Pi that turns your Pi into a fully operating robot. GoPiGo is a mobile robotic platform for the Raspberry Pi developed by [Dexter Industries.](http://www.dexterindustries.com/GoPiGo) 4 | 5 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Chassis-300.jpg) 6 | 7 | This repository contains project examples for the GoPiGo. 8 | 9 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Front_Facing_Camera300.jpg) 10 | 11 | # See Also 12 | 13 | - [Dexter Industries] (http://www.dexterindustries.com/GoPiGo) 14 | - [Kickstarter Campaign] (http://kck.st/Q6vVOP) 15 | - [Raspberry Pi] (http://www.raspberrypi.org/) 16 | 17 | ## License 18 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi. 19 | Copyright (C) 2016 Dexter Industries 20 | 21 | This program is free software: you can redistribute it and/or modify 22 | it under the terms of the GNU General Public License as published by 23 | the Free Software Foundation, either version 3 of the License, or 24 | (at your option) any later version. 25 | 26 | This program is distributed in the hope that it will be useful, 27 | but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | GNU General Public License for more details. 30 | 31 | You should have received a copy of the GNU General Public License 32 | along with this program. If not, see . -------------------------------------------------------------------------------- /Setup/gopigo: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | REPO_PATH=$(readlink -f $(dirname $0) | grep -E -o "^(.*?\\GoPiGo)") 3 | python $REPO_PATH/Software/Python/other_scripts/gopigo_status.py 4 | -------------------------------------------------------------------------------- /Software/C/cmake/gopigoConfig.cmake.in: -------------------------------------------------------------------------------- 1 | # - Config file for the GoPiGo package 2 | # It defines the following variables 3 | # @PACKAGE_NAME@_INCLUDE_DIRS - include directories for gopigo 4 | # @PACKAGE_NAME@_LIBRARY_DIRS - library directories for gopigo 5 | # @PACKAGE_NAME@_LIBRARIES - libraries to link against 6 | 7 | 8 | set(@PACKAGE_NAME@_INCLUDE_DIRS @includedir@) 9 | set(@PACKAGE_NAME@_LIBRARIES @LIBS@) 10 | set(@PACKAGE_NAME@_LIBRARY_DIRS @libdir@) 11 | -------------------------------------------------------------------------------- /Software/C/cmake/gopigoConfigVersion.cmake.in: -------------------------------------------------------------------------------- 1 | set(PACKAGE_VERSION "@GOPIGO_VERSION@") 2 | 3 | # Check whether the requested PACKAGE_FIND_VERSION is compatible 4 | if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") 5 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 6 | else() 7 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 8 | if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") 9 | set(PACKAGE_VERSION_EXACT TRUE) 10 | endif() 11 | endif() 12 | -------------------------------------------------------------------------------- /Software/C/gopigo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/C/gopigo -------------------------------------------------------------------------------- /Software/C/gopigo.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: @PACKAGE_NAME@ 7 | Version: @GOPIGO_VERSION@ 8 | Description: Communicates with the GoPiGo 9 | Libs: -L${libdir} @LIBS@ 10 | Cflags: -I${includedir} 11 | -------------------------------------------------------------------------------- /Software/CSharp/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /Software/CSharp/.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | 38 | # Directories potentially created on remote AFP share 39 | .AppleDB 40 | .AppleDesktop 41 | Network Trash Folder 42 | Temporary Items 43 | .apdisk 44 | *.suo 45 | Debug 46 | bin 47 | obj 48 | Release 49 | *.user -------------------------------------------------------------------------------- /Software/CSharp/Driver/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/CSharp/Driver/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /Software/CSharp/Driver/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/CSharp/Driver/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /Software/CSharp/Driver/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/CSharp/Driver/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /Software/CSharp/Driver/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/CSharp/Driver/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /Software/CSharp/Driver/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/CSharp/Driver/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /Software/CSharp/Driver/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/CSharp/Driver/Assets/StoreLogo.png -------------------------------------------------------------------------------- /Software/CSharp/Driver/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/CSharp/Driver/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /Software/CSharp/Driver/Package.appxmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 14 | 15 | 16 | 17 | 18 | Driver 19 | ryanpe 20 | Assets\StoreLogo.png 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /Software/CSharp/Driver/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Driver")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Driver")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /Software/CSharp/Driver/Properties/Default.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Software/CSharp/Driver/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0" 4 | }, 5 | "frameworks": { 6 | "uap10.0": {} 7 | }, 8 | "runtimes": { 9 | "win10-arm": {}, 10 | "win10-arm-aot": {}, 11 | "win10-x86": {}, 12 | "win10-x86-aot": {}, 13 | "win10-x64": {}, 14 | "win10-x64-aot": {} 15 | } 16 | } -------------------------------------------------------------------------------- /Software/CSharp/GoPiGo/Commands.cs: -------------------------------------------------------------------------------- 1 | namespace GoPiGo 2 | { 3 | public enum Commands 4 | { 5 | Version = 20, 6 | BatteryVoltage = 118, 7 | UltraSonic = 117, 8 | 9 | DigitalWrite = 12, 10 | DigitalRead = 13, 11 | AnalogRead = 14, 12 | AnalogWrite = 15, 13 | PinMode = 16, 14 | MoveForward = 119, 15 | MoveForwardNoPid = 105, 16 | MoveBackward = 115, 17 | MoveBackwardNoPid = 107, 18 | MoveLeft = 97, 19 | RotateLeft = 98, 20 | MoveRight = 100, 21 | RotateRight = 110, 22 | Stop = 120, 23 | IncreaseSpeedBy10 = 116, 24 | DecreaseSpeedBy10 = 103, 25 | MotorOne = 111, 26 | MotorTwo = 112, 27 | SetLeftMotorSpeed = 70, 28 | SetRightMotorSpeed = 71, 29 | 30 | RotateServo = 101, 31 | EnableServo = 61, 32 | DisableServo = 60, 33 | 34 | SetEncoderTargeting = 50, 35 | EnableEncoder = 51, 36 | DisableEncoder = 52, 37 | ReadEncoder = 53, 38 | 39 | EnableCommunicationTimeout = 80, 40 | DisableCommunicationTimeout = 81, 41 | ReadTimeoutStatus = 82, 42 | 43 | TrimTest = 30, 44 | WriteTrim = 31, 45 | ReadTrim = 32 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Software/CSharp/GoPiGo/Constants.cs: -------------------------------------------------------------------------------- 1 | namespace GoPiGo 2 | { 3 | public class Constants 4 | { 5 | public const byte Unused = 0; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Software/CSharp/GoPiGo/EncoderController.cs: -------------------------------------------------------------------------------- 1 | namespace GoPiGo 2 | { 3 | public interface IEncoderController 4 | { 5 | IEncoderController SetEncoderTargetingOn(State motorOneState, State motorTwoStatem, int target); 6 | int ReadEncoder(Motor motor); 7 | IEncoderController EnableEncoders(); 8 | IEncoderController DisableEncoders(); 9 | } 10 | 11 | public class EncoderController : IEncoderController 12 | { 13 | private readonly GoPiGo _goPiGo; 14 | 15 | public EncoderController(GoPiGo goPiGo) 16 | { 17 | _goPiGo = goPiGo; 18 | } 19 | 20 | public IEncoderController SetEncoderTargetingOn(State motorOneState, State motorTwoState, int target) 21 | { 22 | var motorSelect = (int)motorOneState * 2 + (int)motorTwoState; 23 | _goPiGo.RunCommand(Commands.SetEncoderTargeting, (byte)motorSelect, (byte)(target / 256), (byte)(target % 256)); 24 | return this; 25 | } 26 | 27 | public int ReadEncoder(Motor motor) 28 | { 29 | var buffer = new[] { (byte)Commands.ReadEncoder, (byte)motor, Constants.Unused, Constants.Unused }; 30 | _goPiGo.DirectAccess.Write(buffer); 31 | 32 | _goPiGo.DirectAccess.Read(buffer); 33 | 34 | int encoder = buffer[1] * 256 + buffer[2]; 35 | return encoder; 36 | } 37 | 38 | public IEncoderController EnableEncoders() 39 | { 40 | _goPiGo.RunCommand(Commands.EnableEncoder); 41 | return this; 42 | } 43 | 44 | public IEncoderController DisableEncoders() 45 | { 46 | _goPiGo.RunCommand(Commands.DisableEncoder); 47 | return this; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Software/CSharp/GoPiGo/Motor.cs: -------------------------------------------------------------------------------- 1 | namespace GoPiGo 2 | { 3 | public enum Motor 4 | { 5 | MotorOne = 0, 6 | MotorTwo = 1 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Software/CSharp/GoPiGo/Pin.cs: -------------------------------------------------------------------------------- 1 | namespace GoPiGo 2 | { 3 | public enum Pin 4 | { 5 | LedLeft = 10, 6 | LedRight = 5, 7 | Analog1 = 15, 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Software/CSharp/GoPiGo/PinMode.cs: -------------------------------------------------------------------------------- 1 | namespace GoPiGo 2 | { 3 | public enum PinMode 4 | { 5 | Input = 0, 6 | Output = 1 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Software/CSharp/GoPiGo/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("GoPiGo")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("GoPiGo")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /Software/CSharp/GoPiGo/Properties/GoPiGo.rd.xml: -------------------------------------------------------------------------------- 1 | 2 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Software/CSharp/GoPiGo/Sensors/Led.cs: -------------------------------------------------------------------------------- 1 | namespace GoPiGo.Sensors 2 | { 3 | public interface ILed 4 | { 5 | SensorStatus CurrentState { get; } 6 | ILed ChangeState(SensorStatus newState); 7 | } 8 | 9 | internal class Led : Sensor, ILed 10 | { 11 | internal Led(IGoPiGo device, Pin pin) : base(device, pin, PinMode.Output) 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Software/CSharp/GoPiGo/Sensors/SensorStatus.cs: -------------------------------------------------------------------------------- 1 | namespace GoPiGo.Sensors 2 | { 3 | public enum SensorStatus 4 | { 5 | Off = 0, 6 | On = 1 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Software/CSharp/GoPiGo/Sensors/Sensorcs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace GoPiGo.Sensors 8 | { 9 | public abstract class Sensor where TSensorType : class 10 | { 11 | protected readonly IGoPiGo Device; 12 | protected readonly Pin Pin; 13 | 14 | internal Sensor(IGoPiGo device, Pin pin, PinMode pinMode) 15 | { 16 | if (device == null) throw new ArgumentNullException(nameof(device)); 17 | device.PinMode(Pin, pinMode); 18 | Device = device; 19 | Pin = pin; 20 | } 21 | 22 | internal Sensor(IGoPiGo device, Pin pin) 23 | { 24 | if (device == null) throw new ArgumentNullException(nameof(device)); 25 | Device = device; 26 | Pin = pin; 27 | } 28 | 29 | public SensorStatus CurrentState => (SensorStatus)Device.DigitalRead(Pin); 30 | 31 | public TSensorType ChangeState(SensorStatus newState) 32 | { 33 | Device.DigitalWrite(Pin, (byte)newState); 34 | return this as TSensorType; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Software/CSharp/GoPiGo/Sensors/UltrasonicRangerSensor.cs: -------------------------------------------------------------------------------- 1 | namespace GoPiGo.Sensors 2 | { 3 | public interface IUltrasonicRangerSensor 4 | { 5 | int MeasureInCentimeters(); 6 | } 7 | 8 | internal class UltrasonicRangerSensor : IUltrasonicRangerSensor 9 | { 10 | private const byte CommandAddress = 117; 11 | private readonly GoPiGo _device; 12 | private readonly Pin _pin; 13 | 14 | internal UltrasonicRangerSensor(GoPiGo device, Pin pin) 15 | { 16 | _device = device; 17 | _pin = pin; 18 | } 19 | 20 | public int MeasureInCentimeters() 21 | { 22 | var buffer = new[] { CommandAddress, (byte)_pin, Constants.Unused, Constants.Unused }; 23 | _device.DirectAccess.Write(buffer); 24 | _device.DirectAccess.Read(buffer); 25 | return buffer[1] * 256 + buffer[2]; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Software/CSharp/GoPiGo/State.cs: -------------------------------------------------------------------------------- 1 | namespace GoPiGo 2 | { 3 | public enum State 4 | { 5 | Disabled = 0, 6 | Enabled = 1 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Software/CSharp/GoPiGo/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0", 4 | "System.Numerics.Vectors": "4.1.0" 5 | }, 6 | "frameworks": { 7 | "uap10.0": {} 8 | }, 9 | "runtimes": { 10 | "win10-arm": {}, 11 | "win10-arm-aot": {}, 12 | "win10-x86": {}, 13 | "win10-x86-aot": {}, 14 | "win10-x64": {}, 15 | "win10-x64-aot": {} 16 | } 17 | } -------------------------------------------------------------------------------- /Software/CSharp/README.md: -------------------------------------------------------------------------------- 1 | # GoPiGo 2 | 3 | The GoPiGo is a delightful and complete robot for the Raspberry Pi that turns your Pi into a fully operating robot. GoPiGo is a mobile robotic platform for the Raspberry Pi developed by [Dexter Industries.](http://www.dexterindustries.com/GoPiGo) 4 | 5 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Chassis-300.jpg) 6 | 7 | This repository contains source code, firmware and design materials for the GoPiGo. 8 | 9 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Front_Facing_Camera300.jpg) 10 | 11 | # See Also 12 | 13 | - [Dexter Industries](http://www.dexterindustries.com/GoPiGo) 14 | - [Kickstarter Campaign](http://kck.st/Q6vVOP) 15 | - [Raspberry Pi](http://www.raspberrypi.org/) 16 | 17 | ## License 18 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi. 19 | Copyright (C) 2017 Dexter Industries 20 | 21 | This program is free software: you can redistribute it and/or modify 22 | it under the terms of the GNU General Public License as published by 23 | the Free Software Foundation, either version 3 of the License, or 24 | (at your option) any later version. 25 | 26 | This program is distributed in the hope that it will be useful, 27 | but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | GNU General Public License for more details. 30 | 31 | You should have received a copy of the GNU General Public License 32 | along with this program. If not, see . -------------------------------------------------------------------------------- /Software/CSharp/packages/System.Numerics.Vectors.4.0.0/System.Numerics.Vectors.4.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/CSharp/packages/System.Numerics.Vectors.4.0.0/System.Numerics.Vectors.4.0.0.nupkg -------------------------------------------------------------------------------- /Software/CSharp/packages/System.Numerics.Vectors.4.0.0/[Content_Types].xml: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Software/CSharp/packages/System.Numerics.Vectors.4.0.0/lib/portable-net45+win8+wpa81/System.Numerics.Vectors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/CSharp/packages/System.Numerics.Vectors.4.0.0/lib/portable-net45+win8+wpa81/System.Numerics.Vectors.dll -------------------------------------------------------------------------------- /Software/CSharp/packages/System.Numerics.Vectors.4.0.0/lib/win8/System.Numerics.Vectors.WindowsRuntime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/CSharp/packages/System.Numerics.Vectors.4.0.0/lib/win8/System.Numerics.Vectors.WindowsRuntime.dll -------------------------------------------------------------------------------- /Software/CSharp/packages/System.Numerics.Vectors.4.0.0/lib/win8/System.Numerics.Vectors.WindowsRuntime.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | System.Numerics.Vectors.WindowsRuntime 5 | 6 | 7 | 8 | 9 | Contains conversions from Vector2 to Windows.Foundation.Point and Size, which are all structurally identical. 10 | 11 | 12 | 13 | 14 | Returns a Point whose coordinates are the same as the vector's. 15 | 16 | The Vector2 to convert. 17 | The Point. 18 | 19 | 20 | 21 | Returns a Size whose width and height are equal to the vector's X and Y coordinates. 22 | 23 | The Vector2 to convert. 24 | The Size. 25 | 26 | 27 | 28 | Returns a Vector2 whose coordinates are the same as the Point's. 29 | 30 | The Point to convert. 31 | The Vector2. 32 | 33 | 34 | 35 | Returns a Vector2 whose coordinates are the height and width of the Size. 36 | 37 | The Size to convert. 38 | The Vector2. 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Software/CSharp/packages/System.Numerics.Vectors.4.0.0/lib/win8/System.Numerics.Vectors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/CSharp/packages/System.Numerics.Vectors.4.0.0/lib/win8/System.Numerics.Vectors.dll -------------------------------------------------------------------------------- /Software/Client_Server/README.md: -------------------------------------------------------------------------------- 1 | # GoPiGo Client Server 2 | 3 | ## This is a basic example for a socket-client server for the GoPiGo. 4 | The example client server are written in Python. 5 | 6 | The client can be easily ported to other languages since it's a basic client example and the python server can be run with python. This allows the GoPiGo to be portable to other languages easily without the need to write a basic library for the low level I2C commands. 7 | 8 | The socket server accepts commands from the client and controls the GoPiGo 9 | The socket server is running on Port 5005 on localhost 10 | 11 | Send a single byte command to the server from the client: 12 | s - stop 13 | f - move forward 14 | b - move back 15 | l - turn left 16 | r - turn right 17 | 18 | The server is just a very basic instance right now and we plan to expand it in the near future 19 | 20 | 21 | ## License 22 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi. 23 | Copyright (C) 2017 Dexter Industries 24 | 25 | This program is free software: you can redistribute it and/or modify 26 | it under the terms of the GNU General Public License as published by 27 | the Free Software Foundation, either version 3 of the License, or 28 | (at your option) any later version. 29 | 30 | This program is distributed in the hope that it will be useful, 31 | but WITHOUT ANY WARRANTY; without even the implied warranty of 32 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 33 | GNU General Public License for more details. 34 | 35 | You should have received a copy of the GNU General Public License 36 | along with this program. If not, see . -------------------------------------------------------------------------------- /Software/Client_Server/cli.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # This is a basic example for a socket client for the GoPiGo. 4 | # This connects to the GoPiGo socket server and can be used to send commands to run the GoPiGo 5 | # the socket server is running on Port 5005 on localhost 6 | 7 | # Send a single byte command to the server: 8 | # s - stop 9 | # f - move forward 10 | # b - move back 11 | # l - turn left 12 | # r - turn right 13 | 14 | ''' 15 | ## License 16 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi. 17 | Copyright (C) 2017 Dexter Industries 18 | 19 | This program is free software: you can redistribute it and/or modify 20 | it under the terms of the GNU General Public License as published by 21 | the Free Software Foundation, either version 3 of the License, or 22 | (at your option) any later version. 23 | 24 | This program is distributed in the hope that it will be useful, 25 | but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 | GNU General Public License for more details. 28 | 29 | You should have received a copy of the GNU General Public License 30 | along with this program. If not, see . 31 | ''' 32 | 33 | import socket 34 | import time 35 | def send(msg): 36 | TCP_IP = '127.0.0.1' 37 | TCP_PORT = 5005 38 | BUFFER_SIZE = 1024 39 | MESSAGE = msg 40 | 41 | #Create a socket 42 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 43 | #Connect to the server 44 | s.connect((TCP_IP, TCP_PORT)) 45 | #Send the command 46 | s.send(MESSAGE) 47 | #Recieve response back 48 | data = s.recv(BUFFER_SIZE) 49 | s.close() 50 | return data 51 | 52 | 53 | print send('f') 54 | time.sleep(2) 55 | print send('b') 56 | time.sleep(2) 57 | print send('l') 58 | time.sleep(2) 59 | print send('r') 60 | time.sleep(2) 61 | print send('s') -------------------------------------------------------------------------------- /Software/Java/config/default.properties: -------------------------------------------------------------------------------- 1 | debug=true 2 | logDir=../log 3 | logFile=all.log -------------------------------------------------------------------------------- /Software/Java/doc/com/dexterind/gopigo/behaviours/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.dexterind.gopigo.behaviours 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | com.dexterind.gopigo.behaviours 20 | 21 | 22 | 27 | 28 |
23 | Classes  24 | 25 |
26 | Motion
29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Software/Java/doc/com/dexterind/gopigo/components/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.dexterind.gopigo.components 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | com.dexterind.gopigo.components 20 | 21 | 22 | 39 | 40 |
23 | Classes  24 | 25 |
26 | Board 27 |
28 | Encoders 29 |
30 | IRReceiverSensor 31 |
32 | Led 33 |
34 | Motor 35 |
36 | Servo 37 |
38 | UltraSonicSensor
41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /Software/Java/doc/com/dexterind/gopigo/events/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.dexterind.gopigo.events 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | com.dexterind.gopigo.events 20 | 21 | 22 | 29 | 30 |
23 | Classes  24 | 25 |
26 | StatusEvent 27 |
28 | VoltageEvent
31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Software/Java/doc/com/dexterind/gopigo/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.dexterind.gopigo 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | com.dexterind.gopigo 20 | 21 | 22 | 27 | 28 |
23 | Interfaces  24 | 25 |
26 | GopigoListener
29 | 30 | 31 | 32 | 33 | 38 | 39 |
34 | Classes  35 | 36 |
37 | Gopigo
40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Software/Java/doc/com/dexterind/gopigo/utils/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | com.dexterind.gopigo.utils 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | com.dexterind.gopigo.utils 20 | 21 | 22 | 31 | 32 |
23 | Classes  24 | 25 |
26 | Commands 27 |
28 | Debug 29 |
30 | Statuses
33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Software/Java/doc/overview-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Overview List 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 |
22 |
25 | 26 | 27 | 28 | 44 | 45 |
All Classes 29 |

30 | 31 | Packages 32 |
33 | com.dexterind.gopigo 34 |
35 | com.dexterind.gopigo.behaviours 36 |
37 | com.dexterind.gopigo.components 38 |
39 | com.dexterind.gopigo.events 40 |
41 | com.dexterind.gopigo.utils 42 |
43 |

46 | 47 |

48 |   49 | 50 | 51 | -------------------------------------------------------------------------------- /Software/Java/doc/package-list: -------------------------------------------------------------------------------- 1 | com.dexterind.gopigo 2 | com.dexterind.gopigo.behaviours 3 | com.dexterind.gopigo.components 4 | com.dexterind.gopigo.events 5 | com.dexterind.gopigo.utils 6 | -------------------------------------------------------------------------------- /Software/Java/doc/resources/inherit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Java/doc/resources/inherit.gif -------------------------------------------------------------------------------- /Software/Java/doc/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Software/Java/doc/stylesheet.css: -------------------------------------------------------------------------------- 1 | /* Javadoc style sheet */ 2 | 3 | /* Define colors, fonts and other style attributes here to override the defaults */ 4 | 5 | /* Page background color */ 6 | body { background-color: #FFFFFF; color:#000000 } 7 | 8 | /* Headings */ 9 | h1 { font-size: 145% } 10 | 11 | /* Table colors */ 12 | .TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */ 13 | .TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */ 14 | .TableRowColor { background: #FFFFFF; color:#000000 } /* White */ 15 | 16 | /* Font used in left-hand frame lists */ 17 | .FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 } 18 | .FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } 19 | .FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } 20 | 21 | /* Navigation bar fonts and colors */ 22 | .NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */ 23 | .NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */ 24 | .NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;} 25 | .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;} 26 | 27 | .NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} 28 | .NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} 29 | 30 | -------------------------------------------------------------------------------- /Software/Java/scripts/Test.sh: -------------------------------------------------------------------------------- 1 | #/usr/bin/env bash 2 | # $ JAVA_OPTS='-Dconfig=default' Java/bin/runTest.sh 3 | cd ./bin; sudo java $JAVA_OPTS -classpath .:classes:/opt/pi4j/lib/'*' Test -------------------------------------------------------------------------------- /Software/Java/scripts/compile.sh: -------------------------------------------------------------------------------- 1 | #/usr/bin/env bash 2 | mkdir -p ./bin 3 | javac -d ./bin -classpath .:classes:/opt/pi4j/lib/'*' ./src/com/dexterind/gopigo/*.java ./src/com/dexterind/gopigo/behaviours/*.java ./src/com/dexterind/gopigo/components/*.java ./src/com/dexterind/gopigo/events/*.java ./src/com/dexterind/gopigo/utils/*.java ./test/tests/*.java ./test/*.java; -------------------------------------------------------------------------------- /Software/Java/src/com/dexterind/gopigo/GopigoListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ********************************************************************** 4 | * ORGANIZATION : DexterIndustries 5 | * PROJECT : GoPiGo Java Library 6 | * FILENAME : GopigoListener.java 7 | * AUTHOR : Marcello Barile 8 | * 9 | * This file is part of the GoPiGo Java Library project. More information about 10 | * this project can be found here: https://github.com/DexterInd/GoPiGo 11 | * ********************************************************************** 12 | * %% 13 | * GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi. 14 | * Copyright (C) 2017 Dexter Industries 15 | 16 | * This program is free software: you can redistribute it and/or modify 17 | * it under the terms of the GNU General Public License as published by 18 | * the Free Software Foundation, either version 3 of the License, or 19 | * (at your option) any later version. 20 | 21 | * This program is distributed in the hope that it will be useful, 22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 24 | * GNU General Public License for more details. 25 | 26 | * You should have received a copy of the GNU General Public License 27 | * along with this program. If not, see . 28 | * 29 | * #L% 30 | */ 31 | package com.dexterind.gopigo; 32 | 33 | import com.dexterind.gopigo.events.*; 34 | import java.util.EventListener; 35 | 36 | public interface GopigoListener extends EventListener { 37 | public void onStatusEvent(StatusEvent event); 38 | public void onVoltageEvent(VoltageEvent event); 39 | } -------------------------------------------------------------------------------- /Software/Java/src/com/dexterind/gopigo/utils/Statuses.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ********************************************************************** 4 | * ORGANIZATION : DexterIndustries 5 | * PROJECT : GoPiGo Java Library 6 | * FILENAME : Statuses.java 7 | * AUTHOR : Marcello Barile 8 | * 9 | * This file is part of the GoPiGo Java Library project. More information about 10 | * this project can be found here: https://github.com/DexterInd/GoPiGo 11 | * ********************************************************************** 12 | * %% 13 | * GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi. 14 | * Copyright (C) 2017 Dexter Industries 15 | 16 | * This program is free software: you can redistribute it and/or modify 17 | * it under the terms of the GNU General Public License as published by 18 | * the Free Software Foundation, either version 3 of the License, or 19 | * (at your option) any later version. 20 | 21 | * This program is distributed in the hope that it will be useful, 22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 24 | * GNU General Public License for more details. 25 | 26 | * You should have received a copy of the GNU General Public License 27 | * along with this program. If not, see . 28 | * 29 | * #L% 30 | */ 31 | package com.dexterind.gopigo.utils; 32 | 33 | public class Statuses { 34 | /** 35 | * The OK status. This is returned by all the I2C methods. 36 | */ 37 | public static final int OK = 1; 38 | /** 39 | * The ERROR status. This is returned by the I2C methods in case of issues. 40 | */ 41 | public static final int ERROR = -1; 42 | /** 43 | * The INIT status. 44 | */ 45 | public static final int INIT = 2; 46 | /** 47 | * The HALT status. 48 | */ 49 | public static final int HALT = 3; 50 | 51 | public Statuses(){} 52 | } -------------------------------------------------------------------------------- /Software/Java/test/Test.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ********************************************************************** 4 | * ORGANIZATION : DexterIndustries 5 | * PROJECT : GoPiGo Java Library 6 | * FILENAME : Test.java 7 | * AUTHOR : Marcello Barile 8 | * 9 | * This file is part of the GoPiGo Java Library project. More information about 10 | * this project can be found here: https://github.com/DexterInd/GoPiGo 11 | * ********************************************************************** 12 | * %% 13 | * GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi. 14 | * Copyright (C) 2017 Dexter Industries 15 | 16 | * This program is free software: you can redistribute it and/or modify 17 | * it under the terms of the GNU General Public License as published by 18 | * the Free Software Foundation, either version 3 of the License, or 19 | * (at your option) any later version. 20 | 21 | * This program is distributed in the hope that it will be useful, 22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 24 | * GNU General Public License for more details. 25 | 26 | * You should have received a copy of the GNU General Public License 27 | * along with this program. If not, see . 28 | * 29 | * #L% 30 | */ 31 | 32 | /* Run: Java$ ./bin/compile.sh && ./bin/Test.sh */ 33 | import java.io.IOException; 34 | import tests.*; 35 | 36 | public class Test { 37 | public static void main(String[] args) throws IOException, InterruptedException { 38 | GopigoCommanderTest gopigoTest = new GopigoCommanderTest(); 39 | } 40 | } -------------------------------------------------------------------------------- /Software/NodeJS/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## How to contribute to GoPiGo for Node.js 2 | 3 | * Before you open a ticket or send a pull request, [search](https://github.com/DexterInd/GoPiGo/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one. 4 | 5 | * Use the coding style suggested by [npmjs](https://docs.npmjs.com/misc/coding-style). 6 | 7 | * Be creative :-) -------------------------------------------------------------------------------- /Software/NodeJS/LICENSE: -------------------------------------------------------------------------------- 1 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi. 2 | Copyright (C) 2017 Dexter Industries 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . -------------------------------------------------------------------------------- /Software/NodeJS/libs/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /Software/NodeJS/libs/components/IRReceiverSensor.js: -------------------------------------------------------------------------------- 1 | var commands = require('../commands') 2 | 3 | var self 4 | 5 | function IRReceiverSensor(gopigo, pin) { 6 | self = this 7 | this.gopigo = gopigo 8 | this.pin = pin 9 | } 10 | 11 | IRReceiverSensor.prototype.setPin = function(pin) { 12 | this.pin = pin + 1 13 | } 14 | IRReceiverSensor.prototype.read = function() { 15 | this.write(commands.unused) 16 | var write = this.gopigo.board.writeBytes(commands.irRead.concat([commands.unused, commands.unused, commands.unused])) 17 | if (write) { 18 | this.gopigo.board.wait(100) 19 | this.board.readByte() 20 | var bytes = this.board.readBytes(22) 21 | if (bytes instanceof Buffer && bytes[1] != 255) { 22 | bytes.slice(0,1) 23 | return bytes 24 | } else { 25 | return false 26 | } 27 | } else { 28 | return false 29 | } 30 | } 31 | IRReceiverSensor.prototype.write = function(value) { 32 | return this.gopigo.board.writeBytes(commands.irRecvPin.concat([this.pin, value, commands.unused])) 33 | } 34 | 35 | module.exports = IRReceiverSensor -------------------------------------------------------------------------------- /Software/NodeJS/libs/components/encoders.js: -------------------------------------------------------------------------------- 1 | var commands = require('../commands') 2 | 3 | var self 4 | 5 | function Encoders(gopigo) { 6 | self = this 7 | this.gopigo = gopigo 8 | } 9 | 10 | Encoders.prototype.targeting = function(m1, m2, target) { 11 | if (m1 > 1 || m1 < 0 || m2 > 1 || m2 < 0) 12 | return false 13 | var mSel = m1 * 2 + m2 14 | return this.gopigo.board.writeBytes(commands.enc_tgt.concat([mSel, target / 256, target % 256])) 15 | } 16 | Encoders.prototype.read = function(motor) { 17 | var write = this.gopigo.board.writeBytes(commands.enc_read.concat([motor, commands.unused, commands.unused])) 18 | if (write) { 19 | this.gopigo.board.wait(80) 20 | var b1 = this.gopigo.board.readByte() 21 | var b2 = this.gopigo.board.readByte() 22 | if (b1[0] != -1 && b2[0] != -1) { 23 | return b1[0] * 256 + b2[0] 24 | } else 25 | return false 26 | } else { 27 | return false 28 | } 29 | } 30 | Encoders.prototype.readStatus = function() { 31 | var status = this.gopigo.board.readStatus() 32 | return status[0] 33 | } 34 | Encoders.prototype.enable = function() { 35 | return this.gopigo.board.writeBytes(commands.en_enc.concat([commands.unused, commands.unused, commands.unused])) 36 | } 37 | Encoders.prototype.disable = function() { 38 | return this.gopigo.board.writeBytes(commands.dis_enc.concat([commands.unused, commands.unused, commands.unused])) 39 | } 40 | 41 | module.exports = Encoders 42 | -------------------------------------------------------------------------------- /Software/NodeJS/libs/components/led.js: -------------------------------------------------------------------------------- 1 | var commands = require('../commands') 2 | 3 | Led.LEFT_PIN_A = 10 4 | Led.LEFT_PIN_B = 17 5 | Led.RIGHT_PIN_A = 5 6 | Led.RIGHT_PIN_B = 16 7 | Led.LEFT = 1 8 | Led.RIGHT = 0 9 | 10 | var self 11 | 12 | function Led(gopigo, id) { 13 | self = this 14 | this.gopigo = gopigo 15 | this.pin = 0 16 | this.id = id 17 | } 18 | 19 | Led.prototype.setPin = function() { 20 | var vol = this.gopigo.board.analogRead(7) 21 | var left_pin = 0 22 | var right_pin = 0 23 | if (vol > 700) { 24 | left_pin = Led.LEFT_PIN_B 25 | right_pin = Led.RIGHT_PIN_B 26 | } else { 27 | left_pin = Led.LEFT_PIN_A 28 | right_pin = Led.RIGHT_PIN_A 29 | } 30 | this.pin = this.id == Led.LEFT ? left_pin : right_pin 31 | } 32 | Led.prototype.on = function() { 33 | if (this.pin == 0) { 34 | this.setPin() 35 | } 36 | this.gopigo.board.pinMode(this.pin, this.gopigo.board.OUTPUT) 37 | return this.gopigo.board.digitalWrite(this.pin, 1) 38 | } 39 | Led.prototype.off = function() { 40 | if (this.pin == 0) { 41 | this.setPin() 42 | } 43 | this.gopigo.board.pinMode(this.pin, this.gopigo.board.OUTPUT) 44 | return this.gopigo.board.digitalWrite(this.pin, 0) 45 | } 46 | 47 | module.exports = Led -------------------------------------------------------------------------------- /Software/NodeJS/libs/components/motor.js: -------------------------------------------------------------------------------- 1 | var commands = require('../commands') 2 | 3 | Motor.LEFT_COMMAND = 10 4 | Motor.RIGHT_COMMAND = 5 5 | Motor.FORWARD = 1 6 | Motor.BACKWARD = 0 7 | Motor.LEFT = 1 8 | Motor.RIGHT = 0 9 | 10 | var self 11 | 12 | function Motor(gopigo, id) { 13 | self = this 14 | this.gopigo = gopigo 15 | this.command = id == Motor.LEFT ? Motor.LEFT_COMMAND : Motor.RIGHT_COMMAND 16 | } 17 | 18 | Motor.prototype.move = function(direction, speed) { 19 | return this.gopigo.board.writeBytes(this.command.concat([direction, speed, commands.unused])) 20 | } 21 | 22 | module.exports = Motor -------------------------------------------------------------------------------- /Software/NodeJS/libs/components/servo.js: -------------------------------------------------------------------------------- 1 | var commands = require('../commands') 2 | 3 | var self 4 | 5 | function Servo(gopigo) { 6 | self = this 7 | this.gopigo = gopigo 8 | } 9 | 10 | Servo.prototype.move = function(position) { 11 | var write = this.gopigo.board.writeBytes(commands.servo.concat([position, commands.unused, commands.unused])) 12 | if (write) { 13 | this.position = position 14 | return true 15 | } else { 16 | return false 17 | } 18 | } 19 | Servo.prototype.enable = function() { 20 | return this.gopigo.board.writeBytes(commands.en_servo.concat([commands.unused, commands.unused, commands.unused])) 21 | } 22 | Servo.prototype.disable = function() { 23 | return this.gopigo.board.writeBytes(commands.dis_servo.concat([commands.unused, commands.unused, commands.unused])) 24 | } 25 | 26 | module.exports = Servo -------------------------------------------------------------------------------- /Software/NodeJS/libs/components/ultraSonicSensor.js: -------------------------------------------------------------------------------- 1 | var commands = require('../commands') 2 | 3 | var self 4 | 5 | function UltraSonicSensor(gopigo, pin) { 6 | self = this 7 | this.gopigo = gopigo 8 | this.pin = pin 9 | } 10 | 11 | UltraSonicSensor.prototype.setPin = function(pin) { 12 | this.pin = pin 13 | } 14 | UltraSonicSensor.prototype.getDistance = function() { 15 | var write = this.gopigo.board.writeBytes(commands.us.concat([this.pin, commands.unused, commands.unused])) 16 | if (write) { 17 | this.gopigo.board.wait(80) 18 | var b1 = this.gopigo.board.readByte() 19 | var b2 = this.gopigo.board.readByte() 20 | if (b1[0] != -1 && b2[0] != -1) 21 | return (b1[0] * 256 + b2[0]) 22 | else 23 | return false 24 | } else { 25 | return false 26 | } 27 | } 28 | 29 | module.exports = UltraSonicSensor -------------------------------------------------------------------------------- /Software/NodeJS/libs/index.js: -------------------------------------------------------------------------------- 1 | module.exports.Gopigo = { 2 | commands: require('./commands') 3 | , robot: require('./gopigo') 4 | } -------------------------------------------------------------------------------- /Software/NodeJS/libs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-gopigo", 3 | "version": "2.0.5", 4 | "description": "GoPiGo library for Node.js", 5 | "keywords": [ 6 | "gopigo", 7 | "robot", 8 | "gpio", 9 | "i2c" 10 | ], 11 | "dependencies": { 12 | "async": "1.*", 13 | "buffertools": "2.1.*", 14 | "i2c-bus": "1.*", 15 | "npmlog": "2.*", 16 | "sleep": "3.*" 17 | }, 18 | "main": "index.js", 19 | "scripts": { 20 | "test": "echo \"Error: no test specified\" && exit 1" 21 | }, 22 | "repository": { 23 | "type": "git", 24 | "url": "git://github.com/marcellobarile/GoPiGo.git" 25 | }, 26 | "author": "Marcello Barile (http://www.barile.eu)", 27 | "license": "MIT", 28 | "bugs": { 29 | "url": "https://github.com/marcellobarile/GoPiGo/issues" 30 | }, 31 | "homepage": "https://github.com/marcellobarile/GoPiGo" 32 | } 33 | -------------------------------------------------------------------------------- /Software/Python/Examples/Basic_Robot_Control/Basic_Raspberry_Pi_Robot_Control.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Python/Examples/Basic_Robot_Control/Basic_Raspberry_Pi_Robot_Control.jpg -------------------------------------------------------------------------------- /Software/Python/Examples/Basic_Robot_Control/README.md: -------------------------------------------------------------------------------- 1 | ## Basic Robot Control 2 | ### Basic example for controlling the GoPiGo using the Keyboard 3 | 4 | ![Basic Robot Control](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/Software/Python/Examples/Basic_Robot_Control/Basic_Raspberry_Pi_Robot_Control.jpg "GoPiGo Rasberry Pi Robot Controlled with a Keyboard") 5 | 6 | **Control:** 7 | 8 | - w: Move forward 9 | - a: Turn left 10 | - d: Turn right 11 | - s: Move back 12 | - x: Stop 13 | - t: Increase speed 14 | - g: Decrease speed 15 | - z: Exit 16 | 17 | 18 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Chassis-300.jpg) 19 | 20 | This repository contains source code, firmware and design materials for the GoPiGo. 21 | 22 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Front_Facing_Camera300.jpg) 23 | 24 | # See Also 25 | 26 | - [Dexter Industries](http://www.dexterindustries.com/GoPiGo) 27 | - [Kickstarter Campaign](http://kck.st/Q6vVOP) 28 | - [Raspberry Pi](http://www.raspberrypi.org/) 29 | 30 | 31 | ## License 32 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi. 33 | Copyright (C) 2015 Dexter Industries 34 | 35 | This program is free software: you can redistribute it and/or modify 36 | it under the terms of the GNU General Public License as published by 37 | the Free Software Foundation, either version 3 of the License, or 38 | (at your option) any later version. 39 | 40 | This program is distributed in the hope that it will be useful, 41 | but WITHOUT ANY WARRANTY; without even the implied warranty of 42 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 43 | GNU General Public License for more details. 44 | 45 | You should have received a copy of the GNU General Public License 46 | along with this program. If not, see . -------------------------------------------------------------------------------- /Software/Python/Examples/Basic_Robot_Control_GUI/Basic_Raspberry_Pi_Robot_Control_GUI.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Python/Examples/Basic_Robot_Control_GUI/Basic_Raspberry_Pi_Robot_Control_GUI.jpg -------------------------------------------------------------------------------- /Software/Python/Examples/Basic_Servo/README.md: -------------------------------------------------------------------------------- 1 | ## basic_servo.py 2 | ### This example demonstrates controlling the Servo on the GoPiGo robot. 3 | In this example, we control the servo with a keyboard. 4 | - Press "a" to move the servo left 5 | - Press "d" to move the servo right 6 | - Press "s" to move the servo to home position 7 | 8 | 9 | 10 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Chassis-300.jpg) 11 | 12 | This repository contains source code, firmware and design materials for the GoPiGo. 13 | 14 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Front_Facing_Camera300.jpg) 15 | 16 | # See Also 17 | 18 | - [Dexter Industries](http://www.dexterindustries.com/GoPiGo) 19 | - [Kickstarter Campaign](http://kck.st/Q6vVOP) 20 | - [Raspberry Pi](http://www.raspberrypi.org/) 21 | 22 | 23 | ## License 24 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi. 25 | Copyright (C) 2015 Dexter Industries 26 | 27 | This program is free software: you can redistribute it and/or modify 28 | it under the terms of the GNU General Public License as published by 29 | the Free Software Foundation, either version 3 of the License, or 30 | (at your option) any later version. 31 | 32 | This program is distributed in the hope that it will be useful, 33 | but WITHOUT ANY WARRANTY; without even the implied warranty of 34 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 35 | GNU General Public License for more details. 36 | 37 | You should have received a copy of the GNU General Public License 38 | along with this program. If not, see . -------------------------------------------------------------------------------- /Software/Python/Examples/Browser_Streaming_Robot/COPYING: -------------------------------------------------------------------------------- 1 | The code is Licensed under Creative Commons Attribution-ShareAlike 3.0 license. 2 | 3 | The code from the python example by Dawn Robotics Ltd is licensed under the BSD license. 4 | 5 | Of the included JavaScript libraries, jQuery and SockJS are licensed under the MIT license. Our joystick class jquery.joystick.js is a modified version of https://github.com/mifi/jquery-joystick. This project doesn't have a license but obviously all derived projects should link back and provide acknowledgement. 6 | -------------------------------------------------------------------------------- /Software/Python/Examples/Browser_Streaming_Robot/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Dawn Robotics Ltd 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the Dawn Robotics Ltd nor the names of its contributors 15 | may be used to endorse or promote products derived from this software without 16 | specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /Software/Python/Examples/Browser_Streaming_Robot/Raspberry_Pi_Camera_controlled-by-mobile-browser.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Python/Examples/Browser_Streaming_Robot/Raspberry_Pi_Camera_controlled-by-mobile-browser.jpg -------------------------------------------------------------------------------- /Software/Python/Examples/Browser_Streaming_Robot/Raspberry_Pi_Camera_streaming-to-computer-browser.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Python/Examples/Browser_Streaming_Robot/Raspberry_Pi_Camera_streaming-to-computer-browser.jpg -------------------------------------------------------------------------------- /Software/Python/Examples/Browser_Streaming_Robot/Raspberry_Pi_Camera_streaming-to-mobile-browser.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Python/Examples/Browser_Streaming_Robot/Raspberry_Pi_Camera_streaming-to-mobile-browser.jpg -------------------------------------------------------------------------------- /Software/Python/Examples/Browser_Streaming_Robot/www/images/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Python/Examples/Browser_Streaming_Robot/www/images/ajax-loader.gif -------------------------------------------------------------------------------- /Software/Python/Examples/Browser_Streaming_Robot/www/logs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Logs 6 | 7 | 8 | 9 | 10 | 46 | 47 | 48 |
49 |

50 |

51 |         
52 |         

53 |     
54 | 


--------------------------------------------------------------------------------
/Software/Python/Examples/Compass_Robot/README.md:
--------------------------------------------------------------------------------
 1 | ## Compass Bot
 2 | ### This is for using the GoPiGo with the compass as a turtle robot
 3 | This bot uses the grove compass module 
 4 | 
 5 | **Use the following commands for controlling the compass bot**
 6 | - _f dist_ 	:	move forward by "dist" (distance = dist/4 encoder counts. 1 rotation=18 encoder counts) e.g.: f 100
 7 | - _l deg_	:	rotate left by "deg" (l 45)
 8 | - _r deg_	:	rotate right by "deg" (r 45)
 9 | 
10 | 
11 | 
12 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Chassis-300.jpg)
13 | 
14 | This repository contains source code, firmware and design materials for the GoPiGo.
15 | 
16 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Front_Facing_Camera300.jpg)
17 | 
18 | # See Also
19 | 
20 | - [Dexter Industries](http://www.dexterindustries.com/GoPiGo)
21 | - [Kickstarter Campaign](http://kck.st/Q6vVOP)
22 | - [Raspberry Pi](http://www.raspberrypi.org/)
23 | 
24 | 
25 | ## License
26 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi.
27 | Copyright (C) 2017  Dexter Industries
28 | 
29 | This program is free software: you can redistribute it and/or modify
30 | it under the terms of the GNU General Public License as published by
31 | the Free Software Foundation, either version 3 of the License, or
32 | (at your option) any later version.
33 | 
34 | This program is distributed in the hope that it will be useful,
35 | but WITHOUT ANY WARRANTY; without even the implied warranty of
36 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
37 | GNU General Public License for more details.
38 | 
39 | You should have received a copy of the GNU General Public License
40 | along with this program.  If not, see .


--------------------------------------------------------------------------------
/Software/Python/Examples/Find_Hole/README.md:
--------------------------------------------------------------------------------
 1 | # Find Hole Example
 2 | 
 3 | This example will search for a "hole" for the [GoPiGo](http://www.dexterindustries.com/shop/gopigo-starter-kit-2/) to roll through.  It will stop if it does not find a suitable hole in the objects around it to go through.  The example uses the [GoPiGo Servo](http://www.dexterindustries.com/shop/servo-package/) and [GoPiGo Ultrasonic](http://www.dexterindustries.com/shop/ultrasonic-sensor/) sensor to find the holes.
 4 | 
 5 | The goal of this example is to allow the GoPiGo to:
 6 | 
 7 | 1. Move forward until it is within 20cm of an obstacle
 8 | 2. Stop and scan the immediate area to find a hole large enough for the chassis to fit
 9 | 3. Turn toward the hole.
10 | 4. Move forward through the hole.
11 | 5. Repeat
12 | 
13 | ## Note that if the robot can not find a hole in the 100 degree code in front of it, it will stop.  
14 | 


--------------------------------------------------------------------------------
/Software/Python/Examples/GPS_Bot/README.md:
--------------------------------------------------------------------------------
 1 | ## GPS Bot
 2 | - This example is for using the GoPiGo to move around and get the Latitude and Longitude coordinates and save them to a file
 3 | - You can run the **basic_robot_control** program to control the GoPiGo robot 
 4 | - Use the file "gps_hardware_test.py" to test your GPS hardware on the GoPiGo or GrovePi.
 5 | 
 6 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Chassis-300.jpg)
 7 | 
 8 | This repository contains source code, firmware and design materials for the GoPiGo.
 9 | 
10 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Front_Facing_Camera300.jpg)
11 | 
12 | # See Also
13 | 
14 | - [Dexter Industries](http://www.dexterindustries.com/GoPiGo)
15 | - [Raspberry Pi](http://www.raspberrypi.org/)
16 | 
17 | 
18 | ## License
19 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi.
20 | Copyright (C) 2016  Dexter Industries
21 | 
22 | This program is free software: you can redistribute it and/or modify
23 | it under the terms of the GNU General Public License as published by
24 | the Free Software Foundation, either version 3 of the License, or
25 | (at your option) any later version.
26 | 
27 | This program is distributed in the hope that it will be useful,
28 | but WITHOUT ANY WARRANTY; without even the implied warranty of
29 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30 | GNU General Public License for more details.
31 | 
32 | You should have received a copy of the GNU General Public License
33 | along with this program.  If not, see .


--------------------------------------------------------------------------------
/Software/Python/Examples/GPS_Guided_Robot/README.md:
--------------------------------------------------------------------------------
 1 | 
 2 | This project makes a GPS sensor guided Raspberry Pi robot.
 3 | Use the file "gps_hardware_test.py" to test your GPS hardware on the GoPiGo or GrovePi.
 4 | 
 5 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Chassis-300.jpg)
 6 | 
 7 | This repository contains source code for the GoPiGo.
 8 | 
 9 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Front_Facing_Camera300.jpg)
10 | 
11 | # See Also
12 | 
13 | - [Dexter Industries](http://www.dexterindustries.com/GoPiGo)
14 | - [Kickstarter Campaign](http://kck.st/Q6vVOP)
15 | - [Raspberry Pi](http://www.raspberrypi.org/)
16 | 
17 | 
18 | ## License
19 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi.
20 | Copyright (C) 2016  Dexter Industries
21 | 
22 | This program is free software: you can redistribute it and/or modify
23 | it under the terms of the GNU General Public License as published by
24 | the Free Software Foundation, either version 3 of the License, or
25 | (at your option) any later version.
26 | 
27 | This program is distributed in the hope that it will be useful,
28 | but WITHOUT ANY WARRANTY; without even the implied warranty of
29 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30 | GNU General Public License for more details.
31 | 
32 | You should have received a copy of the GNU General Public License
33 | along with this program.  If not, see .


--------------------------------------------------------------------------------
/Software/Python/Examples/Gamepad/gpg_and_f710.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Python/Examples/Gamepad/gpg_and_f710.jpg


--------------------------------------------------------------------------------
/Software/Python/Examples/Gamepad/show_buttons.py:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/python
 2 | 
 3 | ###############################################################                                                                  
 4 | # Displays gamepad button keycodes
 5 | #
 6 | # History
 7 | # ------------------------------------------------
 8 | # Author                Date      		Comments
 9 | # Eric Goebelbecker     Jun 6 2015 		Initial Authoring
10 | # 			                                                         
11 | '''
12 | ## License
13 |  GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi.
14 |  Copyright (C) 2017  Dexter Industries
15 | 
16 | This program is free software: you can redistribute it and/or modify
17 | it under the terms of the GNU General Public License as published by
18 | the Free Software Foundation, either version 3 of the License, or
19 | (at your option) any later version.
20 | 
21 | This program is distributed in the hope that it will be useful,
22 | but WITHOUT ANY WARRANTY; without even the implied warranty of
23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24 | GNU General Public License for more details.
25 | 
26 | You should have received a copy of the GNU General Public License
27 | along with this program.  If not, see .
28 | '''         
29 | #
30 | ###############################################################
31 | from select import select
32 | from evdev import InputDevice, categorize, ecodes, KeyEvent
33 | gamepad = InputDevice('/dev/input/event0')
34 | 
35 | for event in gamepad.read_loop():
36 |     if event.type == ecodes.EV_KEY:
37 |         keyevent = categorize(event)
38 |         if keyevent.keystate == KeyEvent.key_down:
39 |             print keyevent.keycode
40 | 
41 | 


--------------------------------------------------------------------------------
/Software/Python/Examples/LED_Blink/README.md:
--------------------------------------------------------------------------------
 1 | ## LED Blink
 2 | ### This example is to show how to use the LED's with the GoPiGo
 3 | There are 2 examples in this project:
 4 | * **led_blink.py**: Blink the LED's built in on the GoPiGo
 5 | * **grove_port_led_blink.py**: Example to blink Grove LED's connected to the Analog and digital Grove ports on the GoPiGo
 6 | 
 7 | 
 8 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Chassis-300.jpg)
 9 | 
10 | This repository contains source code, firmware and design materials for the GoPiGo.
11 | 
12 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Front_Facing_Camera300.jpg)
13 | 
14 | # See Also
15 | 
16 | - [Dexter Industries](http://www.dexterindustries.com/GoPiGo)
17 | - [Kickstarter Campaign](http://kck.st/Q6vVOP)
18 | - [Raspberry Pi](http://www.raspberrypi.org/)
19 | 
20 | 
21 | ## License
22 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi.
23 | Copyright (C) 2017  Dexter Industries
24 | 
25 | This program is free software: you can redistribute it and/or modify
26 | it under the terms of the GNU General Public License as published by
27 | the Free Software Foundation, either version 3 of the License, or
28 | (at your option) any later version.
29 | 
30 | This program is distributed in the hope that it will be useful,
31 | but WITHOUT ANY WARRANTY; without even the implied warranty of
32 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
33 | GNU General Public License for more details.
34 | 
35 | You should have received a copy of the GNU General Public License
36 | along with this program.  If not, see .
37 | 


--------------------------------------------------------------------------------
/Software/Python/Examples/LED_Blink/grove_port_led_blink.py:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/env python
 2 | # This example is to control the LED's connected to the analog and digital ports of the GoPiGo
 3 | 
 4 | from gopigo import *
 5 | import time
 6 | 
 7 | #Pin number for the grove analog port A0
 8 | analog_pin=15
 9 | 
10 | #Pin number for the grove digital port D11
11 | digital_pin=10
12 | 
13 | #Setting the port to output
14 | pinMode(analog_pin,"OUTPUT")
15 | pinMode(digital_pin,"OUTPUT")
16 | while True:
17 | 	print "ON"
18 | 	digitalWrite(analog_pin,1)
19 | 	digitalWrite(digital_pin,1)
20 | 	time.sleep(.5)
21 | 	
22 | 	print "OFF"
23 | 	digitalWrite(analog_pin,0)
24 | 	digitalWrite(digital_pin,0)
25 | 	time.sleep(.5)
26 | 


--------------------------------------------------------------------------------
/Software/Python/Examples/LED_Blink/led_blink.py:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/env python
 2 | # This example is to control the LED's on a GoPiGo
 3 | 
 4 | from gopigo import *
 5 | import sys
 6 | import time
 7 | 
 8 | while True:
 9 | 	print "ON"
10 | 	led_on(LED_L)
11 | 	led_on(LED_R)
12 | 	time.sleep(.5)
13 | 	
14 | 	print "OFF"
15 | 	led_off(LED_L)
16 | 	led_off(LED_R)
17 | 	time.sleep(.5)
18 | 


--------------------------------------------------------------------------------
/Software/Python/Examples/Mouse_Control/GoPiGo-Mouse-Control-with-Raspberry-Pi.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Python/Examples/Mouse_Control/GoPiGo-Mouse-Control-with-Raspberry-Pi.jpg


--------------------------------------------------------------------------------
/Software/Python/Examples/Office_Cannon/Office-cannon-with-raspberry-pi.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Python/Examples/Office_Cannon/Office-cannon-with-raspberry-pi.jpg


--------------------------------------------------------------------------------
/Software/Python/Examples/PS3_Control/PS3-controller-for-raspberry-pi.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Python/Examples/PS3_Control/PS3-controller-for-raspberry-pi.jpg


--------------------------------------------------------------------------------
/Software/Python/Examples/PS3_Control/sixpair:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Python/Examples/PS3_Control/sixpair


--------------------------------------------------------------------------------
/Software/Python/Examples/Streaming_Video_Example/README.md:
--------------------------------------------------------------------------------
 1 | ## Streaming Video
 2 | 
 3 | ### Running the streaming script:
 4 | - Run the start screaming scripts
 5 | "sudo start_streaming.sh" .
 6 | - Start VLC Media Player on another computer
 7 | - If you're on the same network, open the network stream "http://raspberrypi.local:9000/?action=stream"
 8 | 
 9 | ### Streaming the Video:
10 | - Attach the camera to the GOPIGO.
11 | - Follow these instructions for setup of the server and camera:  http://www.miguelmota.com/blog/raspberry-pi-camera-board-video-streaming/
12 | - Make both the scripts as executable and run them. 
13 | 
14 | 
15 | 
16 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Chassis-300.jpg)
17 | 
18 | This repository contains source code, firmware and design materials for the GoPiGo.
19 | 
20 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Front_Facing_Camera300.jpg)
21 | 
22 | # See Also
23 | 
24 | - [Dexter Industries](http://www.dexterindustries.com/GoPiGo)
25 | - [Kickstarter Campaign](http://kck.st/Q6vVOP)
26 | - [Raspberry Pi](http://www.raspberrypi.org/)
27 | 
28 | 
29 | ## License
30 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi.
31 | Copyright (C) 2015  Dexter Industries
32 | 
33 | This program is free software: you can redistribute it and/or modify
34 | it under the terms of the GNU General Public License as published by
35 | the Free Software Foundation, either version 3 of the License, or
36 | (at your option) any later version.
37 | 
38 | This program is distributed in the hope that it will be useful,
39 | but WITHOUT ANY WARRANTY; without even the implied warranty of
40 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
41 | GNU General Public License for more details.
42 | 
43 | You should have received a copy of the GNU General Public License
44 | along with this program.  If not, see .


--------------------------------------------------------------------------------
/Software/Python/Examples/Streaming_Video_Example/stream_end.sh:
--------------------------------------------------------------------------------
 1 | 
 2 | #!/bin/bash
 3 |  
 4 | if pgrep raspistill
 5 | then
 6 |     kill $(pgrep raspistill) > /dev/null 2>&1
 7 |     echo "raspistill stopped"
 8 | else
 9 |     echo "raspistill not running"
10 | fi
11 |  
12 | if pgrep mjpg_streamer
13 | then
14 |     kill $(pgrep mjpg_streamer) > /dev/null 2>&1
15 |     echo "mjpg_streamer stopped"
16 | else
17 |     echo "mjpg_streamer not running"
18 | fi
19 | 


--------------------------------------------------------------------------------
/Software/Python/Examples/Streaming_Video_Example/stream_start.sh:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 |  
 3 | if [ ! -d /tmp/stream ]
 4 | then
 5 |     mkdir /tmp/stream/
 6 | fi
 7 |  
 8 | if pgrep raspistill > /dev/null
 9 | then
10 |     echo "raspistill already running"
11 | else
12 |     raspistill -w 640 -h 480 -q 5 -o /tmp/stream/pic.jpg -tl 100 -t 9999999 -th 0:0:0 -n > /dev/null 2>&1& 
13 |     echo "raspistill started"
14 | fi
15 |  
16 | if pgrep mjpg_streamer > /dev/null
17 | then
18 |     echo "mjpg_streamer already running"
19 | else
20 |     LD_LIBRARY_PATH=/opt/mjpg-streamer/ /opt/mjpg-streamer/mjpg_streamer -i "input_file.so -f /tmp/stream -n pic.jpg" -o "output_http.so -p 9000 -w /opt/mjpg-streamer/www" > /dev/null 2>&1&
21 |     echo "mjpg_streamer started"
22 | fi


--------------------------------------------------------------------------------
/Software/Python/Examples/Ultrasonic_Basic_Obstacle_Avoider/README.md:
--------------------------------------------------------------------------------
 1 | ## basic_obstacle_avoid.py
 2 | ### This example demonstrates using the Ultrasonic sensor with the GoPiGo
 3 | In this examples, the GoPiGo keeps reading from the ultrasonic sensor and when it close to the an obstacle, it stops.
 4 | 
 5 | Attach Ultrasonic sensor to A1 Port.
 6 | 
 7 | 
 8 | 
 9 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Chassis-300.jpg)
10 | 
11 | This repository contains source code, firmware and design materials for the GoPiGo.
12 | 
13 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Front_Facing_Camera300.jpg)
14 | 
15 | # See Also
16 | 
17 | - [Dexter Industries](http://www.dexterindustries.com/GoPiGo)
18 | - [Kickstarter Campaign](http://kck.st/Q6vVOP)
19 | - [Raspberry Pi](http://www.raspberrypi.org/)
20 | 
21 | 
22 | ## License
23 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi.
24 | Copyright (C) 2017  Dexter Industries
25 | 
26 | This program is free software: you can redistribute it and/or modify
27 | it under the terms of the GNU General Public License as published by
28 | the Free Software Foundation, either version 3 of the License, or
29 | (at your option) any later version.
30 | 
31 | This program is distributed in the hope that it will be useful,
32 | but WITHOUT ANY WARRANTY; without even the implied warranty of
33 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
34 | GNU General Public License for more details.
35 | 
36 | You should have received a copy of the GNU General Public License
37 | along with this program.  If not, see .


--------------------------------------------------------------------------------
/Software/Python/Examples/Ultrasonic_Servo/README.md:
--------------------------------------------------------------------------------
 1 | ## us_servo_scan.py
 2 | This example creates LIDAR like map using an ultrasonic sensor and a servo with the GoPiGo
 3 | 
 4 | Attach Ultrasonic sensor to A1 Port.
 5 | 
 6 | 
 7 | 
 8 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Chassis-300.jpg)
 9 | 
10 | This repository contains source code, firmware and design materials for the GoPiGo.
11 | 
12 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Front_Facing_Camera300.jpg)
13 | 
14 | # See Also
15 | 
16 | - [Dexter Industries](http://www.dexterindustries.com/GoPiGo)
17 | - [Kickstarter Campaign](http://kck.st/Q6vVOP)
18 | - [Raspberry Pi](http://www.raspberrypi.org/)
19 | 
20 | 
21 | ## License
22 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi.
23 | Copyright (C) 2017  Dexter Industries
24 | 
25 | This program is free software: you can redistribute it and/or modify
26 | it under the terms of the GNU General Public License as published by
27 | the Free Software Foundation, either version 3 of the License, or
28 | (at your option) any later version.
29 | 
30 | This program is distributed in the hope that it will be useful,
31 | but WITHOUT ANY WARRANTY; without even the implied warranty of
32 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
33 | GNU General Public License for more details.
34 | 
35 | You should have received a copy of the GNU General Public License
36 | along with this program.  If not, see .


--------------------------------------------------------------------------------
/Software/Python/control_panel/GoPiGo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Python/control_panel/GoPiGo.png


--------------------------------------------------------------------------------
/Software/Python/control_panel/gopigo_control_panel.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Encoding=UTF-8
3 | Type=Application
4 | Name=GoPiGo Control Panel
5 | Comment=GoPiGo Control Panel
6 | #Icon=/usr/share/icons/gnome/scalable/devices/input-gaming-symbolic.svg
7 | Icon=/home/pi/Dexter/GoPiGo/Software/Python/control_panel/GoPiGo.png
8 | Exec=python /home/pi/Dexter/GoPiGo/Software/Python/control_panel/control_panel_gui.py
9 | NoDisplay=true


--------------------------------------------------------------------------------
/Software/Python/enc_val_read.py:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/env python
 2 | from __future__ import print_function
 3 | from __future__ import division
 4 | from builtins import input
 5 | # the above lines are meant for Python3 compatibility.
 6 | # they force the use of Python3 functionality for print(), 
 7 | # the integer division and input()
 8 | # mind your parentheses!
 9 | 
10 | # This script is to test the encoder values from the GoPiGo
11 | 
12 | '''
13 | ## License
14 |  GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi.
15 |  Copyright (C) 2017  Dexter Industries
16 | 
17 | This program is free software: you can redistribute it and/or modify
18 | it under the terms of the GNU General Public License as published by
19 | the Free Software Foundation, either version 3 of the License, or
20 | (at your option) any later version.
21 | 
22 | This program is distributed in the hope that it will be useful,
23 | but WITHOUT ANY WARRANTY; without even the implied warranty of
24 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25 | GNU General Public License for more details.
26 | 
27 | You should have received a copy of the GNU General Public License
28 | along with this program.  If not, see .
29 | '''
30 | 
31 | from gopigo import *
32 | import sys
33 | 
34 | import atexit
35 | atexit.register(stop)
36 | 
37 | fwd()
38 | time.sleep(1)
39 | while True:
40 | 	print( "{},{}".format(enc_read(0), enc_read(1)))
41 | 


--------------------------------------------------------------------------------
/Software/Python/hardware_test.py:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/env python
 2 | from __future__ import print_function
 3 | from __future__ import division
 4 | from builtins import input
 5 | 
 6 | '''
 7 | ## License
 8 |  GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi.
 9 |  Copyright (C) 2017  Dexter Industries
10 | 
11 | This program is free software: you can redistribute it and/or modify
12 | it under the terms of the GNU General Public License as published by
13 | the Free Software Foundation, either version 3 of the License, or
14 | (at your option) any later version.
15 | 
16 | This program is distributed in the hope that it will be useful,
17 | but WITHOUT ANY WARRANTY; without even the implied warranty of
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 | GNU General Public License for more details.
20 | 
21 | You should have received a copy of the GNU General Public License
22 | along with this program.  If not, see .
23 | '''
24 | 
25 | from gopigo import *
26 | import sys
27 | 
28 | import atexit
29 | atexit.register(stop)
30 | 
31 | while True:
32 | 	print ("Both motors moving Forward with LED On")
33 | 	led_on(0)
34 | 	led_on(1)
35 | 	fwd()
36 | 	time.sleep(5)
37 | 	print ("Both motors stopped with LED Off")
38 | 	led_off(0)
39 | 	led_off(1)
40 | 	stop()
41 | 	time.sleep(2)
42 | 	print ("Both motors moving back with LED On")
43 | 	led_on(0)
44 | 	led_on(1)
45 | 	bwd()
46 | 	time.sleep(5)
47 | 	print ("Both motors stopped with LED Off")
48 | 	led_off(0)
49 | 	led_off(1)
50 | 	stop()
51 | 	time.sleep(2)
52 | 	


--------------------------------------------------------------------------------
/Software/Python/hardware_test_2.py:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/env python
 2 | # This program is for testing GoPiGo Hardware.  
 3 | 
 4 | '''
 5 | ## License
 6 |  GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi.
 7 |  Copyright (C) 2017  Dexter Industries
 8 | 
 9 | This program is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 | 
14 | This program is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 | GNU General Public License for more details.
18 | 
19 | You should have received a copy of the GNU General Public License
20 | along with this program.  If not, see .
21 | '''
22 | from __future__ import print_function
23 | from __future__ import division
24 | from builtins import input
25 | # the above lines are meant for Python3 compatibility.
26 | # they force the use of Python3 functionality for print(), 
27 | # the integer division and input()
28 | # mind your parentheses!
29 | 
30 | from gopigo import *
31 | import sys
32 | 
33 | import atexit
34 | atexit.register(stop)
35 | 
36 | print ("Both motors moving Forward with LED On")
37 | led_on(0)
38 | led_on(1)
39 | fwd()
40 | time.sleep(5)
41 | print ("Both motors stopped with LED Off")
42 | led_off(0)
43 | led_off(1)
44 | stop()
45 | time.sleep(2)
46 | print ("Both motors moving back with LED On")
47 | led_on(0)
48 | led_on(1)
49 | bwd()
50 | time.sleep(5)
51 | print ("Both motors stopped with LED Off")
52 | led_off(0)
53 | led_off(1)
54 | stop()
55 | time.sleep(2)
56 | 
57 | stop()
58 | stop()


--------------------------------------------------------------------------------
/Software/Python/ir_remote_control/debugging/ir_debug_logger.py:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/env python
 2 | from subprocess import Popen, PIPE, STDOUT, call
 3 | import datetime
 4 | import time
 5 | 
 6 | # Before running this program, please make sure [ir-server.service] is stopped
 7 | # After the program has finished, please turn [ir-server.service] back on 
 8 | 
 9 | call("sudo /etc/init.d/lirc stop", shell=True)
10 | time.sleep(.5)
11 | 
12 | p = Popen('mode2 -d /dev/lirc0', stdout = PIPE, stderr = STDOUT, shell = True)
13 | print "Logging started, Press Ctrl+C to stop"
14 | f=open("/home/pi/Desktop/ir_raw_sig_log.txt","a")
15 | f.write(str(datetime.datetime.now()))
16 | f.close()
17 | 
18 | while True:
19 |     # Read the raw value from the IR receiver
20 | 
21 |     line = p.stdout.readline()
22 |     if len(line)!=0:
23 |         f=open("/home/pi/Desktop/ir_raw_sig_log.txt","a")
24 |         f.write(line)
25 |         f.close()
26 |         print line,
27 | 


--------------------------------------------------------------------------------
/Software/Python/ir_remote_control/examples/ir_recv_example.py:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/env python
 2 | ##################################################
 3 | # IR remote control example
 4 | #
 5 | # This example is for controlling the GoPiGo with an Keyes IR remote
 6 | # 
 7 | # History
 8 | # ------------------------------------------------
 9 | # Author	Date      		Comments
10 | # Karan		21 Aug  15	  	Initial Authoring
11 | '''
12 | ## License
13 | 
14 | The MIT License (MIT)
15 | 
16 | GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
17 | Copyright (C) 2015  Dexter Industries
18 | 
19 | Permission is hereby granted, free of charge, to any person obtaining a copy
20 | of this software and associated documentation files (the "Software"), to deal
21 | in the Software without restriction, including without limitation the rights
22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23 | copies of the Software, and to permit persons to whom the Software is
24 | furnished to do so, subject to the following conditions:
25 | 
26 | The above copyright notice and this permission notice shall be included in
27 | all copies or substantial portions of the Software.
28 | 
29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
35 | THE SOFTWARE.
36 | '''   
37 | ##################################################
38 | import ir_receiver
39 | import time
40 | 
41 | while True:
42 | 	#Wait for the next IR code to arrive. The codes are queued in a buffer before printing
43 | 	a= ir_receiver.nextcode()
44 | 	if not isinstance(a, str):
45 | 		a = a.decode('utf-8')
46 | 	if len(a) !=0:
47 | 		print (a)
48 | 	time.sleep(.1)


--------------------------------------------------------------------------------
/Software/Python/ir_remote_control/examples/lirc_example.py:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/env python
 2 | ##################################################
 3 | # IR remote control example
 4 | #
 5 | # This example is for controlling the GoPiGo with an Keyes IR remote
 6 | # 
 7 | # History
 8 | # ------------------------------------------------
 9 | # Author	Date      		Comments
10 | # Karan		21 Aug  15	  	Initial Authoring
11 | '''
12 | ## License
13 | 
14 | The MIT License (MIT)
15 | 
16 | GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
17 | Copyright (C) 2015  Dexter Industries
18 | 
19 | Permission is hereby granted, free of charge, to any person obtaining a copy
20 | of this software and associated documentation files (the "Software"), to deal
21 | in the Software without restriction, including without limitation the rights
22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23 | copies of the Software, and to permit persons to whom the Software is
24 | furnished to do so, subject to the following conditions:
25 | 
26 | The above copyright notice and this permission notice shall be included in
27 | all copies or substantial portions of the Software.
28 | 
29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
35 | THE SOFTWARE.
36 | '''   
37 | ##################################################
38 | import lirc
39 | #initialize the IR daemon
40 | sockid = lirc.init("keyes", blocking = False)
41 | while True:
42 | 	#Wait for the next IR code to arrive. The codes are queued in a buffer before printing
43 | 	a= lirc.nextcode()  
44 | 	if len(a) !=0:
45 | 		print (a[0])


--------------------------------------------------------------------------------
/Software/Python/ir_remote_control/lirc/hardware_copy.conf:
--------------------------------------------------------------------------------
 1 | ########################################################
 2 | # /etc/lirc/hardware.conf
 3 | #
 4 | # Arguments which will be used when launching lircd
 5 | LIRCD_ARGS="--uinput"
 6 | 
 7 | # Don't start lircmd even if there seems to be a good config file
 8 | # START_LIRCMD=false
 9 | 
10 | # Don't start irexec, even if a good config file seems to exist.
11 | # START_IREXEC=false
12 | 
13 | # Try to load appropriate kernel modules
14 | LOAD_MODULES=true
15 | 
16 | # Run "lircd --driver=help" for a list of supported drivers.
17 | DRIVER="default"
18 | # usually /dev/lirc0 is the correct setting for systems using udev
19 | DEVICE="/dev/lirc0"
20 | MODULES="lirc_rpi"
21 | 
22 | # Default configuration files for your hardware if any
23 | LIRCD_CONF=""
24 | LIRCMD_CONF=""
25 | ########################################################
26 | 


--------------------------------------------------------------------------------
/Software/Python/ir_remote_control/lirc/lircrc_keyes:
--------------------------------------------------------------------------------
 1 | begin
 2 | button = KEY_UP
 3 |  prog = keyes
 4 |  config = KEY_UP
 5 | end
 6 | begin
 7 |  button = KEY_DOWN
 8 |  prog = keyes
 9 |  config = KEY_DOWN
10 | end
11 | begin
12 |  button = KEY_LEFT
13 |  prog = keyes
14 |  config = KEY_LEFT
15 |  end
16 | begin
17 |  button = KEY_RIGHT
18 |  prog = keyes
19 |  config = KEY_RIGHT
20 |  end
21 | begin
22 |  button = KEY_1
23 |  prog = keyes
24 |  config = KEY_1
25 |  end
26 | begin
27 |  button = KEY_2
28 |  prog = keyes
29 |  config = KEY_2
30 |  end
31 | begin
32 |  button = KEY_3
33 |  prog = keyes
34 |  config = KEY_3
35 |  end
36 | begin
37 |  button = KEY_4
38 |  prog = keyes
39 |  config = KEY_4
40 |  end
41 | begin
42 |  button = KEY_5
43 |  prog = keyes
44 |  config = KEY_5
45 |  end
46 | begin
47 |  button = KEY_6
48 |  prog = keyes
49 |  config = KEY_6
50 |  end
51 | begin
52 |  button = KEY_7
53 |  prog = keyes
54 |  config = KEY_7
55 |  end
56 | begin
57 |  button = KEY_8
58 |  prog = keyes
59 |  config = KEY_8
60 |  end
61 | begin
62 |  button = KEY_9
63 |  prog = keyes
64 |  config = KEY_9
65 |  end
66 | begin
67 |  button = KEY_0
68 |  prog = keyes
69 |  config = KEY_0
70 |  end
71 | begin
72 |  button = KEY_OK
73 |  prog = keyes
74 |  config = KEY_OK
75 |  end
76 | begin
77 |  button = KEY_H
78 |  prog = keyes
79 |  config = KEY_H
80 |  end
81 | begin
82 |  button = KEY_S
83 |  prog = keyes
84 |  config = KEY_S
85 |  end
86 | 
87 | 


--------------------------------------------------------------------------------
/Software/Python/ir_remote_control/lirc/setup_older_version.sh:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/env bash
 2 | if grep -q "lirc_rpi gpio_in_pin=15" /etc/modules; then
 3 | 	echo "Lib Rpi GPIO already present"
 4 | 	
 5 | elif grep -q "lirc_rpi gpio_in_pin=14" /etc/modules; then
 6 | 	sed -e s/"lirc_rpi gpio_in_pin=14"//g -i /etc/modules
 7 | 	sudo echo "lirc_rpi gpio_in_pin=15" >> /etc/modules
 8 | 	echo "Lib Rpi GPIO changed from pin 14 to 15"
 9 | 	
10 | else
11 | 	sudo echo "lirc_rpi gpio_in_pin=15" >> /etc/modules
12 | 	echo "Lib Rpi GPIO added"
13 | fi
14 | 
15 | if grep -q "dtoverlay=lirc-rpi,gpio_in_pin=15" /boot/config.txt; then
16 | 	echo "LIRC for Kernel 3.18 already present"
17 | 	
18 | elif grep -q "dtoverlay=lirc-rpi,gpio_in_pin=14" /boot/config.txt; then
19 | 	sed -e s/"dtoverlay=lirc-rpi,gpio_in_pin=14"//g -i /boot/config.txt
20 | 	sudo echo "dtoverlay=lirc-rpi,gpio_in_pin=15" >> /boot/config.txt
21 | 	echo "LIRC for Kernel 3.18 changed from pin 14 to 15"
22 | 	
23 | else
24 | 	sudo echo "dtoverlay=lirc-rpi,gpio_in_pin=15" >> /boot/config.txt
25 | 	echo "LIRC for Kernel 3.18 added"
26 | fi
27 | 


--------------------------------------------------------------------------------
/Software/Python/ir_remote_control/server/install.sh:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/env bash
 2 | PIHOME=/home/pi
 3 | 
 4 | DIUPDATE=di_update
 5 | RASPBIAN=Raspbian_For_Robots
 6 | RASPBIAN_PATH=$PIHOME/$DIUPDATE/$RASPBIAN
 7 | 
 8 | DEXTER=Dexter
 9 | DEXTER_PATH=$PIHOME/$DEXTER
10 | 
11 | GOPIGO_PATH=$DEXTER_PATH/GoPiGo
12 | 
13 | #Install the ir_receiver library systemwide
14 | pushd $GOPIGO_PATH/Software/Python/ir_remote_control/server/
15 | python setup.py install
16 | rm -r build
17 | rm -r dist
18 | rm -r ir_receiver.egg-info
19 | 
20 | sudo cp ir-server.service /etc/systemd/system/ir-server.service
21 | sudo systemctl daemon-reload
22 | 
23 | popd
24 | 


--------------------------------------------------------------------------------
/Software/Python/ir_remote_control/server/ir-server.service:
--------------------------------------------------------------------------------
 1 | [Unit]
 2 | Description=IR Server App
 3 | 
 4 | [Service]
 5 | Type=idle
 6 | ExecStart=/usr/bin/python /home/pi/Dexter/GoPiGo/Software/Python/ir_remote_control/server/di_ir_reader.py
 7 | Restart=on-failure
 8 | RestartSec=2
 9 | 
10 | [Install]
11 | WantedBy=multi-user.target
12 | 


--------------------------------------------------------------------------------
/Software/Python/ir_remote_control/server/setup.py:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/env python
 2 | #
 3 | '''
 4 | ## License
 5 |  GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi.
 6 |  Copyright (C) 2017  Dexter Industries
 7 | 
 8 | This program is free software: you can redistribute it and/or modify
 9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 | 
13 | This program is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 | GNU General Public License for more details.
17 | 
18 | You should have received a copy of the GNU General Public License
19 | along with this program.  If not, see .
20 | '''
21 | 
22 | import setuptools
23 | setuptools.setup(
24 | 	name="ir_receiver",
25 | 	description="Drivers and examples for using the ir_receiver in Python with the GoPiGo without LIRC",
26 | 	author="Dexter Industries",
27 | 	url="http://www.dexterindustries.com/GoPiGo/",
28 | 	py_modules=['ir_receiver'],
29 | 	#install_requires=open('requirements.txt').readlines(),
30 | )
31 | 


--------------------------------------------------------------------------------
/Software/Python/other_scripts/Mouse_Control_example.py:
--------------------------------------------------------------------------------
 1 | import struct
 2 | 
 3 | file = open( "/dev/input/mice", "rb" );
 4 | 
 5 | def getMouseEvent():
 6 |   buf = file.read(3);
 7 |   button = ord( buf[0] );
 8 |   bLeft = button & 0x1;
 9 |   bMiddle = ( button & 0x4 ) > 0;
10 |   bRight = ( button & 0x2 ) > 0;
11 |   x,y = struct.unpack( "bb", buf[1:] );
12 |   print ("L:%d, M: %d, R: %d, x: %d, y: %d\n" % (bLeft,bMiddle,bRight, x, y) );
13 |   # return stuffs
14 | 
15 | while( 1 ):
16 |   getMouseEvent();
17 | file.close();


--------------------------------------------------------------------------------
/Software/Python/other_scripts/bvt.py:
--------------------------------------------------------------------------------
 1 | import smbus
 2 | import time
 3 | 
 4 | # for RPI version 1, use "bus = smbus.SMBus(0)"
 5 | bus = smbus.SMBus(1)
 6 | 
 7 | # This is the address we setup in the Arduino Program
 8 | address = 0x04
 9 | 
10 | def analogRead():
11 |         bus.read_byte(address)
12 |         number = bus.read_i2c_block_data(address,1)
13 |         return (float)(number[1]*256+number[2])
14 | 		
15 | def writeNumber(value):
16 |     bus.write_byte(address, value)
17 |     # bus.write_byte_data(address, 0, value) 
18 |     return -1
19 | 
20 | def readNumber():
21 |     number = bus.read_byte(address)
22 |     # number = bus.read_byte_data(address, 1)
23 |     return number
24 | 
25 | time.sleep(1)
26 | i=0
27 | while True:
28 | 	a=analogRead()
29 | 	print "Read=%.2f"%(a*5/1024),
30 | 	print "True=%.2f"%(a*2.5*5/1024)
31 | 	time.sleep(.1)
32 | 	
33 | 	
34 | 	
35 | 


--------------------------------------------------------------------------------
/Software/Python/other_scripts/demo.py:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/env python
 2 | # This is an example to try out the GoPiGo
 3 | '''
 4 | ## License
 5 |  GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi.
 6 |  Copyright (C) 2017  Dexter Industries
 7 | 
 8 | This program is free software: you can redistribute it and/or modify
 9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 | 
13 | This program is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 | GNU General Public License for more details.
17 | 
18 | You should have received a copy of the GNU General Public License
19 | along with this program.  If not, see .
20 | '''
21 | 
22 | from gopigo import *
23 | import sys
24 | 
25 | import atexit
26 | atexit.register(stop)
27 | 
28 | led_on(0)
29 | led_on(1)
30 | time.sleep(1)
31 | led_off(0)
32 | led_off(1)
33 | time.sleep(1)
34 | fwd()
35 | time.sleep(2)
36 | stop()
37 | time.sleep(1)
38 | bwd()
39 | time.sleep(2)
40 | stop()
41 | 


--------------------------------------------------------------------------------
/Software/Python/other_scripts/enc_tgt.py:
--------------------------------------------------------------------------------
 1 | from gopigo import *
 2 | 
 3 | enc_tgt(1,0,72)
 4 | fwd()
 5 | i=0
 6 | while True:
 7 | #time.sleep(1)
 8 | 	#print i,volt()
 9 | 	print read_status()
10 | 	i+=1
11 | 	time.sleep(.1)


--------------------------------------------------------------------------------
/Software/Python/other_scripts/encoder_tgt_complete_test.py:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/env python
 2 | from gopigo import *
 3 | import sys
 4 | 
 5 | import atexit
 6 | atexit.register(stop)
 7 | 
 8 | enable_encoders()
 9 | print "Ver:",fw_ver()
10 | print volt(),"V"
11 | 
12 | print "\nCHECKING ENCODER READINGS"
13 | print enc_read(0),
14 | print enc_read(1)
15 | print "Both motors moving Forward with LED On"
16 | led_on(0)
17 | led_on(1)
18 | fwd()
19 | time.sleep(5)
20 | print "after 5 sec",
21 | print enc_read(0),
22 | print enc_read(1)
23 | print "Both motors stopped with LED Off"
24 | led_off(0)
25 | led_off(1)
26 | ret = stop()
27 | print ret,
28 | print "after stop cmd",
29 | print enc_read(0),
30 | print enc_read(1)
31 | time.sleep(2)
32 | print ret,
33 | print "after 2 more sec",
34 | print enc_read(0),
35 | print enc_read(1)
36 | print "Both motors moving back with LED On"
37 | led_on(0)
38 | led_on(1)
39 | bwd()
40 | time.sleep(5)
41 | print "after 5 sec",
42 | print enc_read(0),
43 | print enc_read(1)
44 | print "Both motors stopped with LED Off"
45 | led_off(0)
46 | led_off(1)
47 | ret = stop()
48 | print ret,
49 | print "after stop cmd",
50 | print enc_read(0),
51 | print enc_read(1)
52 | time.sleep(2)
53 | print ret,
54 | print "after 2 more sec ",
55 | print enc_read(0),
56 | print enc_read(1)
57 | 	
58 | print "\nCHECKING ENCODER TARGETING"
59 | for i in range(5):
60 | 	print "\nInitial encoder read vals:",
61 | 	fwd()
62 | 	enc_tgt(1,1,72)
63 | 	print enc_read(0),
64 | 	print enc_read(1)
65 | 	while True:
66 | 		enc_stat=read_enc_status()
67 | 		print "Enc tgt Status: ",enc_stat
68 | 		if enc_stat==0:
69 | 			break;
70 | 		time.sleep(.5)
71 | 	print "Final encoder read vals:",
72 | 	print enc_read(0),
73 | 	print enc_read(1)
74 | 	time.sleep(1)


--------------------------------------------------------------------------------
/Software/Python/other_scripts/gopigo_status.py:
--------------------------------------------------------------------------------
 1 | #! /usr/bin/env python
 2 | from gopigo import *
 3 | 
 4 | print "---------------------------\n|",
 5 | ver=fw_ver()
 6 | 
 7 | if ver==-1:
 8 | 	print "| GoPiGo Not Found"
 9 | 	print "---------------------------"
10 | 	exit()
11 | 
12 | print "GoPiGo Found"
13 | print "| Firmware version:",ver
14 | print "| Battery voltage :",volt(),"V"
15 | print "---------------------------"
16 | 


--------------------------------------------------------------------------------
/Software/Python/other_scripts/gps.py.save:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/python
 2 | import serial, time
 3 | import smbus
 4 | import math
 5 | import RPi.GPIO as GPIO
 6 | import struct
 7 | ser = serial.Serial('/dev/ttyAMA0',  9600, timeout = 0)
 8 | ser.flush()
 9 | class GPS:
10 | 	inp=[""]*7
11 | 	# Refer to SIM28 NMEA spec file http://www.seeedstudio.com/wiki/images/a/a0/SIM28_DATA_File.zip
12 | 	GGA=[]
13 | 	GSA=[]
14 | 	GSV=[]
15 | 	RMC=[]
16 | 
17 | 	def read(self):
18 | 		start=0
19 | 		for i in range(7):
20 | 			GPS.inp[i]=ser.readline()
21 | 		for i in range(7):
22 | 			if GPS.inp[i][:6] =='$GPGGA': # GGA data , packet 1
23 | 				start=i
24 | 				break
25 | 		GPS.GGA=GPS.inp[start].split(",")
26 | 		GPS.GSA=GPS.inp[start+1].split(",")
27 | 		GPS.GSV=GPS.inp[start+2].split(",")
28 | 		GPS.RMC=GPS.inp[start+3].split(",")
29 | 		return [GPS.GGA,GPS.GSA,GPS.GSV,GPS.RMC]
30 | 	def vals(self):
31 | 		time=GPS.GGA[1]
32 | 		lat=GPS.GGA[2]
33 | 		lat_ns=GPS.GGA[3]
34 | 		long=GPS.GGA[4]
35 | 		long_ew=GPS.GGA[5]
36 | 		fix=GPS.GGA[6]
37 | 		sats=GPS.GGA[7]
38 | 		alt=GPS.GGA[9]
39 | 		return [time,fix,sats,alt,lat,lat_ns,long,long_ew]
40 | 
41 | g=GPS()
42 | while True:
43 | 	try:
44 | 		r=g.read()
45 | 		print g.vals()
46 | 	except IndexError:
47 | 		print "Unable to read"
48 | 	time.sleep(2)
49 | 


--------------------------------------------------------------------------------
/Software/Python/other_scripts/led_test.py:
--------------------------------------------------------------------------------
1 | from gopigo import *
2 | import sys
3 | i=0
4 | led_on(LED_R)
5 | time.sleep(1)
6 | led_off(LED_R)
7 | time.sleep(1)
8 | led_on(LED_R)


--------------------------------------------------------------------------------
/Software/Python/other_scripts/linesensor.py:
--------------------------------------------------------------------------------
 1 | import smbus
 2 | import time
 3 | 
 4 | # for RPI version 1, use "bus = smbus.SMBus(0)"
 5 | bus = smbus.SMBus(1)
 6 | 
 7 | # This is the address we setup in the Arduino Program
 8 | address = 0x04
 9 | val=[0,0,0]
10 | def analogRead():
11 | 	bus.read_byte(address)
12 | 	number = bus.read_i2c_block_data(address,1)
13 | 	val[0]= (float)(number[1]*256+number[2])
14 | 	val[1]= (float)(number[3]*256+number[4])
15 | 	val[2]= (float)(number[5]*256+number[6])
16 | 		
17 | def writeNumber(value):
18 |     bus.write_byte(address, value)
19 |     # bus.write_byte_data(address, 0, value) 
20 |     return -1
21 | 
22 | def readNumber():
23 |     number = bus.read_byte(address)
24 |     # number = bus.read_byte_data(address, 1)
25 |     return number
26 | 
27 | time.sleep(1)
28 | i=0
29 | while True:
30 | 	a=analogRead()
31 | 	print "%.2f  "%(val[0]*5/1024),
32 | 	print "%.2f  "%(val[1]*5/1024),
33 | 	print "%.2f  "%(val[2]*5/1024)
34 | 	time.sleep(.1)
35 | 	
36 | 	
37 | 	
38 | 


--------------------------------------------------------------------------------
/Software/Python/other_scripts/ls.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Python/other_scripts/ls.py


--------------------------------------------------------------------------------
/Software/Python/other_scripts/motor_speech.py:
--------------------------------------------------------------------------------
 1 | import smbus
 2 | import time
 3 | from subprocess import call
 4 | 
 5 | # for RPI version 1, use "bus = smbus.SMBus(0)"
 6 | bus = smbus.SMBus(1)
 7 | 
 8 | # This is the address we setup in the Arduino Program
 9 | address = 0x04
10 | 
11 | def writeNumber(value):
12 |     bus.write_byte(address, value)
13 |     # bus.write_byte_data(address, 0, value) 
14 |     return -1
15 | 
16 | def readNumber():
17 |     number = bus.read_byte(address)
18 |     # number = bus.read_byte_data(address, 1)
19 |     return number
20 | 	
21 | def sound(spk):
22 | 	cmd_beg="espeak --stdout '"
23 | 	cmd_end="' | aplay"
24 | 	print cmd_beg+spk+cmd_end
25 | 	call ([cmd_beg+spk+cmd_end], shell=True)
26 | 
27 | time.sleep(1)
28 | i=0
29 | while True:
30 | 	try:
31 | 		a=raw_input()
32 | 		print ord(a)
33 | 		writeNumber(ord(a))
34 | 		if a=='w':
35 | 			sound("Forward")
36 | 		elif a=='a':
37 | 			sound("Left")
38 | 		elif a=='d':
39 | 			sound("Right")
40 | 		elif a=='s':
41 | 			sound("Reverse")
42 | 		elif a=='x':
43 | 			sound("Stop")
44 | 	except IOError:
45 | 		print "Error"
46 | 	
47 | 	
48 | 	
49 | 


--------------------------------------------------------------------------------
/Software/Python/other_scripts/motortest.py:
--------------------------------------------------------------------------------
 1 | import smbus
 2 | import time
 3 | 
 4 | # for RPI version 1, use "bus = smbus.SMBus(0)"
 5 | bus = smbus.SMBus(1)
 6 | 
 7 | # This is the address we setup in the Arduino Program
 8 | address = 0x04
 9 | 
10 | def writeNumber(value):
11 |     bus.write_byte(address, value)
12 |     # bus.write_byte_data(address, 0, value) 
13 |     return -1
14 | 
15 | def readNumber():
16 |     number = bus.read_byte(address)
17 |     # number = bus.read_byte_data(address, 1)
18 |     return number
19 | 
20 | time.sleep(1)
21 | i=0
22 | while True:
23 | 	a=raw_input()
24 | 	try:
25 | 		print ord(a)
26 | 		writeNumber(ord(a))
27 | 	except TypeError:
28 | 		print "Invalid Input"
29 | 	time.sleep(.1)
30 | 	
31 | 	
32 | 	
33 | 


--------------------------------------------------------------------------------
/Software/Python/other_scripts/mouse_controll.py:
--------------------------------------------------------------------------------
 1 | from gopigo import *
 2 | import struct
 3 | 
 4 | file = open( "/dev/input/mice", "rb" );
 5 | last_x = 0;
 6 | last_y = 0;
 7 | 
 8 | 
 9 | def getMouseEvent():
10 |   buf = file.read(3);
11 |   button = ord( buf[0] );
12 |   bLeft = button & 0x1;
13 |   bMiddle = ( button & 0x4 ) > 0;
14 |   bRight = ( button & 0x2 ) > 0;
15 |   x,y = struct.unpack( "bb", buf[1:] );
16 |   print ("L:%d, M: %d, R: %d, x: %d, y: %d\n" % (bLeft,bMiddle,bRight, x, y) );
17 |   # Now move the wheels according to the moues movements.
18 |   if x == last_x:
19 | 	stop()
20 |   if x > 0:
21 | 	right()
22 |   if x < 0:
23 | 	left()
24 | 
25 |   return 
26 |   
27 | 
28 | while True:
29 | 	# a=raw_input()
30 | 	'''if a=='w':
31 | 		fwd()
32 | 	elif a=='a':
33 | 		left()
34 | 	elif a=='d':
35 | 		right()
36 | 	elif a=='s':
37 | 		bwd()
38 | 	elif a=='x':
39 | 		stop()
40 | 	elif a=='t':
41 | 		increase_speed()
42 | 	elif a=='g':
43 | 		decrease_speed()
44 | 	elif a=='v':
45 | 		print volt(),'V'
46 | 	elif a=='u':
47 | 		print us_dist(17)
48 | 	elif a=='b': #servo test
49 | 		for i in range(180):
50 | 			servo(i)
51 | 			time.sleep(.02)
52 | 	time.sleep(.1)
53 | 	'''
54 | 	getMouseEvent()
55 | 	
56 | 	time.sleep(.1)
57 | 	


--------------------------------------------------------------------------------
/Software/Python/other_scripts/serial_comm.py:
--------------------------------------------------------------------------------
 1 | from gopigo import *
 2 | while True:
 3 | 	a=raw_input()
 4 | 	if a=='w':
 5 | 		fwd()
 6 | 	elif a=='a':
 7 | 		left()
 8 | 	elif a=='d':
 9 | 		right()
10 | 	elif a=='s':
11 | 		bwd()
12 | 	elif a=='x':
13 | 		stop()
14 | 	elif a=='t':
15 | 		increase_speed()
16 | 	elif a=='g':
17 | 		decrease_speed()
18 | 	elif a=='v':
19 | 		print volt(),'V'
20 | 	elif a=='u':
21 | 		print us_dist(17)
22 | 	elif a=='b': #servo test
23 | 		for i in range(180):
24 | 			servo(i)
25 | 			time.sleep(.02)
26 | 	time.sleep(.1)


--------------------------------------------------------------------------------
/Software/Python/other_scripts/servo_test.py:
--------------------------------------------------------------------------------
1 | from gopigo import *
2 | for i in range(180):
3 | 	servo(i)
4 | 	print i
5 | 	time.sleep(.02)


--------------------------------------------------------------------------------
/Software/Python/other_scripts/stop.py:
--------------------------------------------------------------------------------
1 | from gopigo import *
2 | 
3 | stop()


--------------------------------------------------------------------------------
/Software/Python/other_scripts/streaming_video_example_firmware/motortest.py:
--------------------------------------------------------------------------------
 1 | import smbus
 2 | import time
 3 | # for RPI version 1, use "bus = smbus.SMBus(0)"
 4 | bus = smbus.SMBus(1)
 5 | 
 6 | # This is the address we setup in the Arduino Program
 7 | address = 0x04
 8 | 
 9 | def writeNumber(value):
10 |     bus.write_byte(address, value)
11 |     # bus.write_byte_data(address, 0, value) 
12 |     return -1
13 | 
14 | def readNumber():
15 |     number = bus.read_byte(address)
16 |     # number = bus.read_byte_data(address, 1)
17 |     return number
18 | 
19 | time.sleep(1)
20 | i=0
21 | while True:
22 | 	a=raw_input()
23 | 	try:
24 | 		print ord(a)
25 | 		writeNumber(ord(a))
26 | 	except TypeError:		# Handles a TypeError I keep getting back.
27 | 		print "Key not recognized"
28 | 	time.sleep(.1)
29 | 	
30 | 	
31 | 	


--------------------------------------------------------------------------------
/Software/Python/other_scripts/tts.py:
--------------------------------------------------------------------------------
 1 | import sys
 2 | import pyttsx
 3 |  
 4 | # main() function
 5 | def main():
 6 |   # use sys.argv if needed 
 7 |   print 'running speech-test.py...'
 8 |   engine = pyttsx.init()
 9 |   str = "I speak. Therefore. I am.  "
10 |   engine.say(str)
11 |   engine.runAndWait() 
12 | 
13 |  
14 | # call main
15 | if __name__ == '__main__':
16 |   main()


--------------------------------------------------------------------------------
/Software/Python/other_scripts/tts1.py:
--------------------------------------------------------------------------------
 1 | #import sys
 2 | from subprocess import call
 3 |  
 4 | def sound(spk):
 5 | 	cmd_beg="espeak --stdout '"
 6 | 	cmd_end="' | aplay"
 7 | 	print cmd_beg+spk+cmd_end
 8 | 	call ([cmd_beg+spk+cmd_end], shell=True)
 9 | 
10 | sound("Hi There")
11 | 
12 | 


--------------------------------------------------------------------------------
/Software/Python/other_scripts/us_test1.py:
--------------------------------------------------------------------------------
1 | from gopigo import *
2 | import sys
3 | while True:
4 | 	print us_dist(15),'cm'
5 | 	#time.sleep(.5)


--------------------------------------------------------------------------------
/Software/Python/requirements.txt:
--------------------------------------------------------------------------------
1 | future
2 | smbus-cffi
3 | tornado
4 | pyusb
5 | python-periphery==1.1.0
6 | 


--------------------------------------------------------------------------------
/Software/Python/sensor_examples/dht/Adafruit_Python_DHT/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
 1 | Thank you for creating a pull request to contribute to Adafruit's GitHub code!
 2 | Before you open the request please review the following guidelines and tips to
 3 | help it be more easily integrated:
 4 | 
 5 | - **Describe the scope of your change--i.e. what the change does and what parts
 6 |   of the code were modified.**  This will help us understand any risks of integrating
 7 |   the code.
 8 | 
 9 | - **Describe any known limitations with your change.**  For example if the change
10 |   doesn't apply to a supported platform of the library please mention it.
11 | 
12 | - **Please run any tests or examples that can exercise your modified code.**  We
13 |   strive to not break users of the code and running tests/examples helps with this
14 |   process.
15 | 
16 | Thank you again for contributing!  We will try to test and integrate the change
17 | as soon as we can, but be aware we have many GitHub repositories to manage and
18 | can't immediately respond to every request.  There is no need to bump or check in
19 | on a pull request (it will clutter the discussion of the request).
20 | 
21 | Also don't be worried if the request is closed or not integrated--sometimes the
22 | priorities of Adafruit's GitHub code (education, ease of use) might not match the
23 | priorities of the pull request.  Don't fret, the open source community thrives on
24 | forks and GitHub makes it easy to keep your changes in a forked repo.
25 | 
26 | After reviewing the guidelines above you can delete this text from the pull request.
27 | 


--------------------------------------------------------------------------------
/Software/Python/sensor_examples/dht/Adafruit_Python_DHT/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 | *.egg-info
3 | *.pyc
4 | setuptools-*
5 | *.so
6 | 
7 | 


--------------------------------------------------------------------------------
/Software/Python/sensor_examples/dht/Adafruit_Python_DHT/Adafruit_DHT/Raspberry_Pi_2.py:
--------------------------------------------------------------------------------
 1 | # Copyright (c) 2014 Adafruit Industries
 2 | # Author: Tony DiCola
 3 | 
 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy
 5 | # of this software and associated documentation files (the "Software"), to deal
 6 | # in the Software without restriction, including without limitation the rights
 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 8 | # copies of the Software, and to permit persons to whom the Software is
 9 | # furnished to do so, subject to the following conditions:
10 | 
11 | # The above copyright notice and this permission notice shall be included in all
12 | # copies or substantial portions of the Software.
13 | 
14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | # SOFTWARE.
21 | from . import common
22 | from . import Raspberry_Pi_2_Driver as driver
23 | 
24 | def read(sensor, pin):
25 |     # Validate pin is a valid GPIO.
26 |     if pin is None or int(pin) < 0 or int(pin) > 31:
27 |         raise ValueError('Pin must be a valid GPIO number 0 to 31.')
28 |     # Get a reading from C driver code.
29 |     result, humidity, temp = driver.read(sensor, int(pin))
30 |     if result in common.TRANSIENT_ERRORS:
31 |         # Signal no result could be obtained, but the caller can retry.
32 |         return (None, None)
33 |     elif result == common.DHT_ERROR_GPIO:
34 |         raise RuntimeError('Error accessing GPIO.')
35 |     elif result != common.DHT_SUCCESS:
36 |         # Some kind of error occured.
37 |         raise RuntimeError('Error calling DHT test driver read: {0}'.format(result))
38 |     return (humidity, temp)
39 | 


--------------------------------------------------------------------------------
/Software/Python/sensor_examples/dht/Adafruit_Python_DHT/Adafruit_DHT/Test.py:
--------------------------------------------------------------------------------
 1 | # Copyright (c) 2014 Adafruit Industries
 2 | # Author: Tony DiCola
 3 | 
 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy
 5 | # of this software and associated documentation files (the "Software"), to deal
 6 | # in the Software without restriction, including without limitation the rights
 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 8 | # copies of the Software, and to permit persons to whom the Software is
 9 | # furnished to do so, subject to the following conditions:
10 | 
11 | # The above copyright notice and this permission notice shall be included in all
12 | # copies or substantial portions of the Software.
13 | 
14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | # SOFTWARE.
21 | from . import common
22 | from . import Test_Driver as driver
23 | 
24 | def read(sensor, pin):
25 |     # Get a reading from C driver code.
26 |     result, humidity, temp = driver.read(sensor, pin)
27 |     if result in common.TRANSIENT_ERRORS:
28 |         # Signal no result could be obtained, but the caller can retry.
29 |         return (None, None)
30 |     elif result != common.DHT_SUCCESS:
31 |         # Some kind of error occured.
32 |         raise RuntimeError('Error calling DHT test driver read: {0}'.format(result))
33 |     return (humidity, temp)
34 | 


--------------------------------------------------------------------------------
/Software/Python/sensor_examples/dht/Adafruit_Python_DHT/Adafruit_DHT/__init__.py:
--------------------------------------------------------------------------------
 1 | # Copyright (c) 2014 Adafruit Industries
 2 | # Author: Tony DiCola
 3 | 
 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy
 5 | # of this software and associated documentation files (the "Software"), to deal
 6 | # in the Software without restriction, including without limitation the rights
 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 8 | # copies of the Software, and to permit persons to whom the Software is
 9 | # furnished to do so, subject to the following conditions:
10 | 
11 | # The above copyright notice and this permission notice shall be included in all
12 | # copies or substantial portions of the Software.
13 | 
14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | # SOFTWARE.
21 | from .common import DHT11, DHT22, AM2302, read, read_retry
22 | 


--------------------------------------------------------------------------------
/Software/Python/sensor_examples/dht/Adafruit_Python_DHT/LICENSE:
--------------------------------------------------------------------------------
 1 | The MIT License (MIT)
 2 | 
 3 | Copyright (c) 2014 Adafruit Industries
 4 | 
 5 | Permission is hereby granted, free of charge, to any person obtaining a copy
 6 | of this software and associated documentation files (the "Software"), to deal
 7 | in the Software without restriction, including without limitation the rights
 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 | 
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 | 
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.


--------------------------------------------------------------------------------
/Software/Python/sensor_examples/dht/Adafruit_Python_DHT/README.md:
--------------------------------------------------------------------------------
 1 | Adafruit Python DHT Sensor Library
 2 | ==================================
 3 | 
 4 | Python library to read the DHT series of humidity and temperature sensors on a Raspberry Pi or Beaglebone Black.
 5 | 
 6 | Designed specifically to work with the Adafruit DHT series sensors ----> https://www.adafruit.com/products/385
 7 | 
 8 | Currently the library is only tested with Python 2.6/2.7.
 9 | 
10 | For all platforms (Raspberry Pi and Beaglebone Black) make sure your system is able to compile Python extensions.  On Raspbian or Beaglebone Black's Debian/Ubuntu image you can ensure your system is ready by executing:
11 | 
12 | ````
13 | sudo apt-get update
14 | sudo apt-get install build-essential python-dev
15 | ````
16 | 
17 | Install the library by downloading with the download link on the right, unzipping the archive, and executing:
18 | 
19 | ````
20 | sudo python setup.py install
21 | ````
22 | You can ommit the sudo if you use raspberry pi.
23 | 
24 | See example of usage in the examples folder.
25 | 
26 | Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!
27 | 
28 | Written by Tony DiCola for Adafruit Industries.
29 | 
30 | MIT license, all text above must be included in any redistribution
31 | 


--------------------------------------------------------------------------------
/Software/Python/sensor_examples/dht/Adafruit_Python_DHT/source/Beaglebone_Black/bbb_dht_read.h:
--------------------------------------------------------------------------------
 1 | // Copyright (c) 2014 Adafruit Industries
 2 | // Author: Tony DiCola
 3 | 
 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy
 5 | // of this software and associated documentation files (the "Software"), to deal
 6 | // in the Software without restriction, including without limitation the rights
 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 8 | // copies of the Software, and to permit persons to whom the Software is
 9 | // furnished to do so, subject to the following conditions:
10 | 
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | 
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 | #ifndef BBB_DHT_READ_H
22 | #define BBB_DHT_READ_H
23 | 
24 | #include "../common_dht_read.h"
25 | 
26 | // Read DHT sensor connected to GPIO bin GPIO_, for example P8_11 is GPIO1_13 with
27 | // base = 1 and number = 13.  Humidity and temperature will be returned in the provided parameters.
28 | // If a successfull reading could be made a value of 0 (DHT_SUCCESS) will be returned.  If there
29 | // was an error reading the sensor a negative value will be returned.  Some errors can be ignored
30 | // and retried, specifically DHT_ERROR_TIMEOUT or DHT_ERROR_CHECKSUM.
31 | int bbb_dht_read(int type, int gpio_base, int gpio_number, float* humidity, float* temperature);
32 | 
33 | #endif
34 | 


--------------------------------------------------------------------------------
/Software/Python/sensor_examples/dht/Adafruit_Python_DHT/source/Raspberry_Pi/pi_dht_read.h:
--------------------------------------------------------------------------------
 1 | // Copyright (c) 2014 Adafruit Industries
 2 | // Author: Tony DiCola
 3 | 
 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy
 5 | // of this software and associated documentation files (the "Software"), to deal
 6 | // in the Software without restriction, including without limitation the rights
 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 8 | // copies of the Software, and to permit persons to whom the Software is
 9 | // furnished to do so, subject to the following conditions:
10 | 
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | 
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 | #ifndef PI_DHT_READ_H
22 | #define PI_DHT_READ_H
23 | 
24 | #include "../common_dht_read.h"
25 | 
26 | // Read DHT sensor connected to GPIO pin (using BCM numbering).  Humidity and temperature will be 
27 | // returned in the provided parameters. If a successfull reading could be made a value of 0 
28 | // (DHT_SUCCESS) will be returned.  If there was an error reading the sensor a negative value will
29 | // be returned.  Some errors can be ignored and retried, specifically DHT_ERROR_TIMEOUT or DHT_ERROR_CHECKSUM.
30 | int pi_dht_read(int sensor, int pin, float* humidity, float* temperature);
31 | 
32 | #endif
33 | 


--------------------------------------------------------------------------------
/Software/Python/sensor_examples/dht/Adafruit_Python_DHT/source/Raspberry_Pi_2/pi_2_dht_read.h:
--------------------------------------------------------------------------------
 1 | // Copyright (c) 2014 Adafruit Industries
 2 | // Author: Tony DiCola
 3 | 
 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy
 5 | // of this software and associated documentation files (the "Software"), to deal
 6 | // in the Software without restriction, including without limitation the rights
 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 8 | // copies of the Software, and to permit persons to whom the Software is
 9 | // furnished to do so, subject to the following conditions:
10 | 
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | 
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 | #ifndef PI_2_DHT_READ_H
22 | #define PI_2_DHT_READ_H
23 | 
24 | #include "../common_dht_read.h"
25 | 
26 | // Read DHT sensor connected to GPIO pin (using BCM numbering).  Humidity and temperature will be 
27 | // returned in the provided parameters. If a successfull reading could be made a value of 0 
28 | // (DHT_SUCCESS) will be returned.  If there was an error reading the sensor a negative value will
29 | // be returned.  Some errors can be ignored and retried, specifically DHT_ERROR_TIMEOUT or DHT_ERROR_CHECKSUM.
30 | int pi_2_dht_read(int sensor, int pin, float* humidity, float* temperature);
31 | 
32 | #endif
33 | 


--------------------------------------------------------------------------------
/Software/Python/sensor_examples/dht/Adafruit_Python_DHT/source/Test/test_dht_read.c:
--------------------------------------------------------------------------------
 1 | // Copyright (c) 2014 Adafruit Industries
 2 | // Author: Tony DiCola
 3 | 
 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy
 5 | // of this software and associated documentation files (the "Software"), to deal
 6 | // in the Software without restriction, including without limitation the rights
 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 8 | // copies of the Software, and to permit persons to whom the Software is
 9 | // furnished to do so, subject to the following conditions:
10 | 
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | 
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 | #include 
22 | 
23 | #include "test_dht_read.h"
24 | 
25 | int test_dht_read(int type, int pin, float* humidity, float* temperature) {
26 |   // Validate humidity and temperature arguments and set them to zero.
27 |   if (humidity == NULL || temperature == NULL) {
28 |     return -1;
29 |   }
30 |   *temperature = 42.0f;
31 |   *humidity = 50.0f;
32 | 
33 |   return 0;
34 | }
35 | 


--------------------------------------------------------------------------------
/Software/Python/sensor_examples/dht/Adafruit_Python_DHT/source/Test/test_dht_read.h:
--------------------------------------------------------------------------------
 1 | // Copyright (c) 2014 Adafruit Industries
 2 | // Author: Tony DiCola
 3 | 
 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy
 5 | // of this software and associated documentation files (the "Software"), to deal
 6 | // in the Software without restriction, including without limitation the rights
 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 8 | // copies of the Software, and to permit persons to whom the Software is
 9 | // furnished to do so, subject to the following conditions:
10 | 
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | 
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 | #ifndef TEST_DHT_READ_H
22 | #define TEST_DHT_READ_H
23 | 
24 | int test_dht_read(int sensor, int pin, float* humidity, float* temperature);
25 | 
26 | #endif
27 | 


--------------------------------------------------------------------------------
/Software/Python/setup.py:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/env python
 2 | #
 3 | '''
 4 | ## License
 5 |  GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi.
 6 |  Copyright (C) 2017  Dexter Industries
 7 | 
 8 | This program is free software: you can redistribute it and/or modify
 9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 | 
13 | This program is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 | GNU General Public License for more details.
17 | 
18 | You should have received a copy of the GNU General Public License
19 | along with this program.  If not, see .
20 | '''
21 | 
22 | import setuptools
23 | setuptools.setup(
24 |     name="GoPiGo",
25 |     description="Drivers and examples for using the GoPiGo in Python",
26 |     author="Dexter Industries",
27 |     url="http://www.dexterindustries.com/GoPiGo/",
28 |     py_modules=['gopigo','easygopigo'],
29 |     install_requires=open('requirements.txt').readlines(),
30 | )
31 | 


--------------------------------------------------------------------------------
/Software/Python/tests/enc_test.py:
--------------------------------------------------------------------------------
1 | from gopigo import *
2 | import sys
3 | 
4 | fwd()
5 | enc_tgt(1,1,18)
6 | time.sleep(.01)
7 | while True:
8 | 	print read_enc_status(),
9 | 


--------------------------------------------------------------------------------
/Software/Python/tests/enc_tgt_test.py:
--------------------------------------------------------------------------------
 1 | #!/usr/bin/env python
 2 | from gopigo import *
 3 | import sys
 4 | 
 5 | import atexit
 6 | atexit.register(stop)
 7 | 
 8 | enable_encoders()
 9 | 
10 | print "\nCHECKING ENCODER READINGS"
11 | print enc_read(0),
12 | print enc_read(1)
13 | print "Both motors moving Forward with LED On"
14 | led_on(0)
15 | led_on(1)
16 | fwd()
17 | time.sleep(5)
18 | print "after 5 sec",
19 | print enc_read(0),
20 | print enc_read(1)
21 | print "Both motors stopped with LED Off"
22 | led_off(0)
23 | led_off(1)
24 | ret = stop()
25 | print ret,
26 | print "after stop cmd",
27 | print enc_read(0),
28 | print enc_read(1)
29 | time.sleep(2)
30 | print ret,
31 | print "after 2 more sec",
32 | print enc_read(0),
33 | print enc_read(1)
34 | print "Both motors moving back with LED On"
35 | led_on(0)
36 | led_on(1)
37 | bwd()
38 | time.sleep(5)
39 | print "after 5 sec",
40 | print enc_read(0),
41 | print enc_read(1)
42 | print "Both motors stopped with LED Off"
43 | led_off(0)
44 | led_off(1)
45 | ret = stop()
46 | print ret,
47 | print "after stop cmd",
48 | print enc_read(0),
49 | print enc_read(1)
50 | time.sleep(2)
51 | print ret,
52 | print "after 2 more sec ",
53 | print enc_read(0),
54 | print enc_read(1)
55 | 	
56 | print "\nCHECKING ENCODER TARGETING"
57 | for i in range(5):
58 | 	j=0
59 | 	print "\nInitial encoder read vals:",
60 | 	fwd()
61 | 	enc_tgt(1,1,72)
62 | 	print enc_read(0),
63 | 	print enc_read(1)
64 | 	while True:
65 | 		if j>10:
66 | 			print "FAIL"
67 | 			break
68 | 		j+=1
69 | 		enc_stat=read_enc_status()
70 | 		print "Enc tgt Status: ",enc_stat
71 | 		if enc_stat==0:
72 | 			break;
73 | 		time.sleep(.5)
74 | 	print "Final encoder read vals:",
75 | 	print enc_read(0),
76 | 	print enc_read(1)
77 | 	time.sleep(1)


--------------------------------------------------------------------------------
/Software/Python/tests/firmware_version_cpu_test.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | from __future__ import print_function
3 | from gopigo import *
4 | 
5 | print("Version:",fw_ver())
6 | print("CPU Speed:",cpu_speed())
7 | print("Power Supply:",volt(),"V")
8 | 


--------------------------------------------------------------------------------
/Software/Python/tests/servo_test.py:
--------------------------------------------------------------------------------
1 | from gopigo import *
2 | disable_servo()
3 | for i in range(180):
4 | 	
5 | 	servo(i)
6 | 	print i
7 | 	time.sleep(.01)
8 | 	


--------------------------------------------------------------------------------
/Software/Python/tests/speed_test.py:
--------------------------------------------------------------------------------
 1 | from gopigo import *
 2 | import sys
 3 | 
 4 | while True:
 5 | 	print "\nCmd:",
 6 | 	a=raw_input()
 7 | 	if a=='w':
 8 | 		fwd()
 9 | 	elif a=='a':
10 | 		set_speed(255)
11 | 	elif a=='s':
12 | 		set_speed(155)
13 | 	elif a=='d':
14 | 		disable_encoders()
15 | 	time.sleep(.1)


--------------------------------------------------------------------------------
/Software/Python/tests/test_mutex.py:
--------------------------------------------------------------------------------
 1 | '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 2 | This file attempts to create one of eac sensor and sets its mutex use to True.
 3 | As the use_mutex is a member of the base Sensor class, we check if the info is passed down properly
 4 | It does not test whether mutex is properly used inside each sensor
 5 | In fact some sensors will make no use of it at all
 6 | (on GPG3 some sensors do not require mutex)
 7 | Nicole Parrot
 8 | '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 9 | 
10 | import easygopigo as easy
11 | 
12 | g = easy.EasyGoPiGo(use_mutex=True)
13 | 
14 | light_sensor = easy.LightSensor(gpg=g, use_mutex = True)
15 | buzzer = easy.Buzzer(gpg=g, use_mutex = True)
16 | led = easy.Led(gpg=g, use_mutex = True)
17 | motion = easy.MotionSensor(gpg=g, use_mutex = True)
18 | button = easy.ButtonSensor(gpg=g, use_mutex = True)
19 | remote = easy.Remote(gpg=g, use_mutex = True)
20 | line_follower = easy.LineFollower(gpg=g, use_mutex = True)
21 | servo = easy.Servo(gpg=g, use_mutex = True)
22 | distance_sensor = easy.DistanceSensor(gpg=g, use_mutex = True)
23 | dht = easy.DHTSensor(gpg=g, use_mutex = True)
24 | assert(g.use_mutex == True)
25 | assert(light_sensor.use_mutex == True)
26 | assert(buzzer.use_mutex == True)
27 | assert(led.use_mutex == True)
28 | assert(motion.use_mutex == True)
29 | assert(button.use_mutex == True)
30 | assert(remote.use_mutex == True)
31 | assert(line_follower.use_mutex == True)
32 | assert(servo.use_mutex == True)
33 | assert(distance_sensor.use_mutex == True)
34 | assert(dht.use_mutex == True)
35 | print("Done")
36 | 
37 | 


--------------------------------------------------------------------------------
/Software/Python/tests/timeout_response_test.py:
--------------------------------------------------------------------------------
1 | from gopigo import *
2 | import sys
3 | fwd()
4 | enable_com_timeout(1000)
5 | time.sleep(.01)
6 | while True:
7 | 	print read_timeout_status(),
8 | 


--------------------------------------------------------------------------------
/Software/Python/tests/timeout_test.py:
--------------------------------------------------------------------------------
1 | from gopigo import *
2 | import sys
3 | 
4 | fwd()
5 | enable_com_timeout(2000)


--------------------------------------------------------------------------------
/Software/README.md:
--------------------------------------------------------------------------------
 1 | # GoPiGo
 2 | 
 3 | The GoPiGo is a delightful and complete robot for the Raspberry Pi that turns your Pi into a fully operating robot.  GoPiGo is a mobile robotic platform for the Raspberry Pi developed by [Dexter Industries.](http://www.dexterindustries.com/GoPiGo)  
 4 | 
 5 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Chassis-300.jpg)
 6 | 
 7 | This repository contains source code, firmware and design materials for the GoPiGo.
 8 | 
 9 | ![ GoPiGo ](https://raw.githubusercontent.com/DexterInd/GoPiGo/master/GoPiGo_Front_Facing_Camera300.jpg)
10 | 
11 | # See Also
12 | 
13 | - [Dexter Industries](http://www.dexterindustries.com/GoPiGo)
14 | - [Kickstarter Campaign](http://kck.st/Q6vVOP)
15 | - [Raspberry Pi](http://www.raspberrypi.org/)
16 | 
17 | ## License
18 | GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi.
19 | Copyright (C) 2015  Dexter Industries
20 | 
21 | This program is free software: you can redistribute it and/or modify
22 | it under the terms of the GNU General Public License as published by
23 | the Free Software Foundation, either version 3 of the License, or
24 | (at your option) any later version.
25 | 
26 | This program is distributed in the hope that it will be useful,
27 | but WITHOUT ANY WARRANTY; without even the implied warranty of
28 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29 | GNU General Public License for more details.
30 | 
31 | You should have received a copy of the GNU General Public License
32 | along with this program.  If not, see .


--------------------------------------------------------------------------------
/Software/Scratch/Examples/GoPiGo control_panel.sb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Scratch/Examples/GoPiGo control_panel.sb


--------------------------------------------------------------------------------
/Software/Scratch/Examples/GoPiGo_Basic_test.sb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Scratch/Examples/GoPiGo_Basic_test.sb


--------------------------------------------------------------------------------
/Software/Scratch/Examples/GoPiGo_DHT_MarsRover.sb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Scratch/Examples/GoPiGo_DHT_MarsRover.sb


--------------------------------------------------------------------------------
/Software/Scratch/Examples/GoPiGo_IR_Remote_Example.sb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Scratch/Examples/GoPiGo_IR_Remote_Example.sb


--------------------------------------------------------------------------------
/Software/Scratch/Examples/GoPiGo_Ultrasonic_radar.sb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Scratch/Examples/GoPiGo_Ultrasonic_radar.sb


--------------------------------------------------------------------------------
/Software/Scratch/Examples/Line_Follower_Example.sb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Scratch/Examples/Line_Follower_Example.sb


--------------------------------------------------------------------------------
/Software/Scratch/Examples/Scratch Sensor Read Example.sb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Scratch/Examples/Scratch Sensor Read Example.sb


--------------------------------------------------------------------------------
/Software/Scratch/Examples/icons/arrow89.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Scratch/Examples/icons/arrow89.png


--------------------------------------------------------------------------------
/Software/Scratch/Examples/icons/fast19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Scratch/Examples/icons/fast19.png


--------------------------------------------------------------------------------
/Software/Scratch/Examples/icons/light59.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Scratch/Examples/icons/light59.png


--------------------------------------------------------------------------------
/Software/Scratch/Examples/icons/off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Scratch/Examples/icons/off.png


--------------------------------------------------------------------------------
/Software/Scratch/Examples/icons/stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Scratch/Examples/icons/stop.png


--------------------------------------------------------------------------------
/Software/Scratch/GoPiGo_Ports-Bottom.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Scratch/GoPiGo_Ports-Bottom.jpg


--------------------------------------------------------------------------------
/Software/Scratch/GoPiGo_Ports-Top.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Scratch/GoPiGo_Ports-Top.jpg


--------------------------------------------------------------------------------
/Software/Scratch/GoPiGo_Scratch_Scripts/GoPiGoScratch_debug.sh:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | 
3 | id=$(ps aux | grep "python GoPiGoScratch.py" | grep -v grep | awk '{print $2}')
4 | kill -15 $id 2> /dev/null
5 | python /home/pi/Desktop/GoPiGo/Software/Scratch/GoPiGoScratch.py
6 | 


--------------------------------------------------------------------------------
/Software/Scratch/GoPiGo_Scratch_Scripts/GoPiGo_Scratch_Start.desktop:
--------------------------------------------------------------------------------
 1 | [Desktop Entry]
 2 | Encoding=UTF-8
 3 | Version=1.0
 4 | Type=Application
 5 | Exec=/home/pi/Desktop/GoPiGo/Software/Scratch/GoPiGo_Scratch_Scripts/GoPiGo_Scratch_Start.sh
 6 | Icon=/usr/share/scratch/Media/Costumes/Animals/cat1-b.gif
 7 | Terminal=false
 8 | Name=GoPiGo_Scratch_Start
 9 | Comment= Programming system and content development tool
10 | Categories=Application;Education;Development;
11 | MimeType=application/x-scratch-project
12 | 


--------------------------------------------------------------------------------
/Software/Scratch/GoPiGo_Scratch_Scripts/GoPiGo_Scratch_Start.sh:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | lxterminal --command "sudo /home/pi/Desktop/GoPiGo/Software/Scratch/GoPiGo_Scratch_Scripts/GoPiGoScratch_debug.sh"
3 | 


--------------------------------------------------------------------------------
/Software/Scratch/GoPiGo_Scratch_Scripts/README.md:
--------------------------------------------------------------------------------
 1 | NOTE: THIS IS FOR DEVELOPERS ONLY.  Normal user need not do this.
 2 | 
 3 | 1. Make both **GoPiGoScratch_debug.sh** and **GoPiGo_Scratch_Start.sh** execuatable:
 4 | 
 5 |   > sudo chmod +x GoPiGoScratch_debug.sh
 6 | 
 7 |   > sudo chmod +x GoPiGo_Scratch_Start.sh
 8 | 
 9 | 2. Copy **GoPiGo_Scratch_Start.desktop** to **/usr/share/applications/**
10 | 3. Make a desktop Shortcut from **Desktop->Education->GoPiGo_Scratch_Start**
11 | 3. Double click on **GoPiGo_Scratch_Start** to start running the script
12 | 
13 | 
14 | For the examples to work, you will need to copy the icons located in 
15 | 	/home/pi/Desktop/GoPiGo/Software/Scratch/Examples/icons
16 | to the folder
17 | 	/usr/share/scratch/Media/GPG
18 | 	


--------------------------------------------------------------------------------
/Software/Scratch/GoPiGo_Scratch_Scripts/Scratch_setup.txt:
--------------------------------------------------------------------------------
 1 | These are instructions for installing GoPiGo Scratch on any Raspberry Pi image not from Dexter Industries.
 2 | To skip this step, use the Dexter Industries Raspberry Pi image, found here:  http://www.dexterindustries.com/BrickPi/getting-started/pi-prep/
 3 | 
 4 | The following is a short list of changes needed to setup GoPiGo for Scratch.  
 5 | 
 6 | You need the ScratchPy library to be installed. Install it by the following procedure.
 7 | Run the command:
 8 | 	sudo wget https://bitbucket.org/pypa/setuptools/raw/0.7.4/ez_setup.py -O - | sudo python
 9 | Clone scratchpy:
10 | 	cd Desktop/GoPiGo/Software/Scratch
11 | 	git clone https://github.com/DexterInd/scratchpy.git
12 | Navigate to extracted directory and run:
13 | 	sudo make install
14 | 
15 | Start Scratch
16 | Select "Sensing"
17 | Right Click Enable Remote sensor connections
18 | You will see "Remote Sensor Connections Enabled"
19 | 
20 | back to terminal
21 | 	cd Desktop/GoPiGo/Software/Scratch
22 | 	sudo python GoPiGoScratch.py
23 | 	
24 | Now open up an example:
25 | 	Might see "Remote sensor connections enabled" again.  That's fine, hit ok.
26 | 	And now go!
27 | 	
28 | 	


--------------------------------------------------------------------------------
/Software/Scratch/scratch_functions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DexterInd/GoPiGo/fed6a02de7800f7ee9b2215b7b13881a0c96dcee/Software/Scratch/scratch_functions.png


--------------------------------------------------------------------------------
/Troubleshooting/README.md:
--------------------------------------------------------------------------------
 1 | # GoPiGo Trubleshooting Script
 2 | 
 3 | The scripts here are for finding the common problems with the GoPiGo.
 4 | 
 5 | To run the test, make the complete_test.sh executable:
 6 | 
 7 | > sudo chmod +x complete_test.sh
 8 | 
 9 | and run it:
10 | 
11 | > sudo ./complete_test.sh
12 | 
13 | Choose option 6 to run all the tests. This might take a few minutes.
14 | 
15 | Once the tests are completed, a *log.txt* file would be created on the Desktop. Send this by email or post it on the forums. 
16 | 
17 | # See Also
18 | 
19 | - [Dexter Industries] (http://www.dexterindustries.com/GoPiGo)
20 | - [Kickstarter Campaign] (http://kck.st/Q6vVOP)
21 | - [Raspberry Pi] (http://www.raspberrypi.org/)
22 | 


--------------------------------------------------------------------------------
/Troubleshooting/all_tests.sh:
--------------------------------------------------------------------------------
 1 | #! /bin/bash
 2 | REPO_PATH=$(readlink -f $(dirname $0) | grep -E -o "^(.*?\\GoPiGo)")
 3 | 
 4 | echo =============================
 5 | echo GoPiGo Troubleshooting Script
 6 | echo ============================= 
 7 | 
 8 | echo ""
 9 | echo Adding permissions to the scripts
10 | echo ================================= 
11 | cd $REPO_PATH/Troubleshooting/
12 | chmod +x software_status.sh
13 | chmod +x avrdude_test.sh
14 | chmod +x i2c_test1.sh
15 | chmod +x firmware_version_test.sh
16 | chmod +x motor_enc_led_test.sh
17 | 
18 | sudo ./software_status.sh 2>&1| tee log.txt 
19 | sudo ./avrdude_test.sh 2>&1| tee -a log.txt 
20 | sudo ./i2c_test1.sh 2>&1| tee -a log.txt 
21 | sudo ./firmware_version_test.sh 2>&1| tee -a log.txt  
22 | sudo ./motor_enc_led_test.sh 2>&1| tee -a log.txt  
23 | 
24 | cp log.txt /home/pi/Desktop/log.txt
25 | echo "Log has been saved to Desktop. Please copy it and send it by email or upload it on the forums"
26 | 


--------------------------------------------------------------------------------
/Troubleshooting/avrdude_test.sh:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | echo ""
3 | echo Checking for Atmega chip
4 | echo ========================
5 | echo ""
6 | avrdude -c gpio -p m328p -v


--------------------------------------------------------------------------------
/Troubleshooting/complete_test.sh:
--------------------------------------------------------------------------------
 1 | #! /bin/bash
 2 | 
 3 | echo =============================
 4 | echo GoPiGo Troubleshooting Script
 5 | echo ============================= 
 6 | 
 7 | echo ""
 8 | echo Adding permissions to the scripts
 9 | echo ================================= 
10 | chmod +x software_status.sh
11 | chmod +x avrdude_test.sh
12 | chmod +x i2c_test1.sh
13 | chmod +x firmware_version_test.sh
14 | chmod +x motor_enc_led_test.sh
15 | 
16 | echo "Choose a test to run:"
17 | echo =======================
18 | echo 1. Software status test
19 | echo 2. Atmega Test
20 | echo 3. I2C test
21 | echo 4. Firmware test
22 | echo 5. Motor test
23 | echo 6. Complete test
24 | echo 7. Exit
25 | 
26 | read -n1 -p "Select and option:" doit 
27 | case $doit in  
28 |   1) sudo ./software_status.sh 2>&1| tee log.txt ;;
29 |   2) sudo ./avrdude_test.sh 2>&1| tee log.txt ;;
30 |   3) sudo ./i2c_test1.sh 2>&1| tee log.txt ;;
31 |   4) sudo ./firmware_version_test.sh 2>&1| sudo tee log.txt ;;
32 |   5) sudo ./motor_enc_led_test.sh 2>&1| tee log.txt ;;
33 |   6) sudo ./software_status.sh 2>&1| tee log.txt ;
34 | 	 sudo ./avrdude_test.sh 2>&1| tee -a log.txt ;
35 | 	 sudo ./i2c_test1.sh 2>&1| tee -a log.txt  ;
36 | 	 sudo ./firmware_version_test.sh 2>&1| tee -a log.txt  ;
37 | 	 sudo ./motor_enc_led_test.sh 2>&1| tee -a log.txt  ;;
38 |   *) echo Exiting ;; 
39 | esac
40 | 
41 | cp log.txt /home/pi/Desktop/log.txt
42 | echo "Log has been saved to Desktop. Please copy it and send it by email or upload it on the forums"
43 | 


--------------------------------------------------------------------------------
/Troubleshooting/firmware_version_test.sh:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | REPO_PATH=$(readlink -f $(dirname $0) | grep -E -o "^(.*?\\GoPiGo)")
3 | echo ""
4 | echo Checking for firmware version and CPU Speed and Voltage
5 | echo =======================================================
6 | sudo python $REPO_PATH/Software/Python/tests/firmware_version_cpu_test.py
7 | 


--------------------------------------------------------------------------------
/Troubleshooting/i2c_test1.sh:
--------------------------------------------------------------------------------
 1 | #! /bin/bash
 2 | echo ""
 3 | echo Checking I2C bus for devices
 4 | echo ============================
 5 | echo ""
 6 | 
 7 | echo Checking I2C bus 0
 8 | echo ==================
 9 | i2cdetect -y 0 
10 | 
11 | echo ""
12 | echo Checking I2C bus 1
13 | echo ==================
14 | i2cdetect -y 1 


--------------------------------------------------------------------------------
/Troubleshooting/motor_enc_led_test.sh:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | REPO_PATH=$(readlink -f $(dirname $0) | grep -E -o "^(.*?\\GoPiGo)")
3 | echo ""
4 | sudo python $REPO_PATH/Software/Python/tests/enc_tgt_test.py
5 | 


--------------------------------------------------------------------------------