├── Chapter03 ├── rc_motor_control │ ├── Makefile │ ├── rc_motor_control │ └── rc_motor_control.c └── rc_wheeled_auto │ ├── Makefile │ ├── rc_wheeled_auto │ └── rc_wheeled_auto.c ├── Chapter04 ├── NewPing.docx ├── barrier_path.docx └── simple_path.docx ├── Chapter05 ├── camera.docx ├── color_tracking.docx ├── color_tracking_platform_movement.docx └── color_tracking_with_boundary.docx ├── Chapter07 ├── lean_right.docx ├── rc_move_servos.docx ├── rc_test_servos.docx └── two_steps.docx ├── Chapter08 ├── gpsd.docx ├── location.docx └── measgps.docx ├── Chapter10 ├── client_program.py ├── server_program.py ├── web_python_program.py └── web_server_program.html ├── LICENSE └── README.md /Chapter03/rc_motor_control/Makefile: -------------------------------------------------------------------------------- 1 | # This is a general use makefile for robotics cape projects written in C. 2 | # Just change the target name to match your main source code filename. 3 | TARGET = rc_motor_control 4 | 5 | 6 | TOUCH := $(shell touch *) 7 | CC := gcc 8 | LINKER := gcc -o 9 | CFLAGS := -c -Wall -g 10 | LFLAGS := -lm -lrt -lpthread -lroboticscape 11 | 12 | SOURCES := $(wildcard *.c) 13 | INCLUDES := $(wildcard *.h) 14 | OBJECTS := $(SOURCES:$%.c=$%.o) 15 | 16 | prefix := /usr/local 17 | RM := rm -f 18 | INSTALL := install -m 755 19 | INSTALLDIR := install -d -m 755 20 | 21 | LINK := ln -s -f 22 | LINKDIR := /etc/roboticscape 23 | LINKNAME := link_to_startup_program 24 | 25 | 26 | # linking Objects 27 | $(TARGET): $(OBJECTS) 28 | @$(LINKER) $(@) $(OBJECTS) $(LFLAGS) 29 | 30 | 31 | # compiling command 32 | $(OBJECTS): %.o : %.c 33 | @$(TOUCH) $(CC) $(CFLAGS) -c $< -o $(@) 34 | @echo "Compiled: "$< 35 | 36 | all: 37 | $(TARGET) 38 | 39 | debug: 40 | $(MAKE) $(MAKEFILE) DEBUGFLAG="-g -D DEBUG" 41 | @echo " " 42 | @echo "$(TARGET) Make Debug Complete" 43 | @echo " " 44 | 45 | install: 46 | @$(MAKE) --no-print-directory 47 | @$(INSTALLDIR) $(DESTDIR)$(prefix)/bin 48 | @$(INSTALL) $(TARGET) $(DESTDIR)$(prefix)/bin 49 | @echo "$(TARGET) Install Complete" 50 | 51 | clean: 52 | @$(RM) $(OBJECTS) 53 | @$(RM) $(TARGET) 54 | @echo "$(TARGET) Clean Complete" 55 | 56 | uninstall: 57 | @$(RM) $(DESTDIR)$(prefix)/bin/$(TARGET) 58 | @echo "$(TARGET) Uninstall Complete" 59 | 60 | runonboot: 61 | @$(MAKE) install --no-print-directory 62 | @$(LINK) $(DESTDIR)$(prefix)/bin/$(TARGET) $(LINKDIR)/$(LINKNAME) 63 | @echo "$(TARGET) Set to Run on Boot" 64 | 65 | -------------------------------------------------------------------------------- /Chapter03/rc_motor_control/rc_motor_control: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadonk/BeagleBone-Robotic-Projects-Second-Edition/6e3a69965482d3b155028c3db13aa393b6701c30/Chapter03/rc_motor_control/rc_motor_control -------------------------------------------------------------------------------- /Chapter03/rc_motor_control/rc_motor_control.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * rc_motor_control.c 3 | * 4 | * This is a simple dc motor control program. It takes in a character 5 | * and then controls the motors to move forward, reverse, left or right 6 | ******************************************************************************/ 7 | 8 | #include 9 | #include 10 | 11 | /****************************************************************************** 12 | * int main() 13 | * 14 | * This main function contains these critical components 15 | * - call to initialize_cape 16 | * - main while loop that checks for EXITING condition 17 | * - switch statement to send proper controls to the motors 18 | * - cleanup_roboticscape() at the end 19 | ******************************************************************************/ 20 | int main(){ 21 | char input; 22 | // always initialize cape library first 23 | rc_initialize(); 24 | 25 | printf("\nHello BeagleBone\n"); 26 | 27 | // done initializing so set state to RUNNING 28 | rc_set_state(RUNNING); 29 | 30 | // bring H-bridges of of standby 31 | rc_enable_motors(); 32 | rc_set_led(GREEN,ON); 33 | rc_set_led(RED,ON); 34 | 35 | rc_set_motor_free_spin(1); 36 | rc_set_motor_free_spin(2); 37 | printf("Motors are now ready.\n"); 38 | // Turn on a raw terminal to get a single character 39 | system("stty raw"); 40 | do 41 | { 42 | printf("> "); 43 | input = getchar(); 44 | switch(input){ 45 | case 'f': 46 | rc_set_motor(1, 0.5); 47 | rc_set_motor(2, 0.5); 48 | break; 49 | case 'r': 50 | rc_set_motor(1, 0.5); 51 | rc_set_motor(2, -0.5); 52 | break; 53 | case 'l': 54 | rc_set_motor(1, -0.5); 55 | rc_set_motor(2, 0.5); 56 | break; 57 | case 'b': 58 | rc_set_motor(1, -0.5); 59 | rc_set_motor(2, -0.5); 60 | break; 61 | case 's': 62 | rc_set_motor_brake_all(); 63 | break; 64 | case 'q': 65 | rc_disable_motors(); 66 | break; 67 | default: 68 | printf("Invalid Character.\n"); 69 | } 70 | } 71 | while(input != 'q'); 72 | printf("Done\n"); 73 | rc_cleanup(); 74 | system("stty cooked"); 75 | 76 | return 0; 77 | } 78 | 79 | -------------------------------------------------------------------------------- /Chapter03/rc_wheeled_auto/Makefile: -------------------------------------------------------------------------------- 1 | # This is a general use makefile for robotics cape projects written in C. 2 | # Just change the target name to match your main source code filename. 3 | TARGET = rc_wheeled_auto 4 | 5 | 6 | TOUCH := $(shell touch *) 7 | CC := gcc 8 | LINKER := gcc -o 9 | CFLAGS := -c -Wall -g 10 | LFLAGS := -lm -lrt -lpthread -lroboticscape 11 | 12 | SOURCES := $(wildcard *.c) 13 | INCLUDES := $(wildcard *.h) 14 | OBJECTS := $(SOURCES:$%.c=$%.o) 15 | 16 | prefix := /usr/local 17 | RM := rm -f 18 | INSTALL := install -m 755 19 | INSTALLDIR := install -d -m 755 20 | 21 | LINK := ln -s -f 22 | LINKDIR := /etc/roboticscape 23 | LINKNAME := link_to_startup_program 24 | 25 | 26 | # linking Objects 27 | $(TARGET): $(OBJECTS) 28 | @$(LINKER) $(@) $(OBJECTS) $(LFLAGS) 29 | 30 | 31 | # compiling command 32 | $(OBJECTS): %.o : %.c 33 | @$(TOUCH) $(CC) $(CFLAGS) -c $< -o $(@) 34 | @echo "Compiled: "$< 35 | 36 | all: 37 | $(TARGET) 38 | 39 | debug: 40 | $(MAKE) $(MAKEFILE) DEBUGFLAG="-g -D DEBUG" 41 | @echo " " 42 | @echo "$(TARGET) Make Debug Complete" 43 | @echo " " 44 | 45 | install: 46 | @$(MAKE) --no-print-directory 47 | @$(INSTALLDIR) $(DESTDIR)$(prefix)/bin 48 | @$(INSTALL) $(TARGET) $(DESTDIR)$(prefix)/bin 49 | @echo "$(TARGET) Install Complete" 50 | 51 | clean: 52 | @$(RM) $(OBJECTS) 53 | @$(RM) $(TARGET) 54 | @echo "$(TARGET) Clean Complete" 55 | 56 | uninstall: 57 | @$(RM) $(DESTDIR)$(prefix)/bin/$(TARGET) 58 | @echo "$(TARGET) Uninstall Complete" 59 | 60 | runonboot: 61 | @$(MAKE) install --no-print-directory 62 | @$(LINK) $(DESTDIR)$(prefix)/bin/$(TARGET) $(LINKDIR)/$(LINKNAME) 63 | @echo "$(TARGET) Set to Run on Boot" 64 | 65 | -------------------------------------------------------------------------------- /Chapter03/rc_wheeled_auto/rc_wheeled_auto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadonk/BeagleBone-Robotic-Projects-Second-Edition/6e3a69965482d3b155028c3db13aa393b6701c30/Chapter03/rc_wheeled_auto/rc_wheeled_auto -------------------------------------------------------------------------------- /Chapter03/rc_wheeled_auto/rc_wheeled_auto.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * rc_wheeled_auto.c 3 | * 4 | * This is a program that uses the compass to turn the wheeled 5 | * platform and then go a certain distance. 6 | ******************************************************************************/ 7 | 8 | #include 9 | #include 10 | 11 | //struct to hold new data 12 | rc_imu_data_t data; 13 | void process_data(); 14 | double angle; 15 | int distance; 16 | int turn; 17 | 18 | /****************************************************************************** 19 | * int main() 20 | * 21 | * This main function contains these critical components 22 | * - call to initialize_cape 23 | * - set up the compass 24 | * - initiate the turn 25 | * - after it comes back - go a certain distance 26 | * - cleanup_roboticscape() at the end 27 | *****************************************************************************/ 28 | int main(int argc, char** argv){ 29 | // always initialize cape library first 30 | rc_initialize(); 31 | 32 | printf("\nHello BeagleBone\n"); 33 | 34 | angle = atof(argv[1]); 35 | if (angle > 0) 36 | turn = 1; 37 | else 38 | turn = 0; 39 | 40 | distance = atoi(argv[2]); 41 | 42 | // done initializing so set state to RUNNING 43 | rc_set_state(RUNNING); 44 | 45 | // bring H-bridges of of standby 46 | rc_enable_motors(); 47 | rc_set_led(GREEN,ON); 48 | rc_set_led(RED,ON); 49 | 50 | rc_set_motor_free_spin(1); 51 | rc_set_motor_free_spin(2); 52 | printf("Motors are now ready.\n"); 53 | // start with default config and modify based on options 54 | rc_imu_config_t conf = rc_default_imu_config(); 55 | conf.dmp_sample_rate = 20; 56 | conf.enable_magnetometer = 1; 57 | // now set up the imu for dmp interrupt operation 58 | if(rc_initialize_imu_dmp(&data, conf)){ 59 | printf("rc_initialize_imu_failed\n"); 60 | return -1; 61 | } 62 | rc_set_imu_interrupt_func(&process_data); 63 | // set the unit turning 64 | if (turn) 65 | { 66 | rc_set_motor(1, 0.2); 67 | rc_set_motor(2, -0.2); 68 | } 69 | else 70 | { 71 | rc_set_motor(1, -0.2); 72 | rc_set_motor(2, 0.2); 73 | } 74 | //now just wait, print_data() will be called by the interrupt 75 | while (rc_get_state()!=EXITING) { 76 | usleep(10000); 77 | } 78 | int movement = 0; 79 | // Now move forward 80 | while (movement < distance) 81 | { 82 | rc_set_motor(1, 0.2); 83 | rc_set_motor(2, 0.2); 84 | usleep(1000000); 85 | movement++; 86 | } 87 | 88 | rc_set_motor_brake_all(); 89 | 90 | // shut things down 91 | rc_power_off_imu(); 92 | rc_cleanup(); 93 | return 0; 94 | } 95 | /****************************************************************************** 96 | * int process_data() 97 | * 98 | * - Called each time the compass interrupts 99 | * - Compares angles to see if the platform has moved enough 100 | * - If it has, stop the platform 101 | *****************************************************************************/ 102 | void process_data() // imu interrupt function 103 | { 104 | printf("\r"); 105 | printf(" "); 106 | printf("Angle = %6.1f\n",angle); 107 | printf("Distance = %2d\n",distance); 108 | printf(" %6.1f |", data.compass_heading_raw*RAD_TO_DEG); 109 | printf(" %6.1f |", data.compass_heading*RAD_TO_DEG); 110 | 111 | if (turn) 112 | { 113 | if ((angle - data.compass_heading*RAD_TO_DEG) < 1.0) 114 | { 115 | rc_set_motor_brake_all(); 116 | rc_set_state(EXITING); 117 | } 118 | } 119 | else 120 | if ((-angle + data.compass_heading*RAD_TO_DEG) < 1.0) 121 | { 122 | rc_set_motor_brake_all(); 123 | rc_set_state(EXITING); 124 | } 125 | fflush(stdout); 126 | 127 | return; 128 | } 129 | 130 | -------------------------------------------------------------------------------- /Chapter04/NewPing.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadonk/BeagleBone-Robotic-Projects-Second-Edition/6e3a69965482d3b155028c3db13aa393b6701c30/Chapter04/NewPing.docx -------------------------------------------------------------------------------- /Chapter04/barrier_path.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadonk/BeagleBone-Robotic-Projects-Second-Edition/6e3a69965482d3b155028c3db13aa393b6701c30/Chapter04/barrier_path.docx -------------------------------------------------------------------------------- /Chapter04/simple_path.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadonk/BeagleBone-Robotic-Projects-Second-Edition/6e3a69965482d3b155028c3db13aa393b6701c30/Chapter04/simple_path.docx -------------------------------------------------------------------------------- /Chapter05/camera.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadonk/BeagleBone-Robotic-Projects-Second-Edition/6e3a69965482d3b155028c3db13aa393b6701c30/Chapter05/camera.docx -------------------------------------------------------------------------------- /Chapter05/color_tracking.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadonk/BeagleBone-Robotic-Projects-Second-Edition/6e3a69965482d3b155028c3db13aa393b6701c30/Chapter05/color_tracking.docx -------------------------------------------------------------------------------- /Chapter05/color_tracking_platform_movement.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadonk/BeagleBone-Robotic-Projects-Second-Edition/6e3a69965482d3b155028c3db13aa393b6701c30/Chapter05/color_tracking_platform_movement.docx -------------------------------------------------------------------------------- /Chapter05/color_tracking_with_boundary.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadonk/BeagleBone-Robotic-Projects-Second-Edition/6e3a69965482d3b155028c3db13aa393b6701c30/Chapter05/color_tracking_with_boundary.docx -------------------------------------------------------------------------------- /Chapter07/lean_right.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadonk/BeagleBone-Robotic-Projects-Second-Edition/6e3a69965482d3b155028c3db13aa393b6701c30/Chapter07/lean_right.docx -------------------------------------------------------------------------------- /Chapter07/rc_move_servos.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadonk/BeagleBone-Robotic-Projects-Second-Edition/6e3a69965482d3b155028c3db13aa393b6701c30/Chapter07/rc_move_servos.docx -------------------------------------------------------------------------------- /Chapter07/rc_test_servos.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadonk/BeagleBone-Robotic-Projects-Second-Edition/6e3a69965482d3b155028c3db13aa393b6701c30/Chapter07/rc_test_servos.docx -------------------------------------------------------------------------------- /Chapter07/two_steps.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadonk/BeagleBone-Robotic-Projects-Second-Edition/6e3a69965482d3b155028c3db13aa393b6701c30/Chapter07/two_steps.docx -------------------------------------------------------------------------------- /Chapter08/gpsd.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadonk/BeagleBone-Robotic-Projects-Second-Edition/6e3a69965482d3b155028c3db13aa393b6701c30/Chapter08/gpsd.docx -------------------------------------------------------------------------------- /Chapter08/location.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadonk/BeagleBone-Robotic-Projects-Second-Edition/6e3a69965482d3b155028c3db13aa393b6701c30/Chapter08/location.docx -------------------------------------------------------------------------------- /Chapter08/measgps.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadonk/BeagleBone-Robotic-Projects-Second-Edition/6e3a69965482d3b155028c3db13aa393b6701c30/Chapter08/measgps.docx -------------------------------------------------------------------------------- /Chapter10/client_program.py: -------------------------------------------------------------------------------- 1 | import pygame 2 | import math 3 | from PodSixNet.Connection import ConnectionListener, connection 4 | from time import sleep 5 | import serial 6 | import os 7 | 8 | class QuadGame(ConnectionListener): 9 | def Network_close(self, data): 10 | exit() 11 | def Network_gamepad(self, data): 12 | if data["type"] == 10: 13 | #print "Pressed button " 14 | #print data["info"]["button"] 15 | if data["info"]["button"] == 0: 16 | os.system('/root/rc_wheeled_auto/rc_wheeled_auto ' + str(0) + ' ' + str(1)) 17 | if data["info"]["button"] == 5: 18 | os.system('/root/rc_wheeled_auto/rc_wheeled_auto ' + str(10) + ' ' + str(0)) 19 | if data["info"]["button"] == 4: 20 | os.system('/root/rc_wheeled_auto/rc_wheeled_auto ' + str(-10) + ' ' + str(0)) 21 | def __init__(self): 22 | address=raw_input("Address of Server: ") 23 | try: 24 | if not address: 25 | host, port="localhost", 8000 26 | else: 27 | host,port=address.split(":") 28 | self.Connect((host, int(port))) 29 | except: 30 | print "Error Connecting to Server" 31 | print "Usage:", "host:port" 32 | print "e.g.", "localhost:31425" 33 | exit() 34 | print "Quad client started" 35 | self.running=False 36 | while not self.running: 37 | self.Pump() 38 | connection.Pump() 39 | sleep(0.01) 40 | 41 | 42 | bg=QuadGame() 43 | while 1: 44 | if bg.update()==1: 45 | break 46 | bg.finished() 47 | 48 | -------------------------------------------------------------------------------- /Chapter10/server_program.py: -------------------------------------------------------------------------------- 1 | import pygame 2 | import PodSixNet.Channel 3 | import PodSixNet.Server 4 | from pygame import * 5 | from time import sleep 6 | init() 7 | from time import sleep 8 | class ClientChannel(PodSixNet.Channel.Channel): 9 | def Network(self, data): 10 | print data 11 | def Close(self): 12 | self._server.close(self.gameid) 13 | class BoxesServer(PodSixNet.Server.Server): 14 | 15 | channelClass = ClientChannel 16 | def __init__(self, *args, **kwargs): 17 | PodSixNet.Server.Server.__init__(self, *args, **kwargs) 18 | self.games = [] 19 | self.queue = None 20 | self.currentIndex=0 21 | def Connected(self, channel, addr): 22 | print 'new connection:', channel 23 | if self.queue==None: 24 | self.currentIndex+=1 25 | channel.gameid=self.currentIndex 26 | self.queue=Game(channel, self.currentIndex) 27 | def close(self, gameid): 28 | try: 29 | game = [a for a in self.games if a.gameid==gameid][0] 30 | game.player0.Send({"action":"close"}) 31 | except: 32 | pass 33 | def tick(self): 34 | if self.queue != None: 35 | sleep(.05) 36 | for e in event.get(): 37 | self.queue.player0.Send({"action":"gamepad", "type":e.type, "info":e.dict}) 38 | self.Pump() 39 | class Game: 40 | def __init__(self, player0, currentIndex): 41 | #initialize the players including the one who started the game 42 | self.player0=player0 43 | 44 | #Setup and init joystick 45 | j=joystick.Joystick(0) 46 | j.init() 47 | 48 | #Check init status 49 | if j.get_init() == 1: print "Joystick is initialized" 50 | 51 | #Get and print joystick ID 52 | print "Joystick ID: ", j.get_id() 53 | 54 | #Get and print joystick name 55 | print "Joystick Name: ", j.get_name() 56 | 57 | #Get and print number of axes 58 | print "No. of axes: ", j.get_numaxes() 59 | 60 | #Get and print number of trackballs 61 | print "No. of trackballs: ", j.get_numballs() 62 | 63 | #Get and print number of buttons 64 | print "No. of buttons: ", j.get_numbuttons() 65 | 66 | #Get and print number of hat controls 67 | print "No. of hat controls: ", j.get_numhats() 68 | 69 | 70 | print "STARTING SERVER ON LOCALHOST" 71 | # try: 72 | address=raw_input("Host:Port (localhost:8000): ") 73 | if not address: 74 | host, port="localhost", 8000 75 | else: 76 | host,port=address.split(":") 77 | boxesServe = BoxesServer(localaddr=(host, int(port))) 78 | 79 | while True: 80 | boxesServe.tick() 81 | sleep(0.01) 82 | 83 | -------------------------------------------------------------------------------- /Chapter10/web_python_program.py: -------------------------------------------------------------------------------- 1 | from flask import Flask 2 | from flask import render_template, request 3 | import time 4 | import os 5 | 6 | app = Flask(__name__) 7 | 8 | @app.route("/") 9 | def index(): 10 | return render_template('robot.html') 11 | 12 | @app.route('/left_side') 13 | def left_side(): 14 | data1="LEFT" 15 | os.system("/usr/debian/rc_motor/rc_wheeled_auto " + str(90) + " " + str(0)) 16 | return 'true' 17 | @app.route('/right_side') 18 | def right_side(): 19 | data1="RIGHT" 20 | os.system("/usr/debian/rc_motor/rc_wheeled_auto " + str(-90) + " " + str(0)) 21 | return 'true' 22 | @app.route('/up_side') 23 | def up_side(): 24 | data1="FORWARD" 25 | os.system("/usr/debian/rc_motor/rc_wheeled_auto " + str(0) + " " + str(1)) 26 | return 'true' 27 | 28 | @app.route('/down_side') 29 | def down_side(): 30 | data1="BACK" 31 | os.system("/usr/debian/rc_motor/rc_wheeled_auto " + str(180) + " " + str(1)) 32 | return 'true' 33 | 34 | @app.route('/stop') 35 | def stop(): 36 | data1="STOP" 37 | os.system("/usr/debian/rc_motor/rc_wheeled_auto " + str(0) + " " + str(0)) 38 | return 'true' 39 | 40 | if __name__ == "__main__": 41 | print "Start" 42 | app.run(host='0.0.0.0',port=5010) 43 | 44 | -------------------------------------------------------------------------------- /Chapter10/web_server_program.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 |
11 |
12 |
13 |

Control Robot



14 | 🢁🢁
Forward


15 | 🢀🢀Left         16 | Right 🢂🢂

17 |
Backward
🢃🢃
18 |
19 | 20 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Packt 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. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BeagleBone Robotic Projects - Second Edition 2 | This is the code repository for [BeagleBone Robotic Projects - Second Edition](https://www.packtpub.com/hardware-and-creative/beaglebone-robotic-projects-second-edition?utm_source=github&utm_medium=repository&utm_campaign=9781788293136), published by [Packt](https://www.packtpub.com/?utm_source=github). It contains all the supporting project files necessary to work through the book from start to finish. 3 | ## About the Book 4 | Beaglebone Blue is effectively a small, light, cheap computer in a similar vein to Raspberry Pi and Arduino. It has all of the extensibility of today's desktop machines, but without the bulk, expense, or noise. And the new features of the BeagleBone Blue make it even easier to use in DIY robotics projects. 5 | 6 | 7 | ## Instructions and Navigation 8 | All of the code is organized into folders. Each folder starts with a number followed by the application name. For example, Chapter04. 9 | 10 | Chapters 1, 2, 6, 9 does not have code files 11 | 12 | The code will look like the following: 13 | ``` 14 | void loop() { 15 | delay(500); 16 | unsigned int uS1 = sonar1.ping(); 17 | unsigned int uS2 = sonar2.ping(); 18 | unsigned int uS3 = sonar3.ping(); 19 | Serial.print(uS1 / US_ROUNDTRIP_CM); 20 | Serial.print(“,”); 21 | Serial.print(uS2 / US_ROUNDTRIP_CM); 22 | Serial.print(“,”); 23 | Serial.println(uS3 / US_ROUNDTRIP_CM); 24 | } 25 | ``` 26 | 27 | 28 | * Xfce ```sudo apt-get install xfce4``` 29 | * [WinScp](https://winscp.net/eng/index.php) 30 | * [Putty](http://www.putty.org/) 31 | * VNC server ```sudo apt-get install tightvncserver ``` 32 | * [Real VNC](https://www.realvnc.com/) 33 | * Emacs ```sudo apt-get install emacs``` 34 | * build-essential ```sudo apt-get install build-essential``` 35 | 36 | ## Related Products 37 | * [BeagleBone Robotic Projects](https://www.packtpub.com/hardware-and-creative/beaglebone-robotic-projects?utm_source=github&utm_medium=repository&utm_campaign=9781783559329) 38 | 39 | * [Mastering BeagleBone Robotics](https://www.packtpub.com/hardware-and-creative/mastering-beaglebone-robotics?utm_source=github&utm_medium=repository&utm_campaign=9781783988907) 40 | 41 | * [Using Yocto Project with BeagleBone Black](https://www.packtpub.com/hardware-and-creative/yocto-beaglebone?utm_source=github&utm_medium=repository&utm_campaign=9781785289736) 42 | 43 | ### Suggestions and Feedback 44 | [Click here](https://docs.google.com/forms/d/e/1FAIpQLSe5qwunkGf6PUvzPirPDtuy1Du5Rlzew23UBp2S-P3wB-GcwQ/viewform) if you have any feedback or suggestions. 45 | --------------------------------------------------------------------------------