├── .gitignore ├── Dockerfile ├── README.md ├── app.js ├── bootstrap.min.css ├── config.json ├── docs ├── Makefile ├── _build │ ├── doctrees │ │ ├── analisis.doctree │ │ ├── arquitectura.doctree │ │ ├── conf.doctree │ │ ├── design.doctree │ │ ├── environment.pickle │ │ ├── index.doctree │ │ ├── instalar_arduino.doctree │ │ ├── instalar_nodejs.doctree │ │ ├── introduccion.doctree │ │ ├── justificacion.doctree │ │ ├── mercury.doctree │ │ ├── objetivos.doctree │ │ ├── proyectos.doctree │ │ ├── red.doctree │ │ ├── requerimientos.doctree │ │ ├── servidor_estatico.doctree │ │ ├── sistema_op.doctree │ │ └── ssh.doctree │ └── html │ │ ├── .buildinfo │ │ ├── _images │ │ ├── 1.1.png │ │ ├── 2.1.png │ │ ├── cisco.png │ │ ├── dia.png │ │ ├── logo.png │ │ ├── ucc.png │ │ ├── ucc_2.png │ │ └── voyager.jpg │ │ ├── _sources │ │ ├── analisis.txt │ │ ├── arquitectura.txt │ │ ├── design.txt │ │ ├── index.txt │ │ ├── introduccion.txt │ │ ├── justificacion.txt │ │ ├── mercury.txt │ │ ├── objetivos.txt │ │ └── requerimientos.txt │ │ ├── _static │ │ ├── 1.1.png │ │ ├── 2.1.png │ │ ├── 2016-03-30_1219.png │ │ ├── ajax-loader.gif │ │ ├── basic.css │ │ ├── cisco.png │ │ ├── comment-bright.png │ │ ├── comment-close.png │ │ ├── comment.png │ │ ├── css │ │ │ ├── badge_only.css │ │ │ └── theme.css │ │ ├── dia.png │ │ ├── doctools.js │ │ ├── down-pressed.png │ │ ├── down.png │ │ ├── file.png │ │ ├── fonts │ │ │ ├── Inconsolata-Bold.ttf │ │ │ ├── Inconsolata-Regular.ttf │ │ │ ├── Lato-Bold.ttf │ │ │ ├── Lato-Regular.ttf │ │ │ ├── RobotoSlab-Bold.ttf │ │ │ ├── RobotoSlab-Regular.ttf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ └── fontawesome-webfont.woff │ │ ├── jquery-1.11.1.js │ │ ├── jquery.js │ │ ├── js │ │ │ ├── modernizr.min.js │ │ │ └── theme.js │ │ ├── logo.png │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pos.png │ │ ├── pygments.css │ │ ├── searchtools.js │ │ ├── ucc.png │ │ ├── ucc_2.png │ │ ├── underscore-1.3.1.js │ │ ├── underscore.js │ │ ├── universidad-cooperativa-colombia.png │ │ ├── up-pressed.png │ │ ├── up.png │ │ ├── voyager.jpg │ │ └── websupport.js │ │ ├── analisis.html │ │ ├── arquitectura.html │ │ ├── design.html │ │ ├── genindex.html │ │ ├── index.html │ │ ├── introduccion.html │ │ ├── justificacion.html │ │ ├── mercury.html │ │ ├── objects.inv │ │ ├── objetivos.html │ │ ├── requerimientos.html │ │ ├── search.html │ │ └── searchindex.js ├── _static │ ├── 1.1.png │ ├── 2.1.png │ ├── 2016-03-30_1219.png │ ├── cisco.png │ ├── dia.png │ ├── logo.png │ ├── pos.png │ ├── ucc.png │ ├── ucc_2.png │ └── voyager.jpg ├── analisis.rst ├── arquitectura.rst ├── conf.py ├── design.rst ├── index.rst ├── introduccion.rst ├── justificacion.rst ├── mercury.rst ├── objetivos.rst └── requerimientos.rst ├── font-awesome.min.css ├── img ├── logo.png ├── tex.jpg ├── volume-empty.png ├── volume-full.png └── volume-knob.png ├── index.html ├── ino.ini ├── interstellar.js ├── jquery-ui.min.js ├── jquery.min.js ├── keypress.js ├── lib ├── .holder └── Firmata │ ├── Boards.h │ ├── Firmata.cpp │ ├── Firmata.h │ └── utility │ ├── EthernetClientStream.cpp │ ├── EthernetClientStream.h │ ├── FirmataStepper.cpp │ ├── FirmataStepper.h │ └── firmataDebug.h ├── package.json ├── servo.js ├── src └── sketch │ └── sketch.ino ├── status.css └── stream └── .gitkeep /.gitignore: -------------------------------------------------------------------------------- 1 | /.build 2 | /node_modules 3 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM resin/rpi-raspbian:wheezy 2 | MAINTAINER Julio César 3 | 4 | RUN apt-get update 5 | RUN apt-get upgrade -y 6 | 7 | RUN apt-get install -y build-essential 8 | RUN apt-get install -y python 9 | RUN apt-get install -y wget 10 | 11 | # Install Nodejs 0.10.xx for compatibility with serialport 12 | RUN wget http://node-arm.herokuapp.com/node_0.10.36-1_armhf.deb 13 | RUN dpkg -i node_0.10.36-1_armhf.deb 14 | 15 | # Install Arduino 16 | RUN apt-get install -y --force-yes arduino 17 | 18 | # Install node modules 19 | WORKDIR /usr/src/voyager-bot/ 20 | COPY . /usr/src/voyager-bot/ 21 | RUN npm install 22 | 23 | EXPOSE 3000 24 | 25 | CMD ["node", "/usr/src/voyager-bot/app.js"] 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Voyager-bot 2 | 3 | A cam-streaming carbot controlling from a web browser using Nodejs with Raspberry pi and Arduino. 4 | 5 | ## Hardware 6 | 7 | - Raspberry pi 8 | - Camera board 9 | - Usb Wifi dongle 10 | - Arduino 11 | - DC Motors 12 | - H bridge 13 | - Sensors 14 | 15 | ## Software dependencies 16 | 17 | - Firmata (Arduino) 18 | - Nodejs 19 | - Jhonny-five 20 | - Socket.io 21 | 22 | 23 | ## Getting started 24 | 25 | 26 | The first thing we need to do is flash an Arduino board with the Firmata protocol. For this "experiment" we use a modified sketch for the Firmata that's woks well with proximity sensors and servo. 27 | 28 | In `src/sketch.ino` is the file ready for upload to the board. To archive this yo can use the `ino` command line tool. 29 | 30 | #### Install the Arduino IDE 31 | 32 | Yo can installed with `yum` or `apt-get`. 33 | 34 | ```bash 35 | $ yum install arduino 36 | ``` 37 | 38 | #### Install picocom 39 | 40 | The `picocom` command line tool will helps us with serial communication. 41 | 42 | 43 | ```bash 44 | $ wget https://picocom.googlecode.com/files/picocom-1.7.tar.gz 45 | $ tar -xvzf picocom-1.7.tar.gz 46 | $ cd picocom-1.7 47 | $ sudo make 48 | $ sudo make install 49 | 50 | ``` 51 | 52 | Once you installed all the dependencies above, install `ino` using `pip` or `easy_install` 53 | 54 | 55 | ```bash 56 | $ pip install ino 57 | ``` 58 | 59 | #### Setting up your board 60 | 61 | Edit the file `ino.ini` with the specs of your board and the serial port. 62 | 63 | ```yaml 64 | [build] 65 | board-model = mega2560 66 | 67 | [upload] 68 | board-model = mega2560 69 | serial-port = /dev/ttyACM0 70 | 71 | [serial] 72 | serial-port = /dev/ttyACM0 73 | 74 | ``` 75 | 76 | #### Installing the Firmata protocol 77 | 78 | Build the file in `src/sketch.ino` 79 | 80 | ```bash 81 | $ ino build 82 | ``` 83 | 84 | Upload 85 | 86 | ```bash 87 | $ ino upload 88 | ``` 89 | 90 | #### Installing the node modules 91 | 92 | The Arduino board is ready now to use Nodejs with Jhonny-five. Make sure you have the latest build of `nodejs` and `npm` in the Raspberry pi. 93 | 94 | ```bash 95 | $ npm install 96 | ``` 97 | Connect the arduino to the rpi then run: 98 | 99 | ```bash 100 | $ node app.js 101 | ``` 102 | 103 | You should see this: 104 | 105 | ![](http://40.media.tumblr.com/e41ff9a259a2eafafe7774530c9debdd/tumblr_nr50tvIen01tp6kj3o1_r1_500.png) 106 | 107 | 108 | #### Controlling from a web browser 109 | 110 | Setup a static http server in `app.js` 111 | 112 | ```js 113 | app.listen(8000, function () { 114 | console.log('Http server listening on port %d', 8000); 115 | }); 116 | ``` 117 | 118 | That will serve the `index.html` which hold the Socket client. 119 | 120 | 121 | For handle browser events we use jQuery and keypress in order to detect when a key is pressed then and do a `socket emit`. 122 | 123 | ```js 124 | "keys": "up", 125 | "on_keydown": function() { 126 | console.log("Client: Going forward"); 127 | socket.emit('goForward'); 128 | ``` 129 | 130 | From the server side we listen to the emit using`socket on` 131 | 132 | ```js 133 | socket.on('goForward', function(){ 134 | console.log("Server: Going forward! "); 135 | // Do something 136 | }); 137 | ``` 138 | 139 | #### Running in a Docker container 140 | 141 | Containers are a really good idea for Iot projects because we can isolate our app on a kernel level and that means portability across machines, rapid application deployment, those are crucial processes for Iot projects. 142 | 143 | But Docker, which is a de facto standard, does not support ARM. So it is not yet support for Raspberry pi, fortunately some hackers make a Docker Image for Raspberry Pi, they called [Hypriot](http://blog.hypriot.com/downloads/). 144 | 145 | Install Hypriot in your Raspberry pi. See this [guide]() 146 | 147 | 148 | Now login into your pi. 149 | 150 | 151 | Get the repo 152 | 153 | ```bash 154 | $ git clone https://github.com/juliocesar-io/voyager-bot.git 155 | ``` 156 | 157 | ``` 158 | cd voyager-bot 159 | ``` 160 | 161 | Build the image 162 | 163 | ``` 164 | $ docker build -t . 165 | ``` 166 | 167 | Connect the Arduino(Flashed with Firmata) to the Raspberry pi. 168 | 169 | Run the container 170 | 171 | ``` 172 | $ docker run --device=/dev/ttyACM0 173 | ``` 174 | 175 | Notice that we flag the `--device=/dev/ttyACM0` it's important to define this, it won't work if you don't use the correct port, check it with `lsusb`. 176 | 177 | > See the result in your browser, `http://:3000` 178 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'), 2 | app = express(), 3 | http = require('http').Server(app), 4 | io = require('socket.io')(http), 5 | fs = require('fs'), 6 | five = require("johnny-five"), 7 | path = require('path'); 8 | 9 | var spawn = require('child_process').spawn; 10 | var proc; 11 | 12 | 13 | 14 | 15 | app.use('/', express.static(path.join(__dirname, 'stream'))); 16 | 17 | http.listen(3000, function() { 18 | console.log('Servidor escuchando en puerto 3000'); 19 | }); 20 | 21 | 22 | app.get('/', function(req, res) { 23 | res.sendFile(__dirname + '/index.html'); 24 | }); 25 | 26 | var sockets = {}; 27 | 28 | io.on('connection', function(socket) { 29 | 30 | sockets[socket.id] = socket; 31 | console.log("Clientes conectados ", Object.keys(sockets).length); 32 | 33 | 34 | }); 35 | 36 | board = new five.Board(); 37 | 38 | board.on("ready", function() { 39 | 40 | that = this; 41 | 42 | 43 | // Right motor 44 | rMotorN1 = 4; 45 | rMotorN2 = 3; 46 | rMotorNA = 2; 47 | // Left motor 48 | lMotorN3 = 7; 49 | lMotorN4 = 6; 50 | lMotorNB = 8; 51 | luz = 52; 52 | 53 | 54 | this.pinMode(rMotorN1, five.Pin.OUTPUT); 55 | this.pinMode(rMotorN2, five.Pin.OUTPUT); 56 | this.pinMode(rMotorNA, five.Pin.PWM); 57 | this.pinMode(lMotorN3, five.Pin.OUTPUT); 58 | this.pinMode(lMotorN4, five.Pin.OUTPUT); 59 | this.pinMode(luz, five.Pin.OUTPUT); 60 | this.pinMode(lMotorNB, five.Pin.PWM); 61 | 62 | this.digitalWrite(luz, 1); 63 | 64 | // 65 | 66 | var servoBrazo = new five.Servo({ 67 | pin: 9, 68 | startAt: 90 69 | }); 70 | 71 | var servoPinza = new five.Servo({ 72 | pin: 10, 73 | startAt: 180 74 | }); 75 | 76 | var servoCam = new five.Servo({ 77 | pin: 5, 78 | startAt: 90 79 | }); 80 | 81 | var servoDisparador = new five.Servo({ 82 | pin: 12, 83 | startAt: 70 84 | }); 85 | 86 | 87 | 88 | 89 | io.sockets.on('connection', function (socket) { 90 | 91 | var speed = 255; 92 | 93 | socket.on('vel', function (data) { 94 | 95 | console.log("Nueva velocidad: " + data); 96 | 97 | speed = data; 98 | 99 | }); 100 | 101 | socket.on('luzOn-Off', function (luzEstado) { 102 | if (luzEstado == true) { 103 | 104 | luzEstado = 0 105 | 106 | 107 | } else if (luzEstado == false) { 108 | 109 | luzEstado = 1; 110 | 111 | } 112 | that.digitalWrite(luz, luzEstado); 113 | 114 | }); 115 | 116 | socket.on('DisparadorOn-Off', function (disparadorEstado) { 117 | 118 | if (disparadorEstado == true) { 119 | 120 | disparadorEstado = 170 121 | 122 | 123 | } else if (disparadorEstado == false) { 124 | 125 | disparadorEstado = 70; 126 | 127 | } 128 | servoDisparador.to(disparadorEstado); 129 | 130 | }); 131 | 132 | socket.on('pinzaA', function () { 133 | servoPinza.to(180) 134 | }); 135 | 136 | socket.on('pinzaD', function () { 137 | servoPinza.to(90) 138 | }); 139 | 140 | socket.on('brazoW', function () { 141 | servoBrazo.to(0) 142 | }); 143 | 144 | socket.on('brazoS', function () { 145 | servoBrazo.to(90) 146 | }); 147 | socket.on('brazoX', function () { 148 | servoBrazo.to(180) 149 | }); 150 | 151 | socket.on('servoCam', function (gradosCam) { 152 | servoCam.to(gradosCam) 153 | }); 154 | 155 | 156 | 157 | 158 | 159 | socket.on('stop', function () { 160 | console.log("Server: Stop! "); 161 | // Turn off right motor 162 | that.digitalWrite(rMotorN1, 0); 163 | that.digitalWrite(rMotorN2, 0); 164 | that.analogWrite(rMotorNA, 0); 165 | // Turn off left motor 166 | that.digitalWrite(lMotorN3, 0); 167 | that.digitalWrite(lMotorN4, 0); 168 | that.analogWrite(lMotorNB, 0); 169 | 170 | }); 171 | 172 | socket.on('goForward', function(){ 173 | 174 | console.log("Server: Going forward! "); 175 | // Turn on right motor 176 | that.digitalWrite(rMotorN1, 1); 177 | that.digitalWrite(rMotorN2, 0); 178 | that.analogWrite(rMotorNA, speed); 179 | // Turn on left motor 180 | that.digitalWrite(lMotorN3, 0); 181 | that.digitalWrite(lMotorN4, 1); 182 | that.analogWrite(lMotorNB, speed); 183 | }); 184 | 185 | socket.on('goBackward', function(){ 186 | console.log("Server: Going backward! "); 187 | // Turn on right motor 188 | that.digitalWrite(rMotorN1, 0); 189 | that.digitalWrite(rMotorN2, 1); 190 | that.analogWrite(rMotorNA, speed); 191 | // Turn on left motor 192 | that.digitalWrite(lMotorN3, 1); 193 | that.digitalWrite(lMotorN4, 0); 194 | that.analogWrite(lMotorNB, speed); 195 | }); 196 | 197 | socket.on('turnLeft', function(){ 198 | console.log("Server: Turning left! "); 199 | // Turn on right motor 200 | that.digitalWrite(rMotorN1, 0); 201 | that.digitalWrite(rMotorN2, 1); 202 | that.analogWrite(rMotorNA, speed); 203 | // Turn on left motor 204 | that.digitalWrite(lMotorN3, 0); 205 | that.digitalWrite(lMotorN4, 1); 206 | that.analogWrite(lMotorNB, speed); 207 | }); 208 | 209 | socket.on('turnRight', function(){ 210 | console.log("Server: Turning right! "); 211 | // Turn on right motor 212 | that.digitalWrite(rMotorN1, 1); 213 | that.digitalWrite(rMotorN2, 0); 214 | that.analogWrite(rMotorNA, speed); 215 | // Turn on left motor 216 | that.digitalWrite(lMotorN3, 1); 217 | that.digitalWrite(lMotorN4, 0); 218 | that.analogWrite(lMotorNB, speed); 219 | }); 220 | 221 | 222 | }); 223 | }); 224 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "ip-static": "192.168.0.5", 3 | "tcp-port": "3000", 4 | "usb-port": "/dev/cu.usbmodem1421", 5 | "board-description": "Arduino MEGA 2560", 6 | "sensors": { 7 | "prox": null, 8 | "temp": null, 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = _build 9 | 10 | # User-friendly check for sphinx-build 11 | ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) 12 | $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) 13 | endif 14 | 15 | # Internal variables. 16 | PAPEROPT_a4 = -D latex_paper_size=a4 17 | PAPEROPT_letter = -D latex_paper_size=letter 18 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 19 | # the i18n builder cannot share the environment and doctrees with the others 20 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 21 | 22 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext 23 | 24 | help: 25 | @echo "Please use \`make ' where is one of" 26 | @echo " html to make standalone HTML files" 27 | @echo " dirhtml to make HTML files named index.html in directories" 28 | @echo " singlehtml to make a single large HTML file" 29 | @echo " pickle to make pickle files" 30 | @echo " json to make JSON files" 31 | @echo " htmlhelp to make HTML files and a HTML help project" 32 | @echo " qthelp to make HTML files and a qthelp project" 33 | @echo " devhelp to make HTML files and a Devhelp project" 34 | @echo " epub to make an epub" 35 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 36 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 37 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" 38 | @echo " text to make text files" 39 | @echo " man to make manual pages" 40 | @echo " texinfo to make Texinfo files" 41 | @echo " info to make Texinfo files and run them through makeinfo" 42 | @echo " gettext to make PO message catalogs" 43 | @echo " changes to make an overview of all changed/added/deprecated items" 44 | @echo " xml to make Docutils-native XML files" 45 | @echo " pseudoxml to make pseudoxml-XML files for display purposes" 46 | @echo " linkcheck to check all external links for integrity" 47 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 48 | 49 | clean: 50 | rm -rf $(BUILDDIR)/* 51 | 52 | html: 53 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 54 | @echo 55 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 56 | 57 | dirhtml: 58 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 59 | @echo 60 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 61 | 62 | singlehtml: 63 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 64 | @echo 65 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 66 | 67 | pickle: 68 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 69 | @echo 70 | @echo "Build finished; now you can process the pickle files." 71 | 72 | json: 73 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 74 | @echo 75 | @echo "Build finished; now you can process the JSON files." 76 | 77 | htmlhelp: 78 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 79 | @echo 80 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 81 | ".hhp project file in $(BUILDDIR)/htmlhelp." 82 | 83 | qthelp: 84 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 85 | @echo 86 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 87 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 88 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/rpi-module.qhcp" 89 | @echo "To view the help file:" 90 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/rpi-module.qhc" 91 | 92 | devhelp: 93 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 94 | @echo 95 | @echo "Build finished." 96 | @echo "To view the help file:" 97 | @echo "# mkdir -p $$HOME/.local/share/devhelp/rpi-module" 98 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/rpi-module" 99 | @echo "# devhelp" 100 | 101 | epub: 102 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 103 | @echo 104 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 105 | 106 | latex: 107 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 108 | @echo 109 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 110 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 111 | "(use \`make latexpdf' here to do that automatically)." 112 | 113 | latexpdf: 114 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 115 | @echo "Running LaTeX files through pdflatex..." 116 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 117 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 118 | 119 | latexpdfja: 120 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 121 | @echo "Running LaTeX files through platex and dvipdfmx..." 122 | $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja 123 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 124 | 125 | text: 126 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 127 | @echo 128 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 129 | 130 | man: 131 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 132 | @echo 133 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 134 | 135 | texinfo: 136 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 137 | @echo 138 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 139 | @echo "Run \`make' in that directory to run these through makeinfo" \ 140 | "(use \`make info' here to do that automatically)." 141 | 142 | info: 143 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 144 | @echo "Running Texinfo files through makeinfo..." 145 | make -C $(BUILDDIR)/texinfo info 146 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 147 | 148 | gettext: 149 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 150 | @echo 151 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 152 | 153 | changes: 154 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 155 | @echo 156 | @echo "The overview file is in $(BUILDDIR)/changes." 157 | 158 | linkcheck: 159 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 160 | @echo 161 | @echo "Link check complete; look for any errors in the above output " \ 162 | "or in $(BUILDDIR)/linkcheck/output.txt." 163 | 164 | doctest: 165 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 166 | @echo "Testing of doctests in the sources finished, look at the " \ 167 | "results in $(BUILDDIR)/doctest/output.txt." 168 | 169 | xml: 170 | $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml 171 | @echo 172 | @echo "Build finished. The XML files are in $(BUILDDIR)/xml." 173 | 174 | pseudoxml: 175 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml 176 | @echo 177 | @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." 178 | -------------------------------------------------------------------------------- /docs/_build/doctrees/analisis.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/doctrees/analisis.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/arquitectura.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/doctrees/arquitectura.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/conf.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/doctrees/conf.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/design.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/doctrees/design.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/doctrees/environment.pickle -------------------------------------------------------------------------------- /docs/_build/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/doctrees/index.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/instalar_arduino.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/doctrees/instalar_arduino.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/instalar_nodejs.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/doctrees/instalar_nodejs.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/introduccion.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/doctrees/introduccion.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/justificacion.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/doctrees/justificacion.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/mercury.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/doctrees/mercury.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/objetivos.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/doctrees/objetivos.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/proyectos.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/doctrees/proyectos.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/red.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/doctrees/red.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/requerimientos.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/doctrees/requerimientos.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/servidor_estatico.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/doctrees/servidor_estatico.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/sistema_op.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/doctrees/sistema_op.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/ssh.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/doctrees/ssh.doctree -------------------------------------------------------------------------------- /docs/_build/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 805752ee1639d75fa70047eb2cfb3682 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/_build/html/_images/1.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_images/1.1.png -------------------------------------------------------------------------------- /docs/_build/html/_images/2.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_images/2.1.png -------------------------------------------------------------------------------- /docs/_build/html/_images/cisco.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_images/cisco.png -------------------------------------------------------------------------------- /docs/_build/html/_images/dia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_images/dia.png -------------------------------------------------------------------------------- /docs/_build/html/_images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_images/logo.png -------------------------------------------------------------------------------- /docs/_build/html/_images/ucc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_images/ucc.png -------------------------------------------------------------------------------- /docs/_build/html/_images/ucc_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_images/ucc_2.png -------------------------------------------------------------------------------- /docs/_build/html/_images/voyager.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_images/voyager.jpg -------------------------------------------------------------------------------- /docs/_build/html/_sources/analisis.txt: -------------------------------------------------------------------------------- 1 | Analisis 2 | ============= 3 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/arquitectura.txt: -------------------------------------------------------------------------------- 1 | Arquitectura 2 | ============= 3 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/design.txt: -------------------------------------------------------------------------------- 1 | Diseño 2 | ============ 3 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/index.txt: -------------------------------------------------------------------------------- 1 | .. rpi-module documentation master file, created by 2 | sphinx-quickstart on Thu Dec 10 14:51:36 2015. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Proyecto Voyager 7 | ================ 8 | 9 | En sitio estara la documentacion, software y recursos audiovisuales asociados al Proyecto Voyager realizado en el curso de ingenieria del Software I y II. 10 | 11 | 12 | .. raw:: html 13 | 14 | 15 |
16 | 17 | *Voyager is an Arduino bot controlling from a web browser using Nodejs on Docker for Raspberry pi* 18 | 19 | ----------- 20 | 21 | 22 | Presentacion 23 | ------------ 24 | 25 | .. raw:: html 26 | 27 | 28 | 29 | Contenidos 30 | ---------- 31 | 32 | Los contenidos estan organizados desde un pequeña introduccion y justificacion del porque de este proyecto, seguido de una analisis de requerimientos formal para asi obtener la mejor arquitectura y diseño posible de tanto el software como el hardware que cumpla con el objetivo de este proyecto. 33 | 34 | 35 | .. toctree:: 36 | :maxdepth: 2 37 | 38 | introduccion 39 | objetivos 40 | justificacion 41 | requerimientos 42 | analisis 43 | arquitectura 44 | design 45 | mercury 46 | 47 | 48 | ----------- 49 | 50 | 51 | .. note:: 52 | 53 | La foto acontinuacion corresponde el primer prototipo con una placa de Ardunio MEGA 2560, una Raspberry Pi B+ con su camara, un sensor LM35 y puente H LN28N. La Rpi se conecta a la Wifi y se comunica con el Arduino via serial. 54 | 55 | |voyager| 56 | 57 | ---------- 58 | 59 | 60 | Configuracion inicial 61 | --------------------- 62 | 63 | Para empezar a desarrollar con este proyecto es neserio realizar una configuracion incial, y la conexion de los dispositivos de hardware. 64 | 65 | Acontinuacion la lista de dispositivos a utilizar y las dependencias de software 66 | 67 | Hardware 68 | -------- 69 | 70 | - Raspberry pi 71 | 72 | - Camera board 73 | - Usb Wifi dongle 74 | 75 | - Arduino 76 | 77 | - DC Motors 78 | - H bridge 79 | - Sensors 80 | 81 | Arquitectura 82 | ------------ 83 | 84 | Asi sera la conexion basica entre el Ardunio y la Raspberry pi, y la interaccion de las partes de software 85 | 86 | 87 | En la *Fig.1* podemos observar que la forma de comunicacion entre la reaspberry y el ardunio es via serial, utlizando una libreria de Nodejs llamada *serial port*. 88 | 89 | |arq1| 90 | 91 | En la *Fig.2* se utliiza un servidor HTTP basico de Express con Socket.io para escuchar eventos en el navegar en tiempo real utilizando Javascript. 92 | 93 | 94 | |arq2| 95 | 96 | 97 | 98 | 99 | 100 | Software 101 | -------- 102 | 103 | - Firmata (Arduino) 104 | - Nodejs 105 | 106 | - Jhonny-five 107 | - Socket.io 108 | 109 | Primeros pasos 110 | --------------- 111 | 112 | Lo primero que debemos hacer es hacerle un "flash" a la targeta de 113 | Ardunio con el protocolo *Firmata*. 114 | 115 | Para este experimeinto usamos una version modificada de Firmaata que funciona con sensores de proxomidad servor motor. 116 | 117 | 118 | 119 | En ``src/sketch.ino`` esta listo el archivo para subir a la placa. Para hacer esto utlizamos la herramienta de linea de comandos ``ino`` 120 | 121 | Instalar el Ardunio IDE 122 | ^^^^^^^^^^^^^^^^^^^^^^^ 123 | 124 | Lo podemos instalar con ``yum`` o ``apt-get``. 125 | 126 | .. code:: bash 127 | 128 | $ yum install arduino 129 | 130 | Instalar picocom 131 | ^^^^^^^^^^^^^^^ 132 | 133 | La herramienta de linea de comandos ``picocom`` nos ayudara con la comunicacion serial desde la Raspberry pi. 134 | 135 | 136 | 137 | .. code:: bash 138 | 139 | $ wget https://picocom.googlecode.com/files/picocom-1.7.tar.gz 140 | $ tar -xvzf picocom-1.7.tar.gz 141 | $ cd picocom-1.7 142 | $ sudo make 143 | $ sudo make install 144 | 145 | Una vez instaladas las depencias podemos ahora instalar ``ino`` usando 146 | ``pip`` o ``easy_install`` 147 | 148 | .. code:: bash 149 | 150 | $ pip install ino 151 | 152 | Configurando ino 153 | ^^^^^^^^^^^^^^^^^ 154 | 155 | Editamos el archivo ``ino.ini`` con las especificaciones de la placa de Ardunio y los puertos que usa. 156 | 157 | .. code:: yaml 158 | 159 | [build] 160 | board-model = mega2560 161 | 162 | [upload] 163 | board-model = mega2560 164 | serial-port = /dev/ttyACM0 165 | 166 | [serial] 167 | serial-port = /dev/ttyACM0 168 | 169 | Instalando el Protocolo Firmata 170 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 171 | 172 | Compilamos el archivo en ``src/sketch.ino`` utlizando ino. 173 | 174 | .. code:: bash 175 | 176 | $ ino build 177 | 178 | y lo subimos a la placa. 179 | 180 | .. code:: bash 181 | 182 | $ ino upload 183 | 184 | Instalando las dependencias NPM 185 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 186 | 187 | Ahora que la placa de Arduino esta lista, podemos utulizar Nodejs con Jhonny-five. 188 | 189 | Debemos asegurarnos que este instalado Nodejs y npm en la Raspberry pi. 190 | 191 | 192 | .. code:: bash 193 | 194 | $ npm install 195 | 196 | Luego que termine la instalacion, conectamos el Ardunio a la Raspberry pi, corremos la app: 197 | 198 | .. code:: bash 199 | 200 | $ node app.js 201 | 202 | Observaremos lo siguiente: 203 | 204 | .. figure:: http://40.media.tumblr.com/e41ff9a259a2eafafe7774530c9debdd/tumblr_nr50tvIen01tp6kj3o1_r1_500.png 205 | :alt: 206 | 207 | Servidor y cliente 208 | ^^^^^^^^^^^^^^^^^^ 209 | 210 | Configuramos un servidor HTTP en ``app.js`` 211 | 212 | .. code:: js 213 | 214 | app.listen(8000, function () { 215 | console.log('Http server listening on port %d', 8000); 216 | }); 217 | 218 | Con eso podremos acceder desde el navegador al cliente Socket. 219 | 220 | 221 | Para manejar eventos utilizamos jQuery y keypress con la finalidad de detectar cuando una tecla es presionada y hacer un ``socket emit``, asi: 222 | 223 | .. code:: js 224 | 225 | "keys": "up", 226 | "on_keydown": function() { 227 | console.log("Client: Going forward"); 228 | socket.emit('goForward'); 229 | 230 | Del lado del servidor escuchamos este emit utilizando ``socket on`` 231 | 232 | .. code:: js 233 | 234 | socket.on('goForward', function(){ 235 | console.log("Server: Going forward! "); 236 | // Do something 237 | }); 238 | 239 | 240 | Running in a Docker container 241 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 242 | 243 | Los contenedores son una muy buena idea para los proyectos de la Iot porque podemos 244 | aislar a nuestra aplicación en un nivel de kernel y eso significa portabilidad en cualquier plataforma que soporte Docker, esto garantiza un despliegue rápido de aplicaciones, algo que es crucial para 245 | proyectos de Iot. 246 | 247 | Pero Docker, que es un estándar de facto, no es compatible con ARM. 248 | Asi que aun no es complatible con Raspberry Pi, afortunadamente, algunos hackers han modificado una Distro 249 | De Raspberry Pi, que llamaron `Hypriot`_. 250 | 251 | Para esto instalamos Hypriot de esta `guia`_ 252 | 253 | Nos logeamos a la Rasberry pi. 254 | 255 | Clonamos el repo 256 | 257 | .. code:: bash 258 | 259 | $ git clone https://github.com/juliocesar-io/voyager-bot.git 260 | 261 | :: 262 | 263 | cd voyager-bot 264 | 265 | Compilamos la imagen 266 | 267 | :: 268 | 269 | $ docker build -t . 270 | 271 | Conectamos el Ardunio(Con Firmata ) a la Raspberry pi. 272 | 273 | 274 | 275 | Ejecutamos el contenedor. 276 | 277 | :: 278 | 279 | $ docker run --device=/dev/ttyACM0 280 | 281 | Es importante definir buen el puerto con el flag ``--device=/dev/ttyACM0``, si no sabemos el puerto podemos consultarlo con 282 | ``lsusb``. 283 | 284 | Vamos al navegador y probamos que todo funcione en ``http://:3000`` 285 | 286 | 287 | .. _Hypriot: http://blog.hypriot.com/downloads/ 288 | .. _guia: 289 | 290 | .. |green| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat 291 | 292 | .. |voyager| image:: _static/voyager.jpg 293 | 294 | .. |arq1| image:: _static/1.1.png 295 | 296 | .. |arq2| image:: _static/2.1.png 297 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/introduccion.txt: -------------------------------------------------------------------------------- 1 | Introduccion 2 | ============ 3 | 4 | Technology is just one of many disruptive inluences in education today. We live in an era where the wealth of data and the exponential growth in the development of new 5 | knowledge is challenging institutions to rethink teaching 6 | and learning in a global market. - Cisco (2013) 7 | 8 | 9 | .. image:: _static/cisco.png 10 | 11 | 12 | As more people adopt new technologies for learning, they will thrive in the emerging world of the Internet of Everything (IoE)—the networked connection of people, process, data, and things—which is becoming the basis for the Internet of Learning Things 13 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/justificacion.txt: -------------------------------------------------------------------------------- 1 | Justificacion 2 | ============= 3 | 4 | 5 | ¿ Cómo construir un prototipo de un robot que pueda ser controlado desde Internet utilizando hardware de bajo coste que apoye la creciente necesidad de aprendizaje en el campo del Internet de las cosas* en las universidades? 6 | 7 | La tecnología avanza mucha mas rápido que lo que un programa de universidad puede, en el caso del software es mucho más evidente este avance, pero en lo últimos 2 años el Hardware ha sido protagonista con el surgimiento del movimiento Open Hardware y su enfoque académico con las plataformas como Arduino, Raspberry Pi, Intel Edison. Etc. Además en el mundo de la industria logística y los gatgets la internet de las cosas es tendencia y se estima que para 2017 el mercado sea ade aprox 17 Billones de dolares. 8 | 9 | Por esta razón se hace necesario empezar proyectos de desarrollo de software enfocados al control del hardware, los sistemas tradicionales transaccionales han estado por años, ahora es el turno donde los sistemas pueden producir datos y responder en tiempo real a las demandas actuales de soluciones eficientes para ciudades, personas, hogares, empresas. 10 | 11 | Lo anterior se justifica bajo las siguientes premisas; 12 | 13 | - Micro-controladores y sensores pequeños y baratos 14 | - Nuevas herramientas de software 15 | - La comunidad open source/hardware ha estado bastante activa los últimos años. 16 | - La Internet de las cosas es tendencia 17 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/mercury.txt: -------------------------------------------------------------------------------- 1 | Mercury robot challenge 2016 2 | ============================ 3 | 4 | **Voyager** Technical Document 5 | 6 | |logo| 7 | 8 | ------ 9 | 10 | **Team** 11 | 12 | * Julio Cesar Castellanos - julio.castellanosa@campusucc.edu.co 13 | * Ivan Dario - ivan.ortizp@campusucc.edu.co 14 | * Rafael Vergara - Rafael.vergarah@campusucc.edu.co 15 | * Luis Villadiego - luis.villadiego@campusucc.edu.co 16 | 17 | 18 | Summary 19 | ------- 20 | 21 | This technical document describes the creation and specs of a remotely controlled robot. The Robot "Voyager" 22 | was designed and built to meet the requirements of the Oklahoma State University Mercury 23 | Robotics competition for 2016 in Bogota, Colombia. 24 | 25 | 26 | High­level block diagram 27 | ----------------------- 28 | 29 | |dia| 30 | 31 | 32 | Communication 33 | ------------- 34 | 35 | The microcontroller will be conecte via serial to the raspberry pi, on the raspberry we use a Nodejs library in order to expose a real time socket web based server. 36 | For handle browser events we use jQuery and keypress in order to detect when a key is pressed then and do a socket emit. 37 | 38 | 39 | Main board 40 | ---------- 41 | 42 | The robot uses the Raspberri pi B+ as the principal board, this board allow the commnincation to a higer level user application using a Sockect TCP server. It is attached direclty to the microcontroller via serial USB port. 43 | 44 | 45 | Video feedback 46 | -------------- 47 | 48 | The robot has a camera module attached to the raspberry pi, we expose this camera thougth a UDP video stream server. 49 | 50 | 51 | Cotroller interface 52 | ------------------- 53 | 54 | We have a web based interface using HTML,CSS and Javascript to handle browser events. 55 | 56 | Drive train 57 | ----------- 58 | 59 | The robot has one motor per side, each running a tread through a gearbox with an encoder. 60 | 61 | Subsystems 62 | ---------- 63 | The robot has two Ultrasonic sensors...... 64 | 65 | Power 66 | ----- 67 | The robot has a 7.2[V] standard 3000[mAh] NiMH battery. 68 | 69 | 70 | 71 | .. |logo| image:: _static/logo.png 72 | 73 | .. |dia| image:: _static/dia.png 74 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/objetivos.txt: -------------------------------------------------------------------------------- 1 | Objetivos 2 | ============= 3 | 4 | 5 | General 6 | ------- 7 | 8 | - Desarrollar un apliacion (WEB) que permita manipular un microcontrolador arduido y raspberry por medio de una interfaz de facil manejo y compatible con varios modelos de estos. 9 | 10 | 11 | Especificos 12 | ----------- 13 | 14 | - Prototipar hardware utilizando Arduino que permita comunicación serial en tiempo real utilizando el protocolo firmata y lectura de sensores. 15 | 16 | - Codificar una aplicación que reciba peticiones HTTPvia web socket y las transforme a señales digitales utilizando Nodejs con la libreria Jhonny five. 17 | 18 | - Desplegar la aplicación en un container de Linux(LXC) compatible con ARM utilizando Docker bajo una Raspberry pi B+ 2 que permita comunicación serial con un Arduino e integre periféricos. 19 | 20 | - Diseñar una interfaz web que capte los eventos del navegador para controlar el robot y presente información en streaming de sensores y/o periféricos. 21 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/requerimientos.txt: -------------------------------------------------------------------------------- 1 | Requerimientos 2 | ============== 3 | 4 | 5 | 1. Configuracion 6 | ---------------- 7 | 8 | 9 | **1.1.** Los parámetros se deberán ajustar. El sistema deberá permitir configurar los parámetros de el respectivo microcontrolador. 10 | 11 | **1.2.** Debe restringirse el acceso al control remote de robot con un usuario y una contraseña via web 12 | 13 | **1.3.** Debe existir un sito de configuración para definir lo puertos web, usb, direccion ip, configuracion de interfaz de red. 14 | 15 | **1.4.** Listar direcciones MAC de los dipositivos utlizados 16 | 17 | 18 | 2. Funciones y control 19 | ---------------------- 20 | 21 | 22 | **2.1.** Los movimientos deben poder controlarse desde cualquier parte. Estos deberán poder controlarse desde cualquier lugar, por medio de eventos del navegador via internet. 23 | 24 | **2.2.** Estado de la batería del dispotivio 25 | 26 | **2.3.** Streaming de video en una interfaz web. 27 | 28 | **2.4.** Control del dispositivo desde el navegar utilizando eventos del teclado, movimiento (izquierda, derecha, adelante, atrás), movimiento de la camara 360. 29 | 30 | **2.5.** Motricidad en cualquier direccion. Generara movimientos en cualquier direccion usando las teclas de direccion de los equipos. 31 | 32 | **2.6.** Si existe mas de un usuario controlador, mostrar el número de conexiones. 33 | 34 | **2.7.** Almacenar en una base de datos el recorrido del robot. 35 | 36 | 37 | 3. Altertas y notificaciones, referecias 38 | ---------------------------------------- 39 | 40 | 41 | **3.1.** Debe producirse una alerta cuando se pierda la conexión o la batería esté baja. 42 | 43 | **3.2.** Debe permitir configurar alertas basado en lecturas de sensores (proximidad, temperatura, humedad etc.) 44 | 45 | **3.3.** Los elementos del arduino deberán ser referenciados. El sistema deberá visualizar la respectiva referencia de cada componente Arduino. 46 | 47 | **3.4.** Los componentes del Rapsberry Pi serán referenciados. El sistema deberá visualizar la correspondiente referencia de cada componente rapsberry. 48 | -------------------------------------------------------------------------------- /docs/_build/html/_static/1.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/1.1.png -------------------------------------------------------------------------------- /docs/_build/html/_static/2.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/2.1.png -------------------------------------------------------------------------------- /docs/_build/html/_static/2016-03-30_1219.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/2016-03-30_1219.png -------------------------------------------------------------------------------- /docs/_build/html/_static/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/ajax-loader.gif -------------------------------------------------------------------------------- /docs/_build/html/_static/cisco.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/cisco.png -------------------------------------------------------------------------------- /docs/_build/html/_static/comment-bright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/comment-bright.png -------------------------------------------------------------------------------- /docs/_build/html/_static/comment-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/comment-close.png -------------------------------------------------------------------------------- /docs/_build/html/_static/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/comment.png -------------------------------------------------------------------------------- /docs/_build/html/_static/css/badge_only.css: -------------------------------------------------------------------------------- 1 | .fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../font/fontawesome_webfont.eot");src:url("../font/fontawesome_webfont.eot?#iefix") format("embedded-opentype"),url("../font/fontawesome_webfont.woff") format("woff"),url("../font/fontawesome_webfont.ttf") format("truetype"),url("../font/fontawesome_webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:0.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:""}.icon-book:before{content:""}.fa-caret-down:before{content:""}.icon-caret-down:before{content:""}.fa-caret-up:before{content:""}.icon-caret-up:before{content:""}.fa-caret-left:before{content:""}.icon-caret-left:before{content:""}.fa-caret-right:before{content:""}.icon-caret-right:before{content:""}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;border-top:solid 10px #343131;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980B9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}img{width:100%;height:auto}} 2 | /*# sourceMappingURL=badge_only.css.map */ 3 | -------------------------------------------------------------------------------- /docs/_build/html/_static/dia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/dia.png -------------------------------------------------------------------------------- /docs/_build/html/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Sphinx JavaScript utilities for all documentation. 6 | * 7 | * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /** 13 | * select a different prefix for underscore 14 | */ 15 | $u = _.noConflict(); 16 | 17 | /** 18 | * make the code below compatible with browsers without 19 | * an installed firebug like debugger 20 | if (!window.console || !console.firebug) { 21 | var names = ["log", "debug", "info", "warn", "error", "assert", "dir", 22 | "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", 23 | "profile", "profileEnd"]; 24 | window.console = {}; 25 | for (var i = 0; i < names.length; ++i) 26 | window.console[names[i]] = function() {}; 27 | } 28 | */ 29 | 30 | /** 31 | * small helper function to urldecode strings 32 | */ 33 | jQuery.urldecode = function(x) { 34 | return decodeURIComponent(x).replace(/\+/g, ' '); 35 | }; 36 | 37 | /** 38 | * small helper function to urlencode strings 39 | */ 40 | jQuery.urlencode = encodeURIComponent; 41 | 42 | /** 43 | * This function returns the parsed url parameters of the 44 | * current request. Multiple values per key are supported, 45 | * it will always return arrays of strings for the value parts. 46 | */ 47 | jQuery.getQueryParameters = function(s) { 48 | if (typeof s == 'undefined') 49 | s = document.location.search; 50 | var parts = s.substr(s.indexOf('?') + 1).split('&'); 51 | var result = {}; 52 | for (var i = 0; i < parts.length; i++) { 53 | var tmp = parts[i].split('=', 2); 54 | var key = jQuery.urldecode(tmp[0]); 55 | var value = jQuery.urldecode(tmp[1]); 56 | if (key in result) 57 | result[key].push(value); 58 | else 59 | result[key] = [value]; 60 | } 61 | return result; 62 | }; 63 | 64 | /** 65 | * highlight a given string on a jquery object by wrapping it in 66 | * span elements with the given class name. 67 | */ 68 | jQuery.fn.highlightText = function(text, className) { 69 | function highlight(node) { 70 | if (node.nodeType == 3) { 71 | var val = node.nodeValue; 72 | var pos = val.toLowerCase().indexOf(text); 73 | if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { 74 | var span = document.createElement("span"); 75 | span.className = className; 76 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 77 | node.parentNode.insertBefore(span, node.parentNode.insertBefore( 78 | document.createTextNode(val.substr(pos + text.length)), 79 | node.nextSibling)); 80 | node.nodeValue = val.substr(0, pos); 81 | } 82 | } 83 | else if (!jQuery(node).is("button, select, textarea")) { 84 | jQuery.each(node.childNodes, function() { 85 | highlight(this); 86 | }); 87 | } 88 | } 89 | return this.each(function() { 90 | highlight(this); 91 | }); 92 | }; 93 | 94 | /* 95 | * backward compatibility for jQuery.browser 96 | * This will be supported until firefox bug is fixed. 97 | */ 98 | if (!jQuery.browser) { 99 | jQuery.uaMatch = function(ua) { 100 | ua = ua.toLowerCase(); 101 | 102 | var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || 103 | /(webkit)[ \/]([\w.]+)/.exec(ua) || 104 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || 105 | /(msie) ([\w.]+)/.exec(ua) || 106 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || 107 | []; 108 | 109 | return { 110 | browser: match[ 1 ] || "", 111 | version: match[ 2 ] || "0" 112 | }; 113 | }; 114 | jQuery.browser = {}; 115 | jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; 116 | } 117 | 118 | /** 119 | * Small JavaScript module for the documentation. 120 | */ 121 | var Documentation = { 122 | 123 | init : function() { 124 | this.fixFirefoxAnchorBug(); 125 | this.highlightSearchWords(); 126 | this.initIndexTable(); 127 | }, 128 | 129 | /** 130 | * i18n support 131 | */ 132 | TRANSLATIONS : {}, 133 | PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, 134 | LOCALE : 'unknown', 135 | 136 | // gettext and ngettext don't access this so that the functions 137 | // can safely bound to a different name (_ = Documentation.gettext) 138 | gettext : function(string) { 139 | var translated = Documentation.TRANSLATIONS[string]; 140 | if (typeof translated == 'undefined') 141 | return string; 142 | return (typeof translated == 'string') ? translated : translated[0]; 143 | }, 144 | 145 | ngettext : function(singular, plural, n) { 146 | var translated = Documentation.TRANSLATIONS[singular]; 147 | if (typeof translated == 'undefined') 148 | return (n == 1) ? singular : plural; 149 | return translated[Documentation.PLURALEXPR(n)]; 150 | }, 151 | 152 | addTranslations : function(catalog) { 153 | for (var key in catalog.messages) 154 | this.TRANSLATIONS[key] = catalog.messages[key]; 155 | this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); 156 | this.LOCALE = catalog.locale; 157 | }, 158 | 159 | /** 160 | * add context elements like header anchor links 161 | */ 162 | addContextElements : function() { 163 | $('div[id] > :header:first').each(function() { 164 | $('\u00B6'). 165 | attr('href', '#' + this.id). 166 | attr('title', _('Permalink to this headline')). 167 | appendTo(this); 168 | }); 169 | $('dt[id]').each(function() { 170 | $('\u00B6'). 171 | attr('href', '#' + this.id). 172 | attr('title', _('Permalink to this definition')). 173 | appendTo(this); 174 | }); 175 | }, 176 | 177 | /** 178 | * workaround a firefox stupidity 179 | * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 180 | */ 181 | fixFirefoxAnchorBug : function() { 182 | if (document.location.hash) 183 | window.setTimeout(function() { 184 | document.location.href += ''; 185 | }, 10); 186 | }, 187 | 188 | /** 189 | * highlight the search words provided in the url in the text 190 | */ 191 | highlightSearchWords : function() { 192 | var params = $.getQueryParameters(); 193 | var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; 194 | if (terms.length) { 195 | var body = $('div.body'); 196 | if (!body.length) { 197 | body = $('body'); 198 | } 199 | window.setTimeout(function() { 200 | $.each(terms, function() { 201 | body.highlightText(this.toLowerCase(), 'highlighted'); 202 | }); 203 | }, 10); 204 | $('') 206 | .appendTo($('#searchbox')); 207 | } 208 | }, 209 | 210 | /** 211 | * init the domain index toggle buttons 212 | */ 213 | initIndexTable : function() { 214 | var togglers = $('img.toggler').click(function() { 215 | var src = $(this).attr('src'); 216 | var idnum = $(this).attr('id').substr(7); 217 | $('tr.cg-' + idnum).toggle(); 218 | if (src.substr(-9) == 'minus.png') 219 | $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); 220 | else 221 | $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); 222 | }).css('display', ''); 223 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { 224 | togglers.click(); 225 | } 226 | }, 227 | 228 | /** 229 | * helper function to hide the search marks again 230 | */ 231 | hideSearchWords : function() { 232 | $('#searchbox .highlight-link').fadeOut(300); 233 | $('span.highlighted').removeClass('highlighted'); 234 | }, 235 | 236 | /** 237 | * make the url absolute 238 | */ 239 | makeURL : function(relativeURL) { 240 | return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; 241 | }, 242 | 243 | /** 244 | * get the current relative url 245 | */ 246 | getCurrentURL : function() { 247 | var path = document.location.pathname; 248 | var parts = path.split(/\//); 249 | $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { 250 | if (this == '..') 251 | parts.pop(); 252 | }); 253 | var url = parts.join('/'); 254 | return path.substring(url.lastIndexOf('/') + 1, path.length - 1); 255 | } 256 | }; 257 | 258 | // quick alias for translations 259 | _ = Documentation.gettext; 260 | 261 | $(document).ready(function() { 262 | Documentation.init(); 263 | }); 264 | -------------------------------------------------------------------------------- /docs/_build/html/_static/down-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/down-pressed.png -------------------------------------------------------------------------------- /docs/_build/html/_static/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/down.png -------------------------------------------------------------------------------- /docs/_build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/file.png -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Inconsolata-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/fonts/Inconsolata-Bold.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Inconsolata-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/fonts/Inconsolata-Regular.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/fonts/Lato-Bold.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/Lato-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/fonts/Lato-Regular.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/RobotoSlab-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/fonts/RobotoSlab-Bold.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/RobotoSlab-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/fonts/RobotoSlab-Regular.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/_build/html/_static/js/theme.js: -------------------------------------------------------------------------------- 1 | require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o"); 77 | 78 | // Add expand links to all parents of nested ul 79 | $('.wy-menu-vertical ul').not('.simple').siblings('a').each(function () { 80 | var link = $(this); 81 | expand = $(''); 82 | expand.on('click', function (ev) { 83 | self.toggleCurrent(link); 84 | ev.stopPropagation(); 85 | return false; 86 | }); 87 | link.prepend(expand); 88 | }); 89 | }; 90 | 91 | nav.reset = function () { 92 | // Get anchor from URL and open up nested nav 93 | var anchor = encodeURI(window.location.hash); 94 | if (anchor) { 95 | try { 96 | var link = $('.wy-menu-vertical') 97 | .find('[href="' + anchor + '"]'); 98 | $('.wy-menu-vertical li.toctree-l1 li.current') 99 | .removeClass('current'); 100 | link.closest('li.toctree-l2').addClass('current'); 101 | link.closest('li.toctree-l3').addClass('current'); 102 | link.closest('li.toctree-l4').addClass('current'); 103 | } 104 | catch (err) { 105 | console.log("Error expanding nav for anchor", err); 106 | } 107 | } 108 | }; 109 | 110 | nav.onScroll = function () { 111 | this.winScroll = false; 112 | var newWinPosition = this.win.scrollTop(), 113 | winBottom = newWinPosition + this.winHeight, 114 | navPosition = this.navBar.scrollTop(), 115 | newNavPosition = navPosition + (newWinPosition - this.winPosition); 116 | if (newWinPosition < 0 || winBottom > this.docHeight) { 117 | return; 118 | } 119 | this.navBar.scrollTop(newNavPosition); 120 | this.winPosition = newWinPosition; 121 | }; 122 | 123 | nav.onResize = function () { 124 | this.winResize = false; 125 | this.winHeight = this.win.height(); 126 | this.docHeight = $(document).height(); 127 | }; 128 | 129 | nav.hashChange = function () { 130 | this.linkScroll = true; 131 | this.win.one('hashchange', function () { 132 | this.linkScroll = false; 133 | }); 134 | }; 135 | 136 | nav.toggleCurrent = function (elem) { 137 | var parent_li = elem.closest('li'); 138 | parent_li.siblings('li.current').removeClass('current'); 139 | parent_li.siblings().find('li.current').removeClass('current'); 140 | parent_li.find('> ul li.current').removeClass('current'); 141 | parent_li.toggleClass('current'); 142 | } 143 | 144 | return nav; 145 | }; 146 | 147 | module.exports.ThemeNav = ThemeNav(); 148 | 149 | if (typeof(window) != 'undefined') { 150 | window.SphinxRtdTheme = { StickyNav: module.exports.ThemeNav }; 151 | } 152 | 153 | },{"jquery":"jquery"}]},{},["sphinx-rtd-theme"]); 154 | -------------------------------------------------------------------------------- /docs/_build/html/_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/logo.png -------------------------------------------------------------------------------- /docs/_build/html/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/minus.png -------------------------------------------------------------------------------- /docs/_build/html/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/plus.png -------------------------------------------------------------------------------- /docs/_build/html/_static/pos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/pos.png -------------------------------------------------------------------------------- /docs/_build/html/_static/pygments.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #ffffcc } 2 | .highlight { background: #eeffcc; } 3 | .highlight .c { color: #408090; font-style: italic } /* Comment */ 4 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 5 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ 6 | .highlight .o { color: #666666 } /* Operator */ 7 | .highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */ 8 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ 9 | .highlight .cp { color: #007020 } /* Comment.Preproc */ 10 | .highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */ 11 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ 12 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ 13 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 14 | .highlight .ge { font-style: italic } /* Generic.Emph */ 15 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 16 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 17 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 18 | .highlight .go { color: #333333 } /* Generic.Output */ 19 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ 20 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 21 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 22 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 23 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ 24 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ 25 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ 26 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */ 27 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ 28 | .highlight .kt { color: #902000 } /* Keyword.Type */ 29 | .highlight .m { color: #208050 } /* Literal.Number */ 30 | .highlight .s { color: #4070a0 } /* Literal.String */ 31 | .highlight .na { color: #4070a0 } /* Name.Attribute */ 32 | .highlight .nb { color: #007020 } /* Name.Builtin */ 33 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ 34 | .highlight .no { color: #60add5 } /* Name.Constant */ 35 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ 36 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ 37 | .highlight .ne { color: #007020 } /* Name.Exception */ 38 | .highlight .nf { color: #06287e } /* Name.Function */ 39 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ 40 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ 41 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ 42 | .highlight .nv { color: #bb60d5 } /* Name.Variable */ 43 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ 44 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 45 | .highlight .mb { color: #208050 } /* Literal.Number.Bin */ 46 | .highlight .mf { color: #208050 } /* Literal.Number.Float */ 47 | .highlight .mh { color: #208050 } /* Literal.Number.Hex */ 48 | .highlight .mi { color: #208050 } /* Literal.Number.Integer */ 49 | .highlight .mo { color: #208050 } /* Literal.Number.Oct */ 50 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ 51 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */ 52 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ 53 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ 54 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ 55 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ 56 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ 57 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */ 58 | .highlight .sr { color: #235388 } /* Literal.String.Regex */ 59 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ 60 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */ 61 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ 62 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ 63 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ 64 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ 65 | .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/_build/html/_static/ucc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/ucc.png -------------------------------------------------------------------------------- /docs/_build/html/_static/ucc_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/ucc_2.png -------------------------------------------------------------------------------- /docs/_build/html/_static/underscore.js: -------------------------------------------------------------------------------- 1 | // Underscore.js 1.3.1 2 | // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. 3 | // Underscore is freely distributable under the MIT license. 4 | // Portions of Underscore are inspired or borrowed from Prototype, 5 | // Oliver Steele's Functional, and John Resig's Micro-Templating. 6 | // For all details and documentation: 7 | // http://documentcloud.github.com/underscore 8 | (function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source== 9 | c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c, 10 | h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each= 11 | b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e2;a== 12 | null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect= 13 | function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e= 14 | e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck= 15 | function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a, 17 | c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}}; 24 | b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments, 25 | 1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)}; 26 | b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"}; 27 | b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a), 28 | function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+ 29 | u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]= 30 | function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain= 31 | true;return this};m.prototype.value=function(){return this._wrapped}}).call(this); 32 | -------------------------------------------------------------------------------- /docs/_build/html/_static/universidad-cooperativa-colombia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/universidad-cooperativa-colombia.png -------------------------------------------------------------------------------- /docs/_build/html/_static/up-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/up-pressed.png -------------------------------------------------------------------------------- /docs/_build/html/_static/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/up.png -------------------------------------------------------------------------------- /docs/_build/html/_static/voyager.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/_static/voyager.jpg -------------------------------------------------------------------------------- /docs/_build/html/analisis.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Analisis — Voyager 0.5 documentation 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
45 | 46 | 47 | 99 | 100 |
101 | 102 | 103 | 107 | 108 | 109 | 110 |
111 |
112 | 113 | 114 | 115 | 116 | 117 | 118 |
119 | 131 |
132 |
133 |
134 |
135 | 136 |
137 |

Analisis

138 |
139 | 140 | 141 |
142 |
143 |
144 | 145 | 153 | 154 | 155 |
156 | 157 |
158 |

159 | © Copyright 2015-2016, Secbi. 160 | 161 |

162 |
163 | Built with Sphinx using a theme provided by Read the Docs. 164 | 165 |
166 | 167 |
168 |
169 | 170 |
171 | 172 |
173 | 174 | 175 | 176 | 177 | 178 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 205 | 206 | 207 | 208 | -------------------------------------------------------------------------------- /docs/_build/html/arquitectura.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Arquitectura — Voyager 0.5 documentation 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
45 | 46 | 47 | 99 | 100 |
101 | 102 | 103 | 107 | 108 | 109 | 110 |
111 |
112 | 113 | 114 | 115 | 116 | 117 | 118 |
119 |
    120 |
  • Docs »
  • 121 | 122 |
  • Arquitectura
  • 123 |
  • 124 | 125 | 126 | View page source 127 | 128 | 129 |
  • 130 |
131 |
132 |
133 |
134 |
135 | 136 |
137 |

Arquitectura

138 |
139 | 140 | 141 |
142 |
143 |
144 | 145 | 153 | 154 | 155 |
156 | 157 |
158 |

159 | © Copyright 2015-2016, Secbi. 160 | 161 |

162 |
163 | Built with Sphinx using a theme provided by Read the Docs. 164 | 165 |
166 | 167 |
168 |
169 | 170 |
171 | 172 |
173 | 174 | 175 | 176 | 177 | 178 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 205 | 206 | 207 | 208 | -------------------------------------------------------------------------------- /docs/_build/html/design.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Diseño — Voyager 0.5 documentation 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
44 | 45 | 46 | 98 | 99 |
100 | 101 | 102 | 106 | 107 | 108 | 109 |
110 |
111 | 112 | 113 | 114 | 115 | 116 | 117 |
118 | 130 |
131 |
132 |
133 |
134 | 135 |
136 |

Diseño

137 |
138 | 139 | 140 |
141 |
142 |
143 | 144 | 150 | 151 | 152 |
153 | 154 |
155 |

156 | © Copyright 2015-2016, Secbi. 157 | 158 |

159 |
160 | Built with Sphinx using a theme provided by Read the Docs. 161 | 162 |
163 | 164 |
165 |
166 | 167 |
168 | 169 |
170 | 171 | 172 | 173 | 174 | 175 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 202 | 203 | 204 | 205 | -------------------------------------------------------------------------------- /docs/_build/html/genindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Index — Voyager 0.5 documentation 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
44 | 45 | 46 | 99 | 100 |
101 | 102 | 103 | 107 | 108 | 109 | 110 |
111 |
112 | 113 | 114 | 115 | 116 | 117 | 118 |
119 |
    120 |
  • Docs »
  • 121 | 122 |
  • 123 |
  • 124 | 125 | 126 | 127 |
  • 128 |
129 |
130 |
131 |
132 |
133 | 134 | 135 |

Index

136 | 137 |
138 | 139 |
140 | 141 | 142 |
143 |
144 |
145 | 146 | 147 |
148 | 149 |
150 |

151 | © Copyright 2015-2016, Secbi. 152 | 153 |

154 |
155 | Built with Sphinx using a theme provided by Read the Docs. 156 | 157 |
158 | 159 |
160 |
161 | 162 |
163 | 164 |
165 | 166 | 167 | 168 | 169 | 170 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 197 | 198 | 199 | 200 | -------------------------------------------------------------------------------- /docs/_build/html/introduccion.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Introduccion — Voyager 0.5 documentation 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
45 | 46 | 47 | 99 | 100 |
101 | 102 | 103 | 107 | 108 | 109 | 110 |
111 |
112 | 113 | 114 | 115 | 116 | 117 | 118 |
119 |
    120 |
  • Docs »
  • 121 | 122 |
  • Introduccion
  • 123 |
  • 124 | 125 | 126 | View page source 127 | 128 | 129 |
  • 130 |
131 |
132 |
133 |
134 |
135 | 136 |
137 |

Introduccion

138 |

Technology is just one of many disruptive inluences in education today. We live in an era where the wealth of data and the exponential growth in the development of new 139 | knowledge is challenging institutions to rethink teaching 140 | and learning in a global market. - Cisco (2013)

141 | _images/cisco.png 142 |

As more people adopt new technologies for learning, they will thrive in the emerging world of the Internet of Everything (IoE)—the networked connection of people, process, data, and things—which is becoming the basis for the Internet of Learning Things

143 |
144 | 145 | 146 |
147 |
148 |
149 | 150 | 158 | 159 | 160 |
161 | 162 |
163 |

164 | © Copyright 2015-2016, Secbi. 165 | 166 |

167 |
168 | Built with Sphinx using a theme provided by Read the Docs. 169 | 170 |
171 | 172 |
173 |
174 | 175 |
176 | 177 |
178 | 179 | 180 | 181 | 182 | 183 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 210 | 211 | 212 | 213 | -------------------------------------------------------------------------------- /docs/_build/html/justificacion.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Justificacion — Voyager 0.5 documentation 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
45 | 46 | 47 | 99 | 100 |
101 | 102 | 103 | 107 | 108 | 109 | 110 |
111 |
112 | 113 | 114 | 115 | 116 | 117 | 118 |
119 |
    120 |
  • Docs »
  • 121 | 122 |
  • Justificacion
  • 123 |
  • 124 | 125 | 126 | View page source 127 | 128 | 129 |
  • 130 |
131 |
132 |
133 |
134 |
135 | 136 |
137 |

Justificacion

138 |

¿ Cómo construir un prototipo de un robot que pueda ser controlado desde Internet utilizando hardware de bajo coste que apoye la creciente necesidad de aprendizaje en el campo del Internet de las cosas* en las universidades?

139 |

La tecnología avanza mucha mas rápido que lo que un programa de universidad puede, en el caso del software es mucho más evidente este avance, pero en lo últimos 2 años el Hardware ha sido protagonista con el surgimiento del movimiento Open Hardware y su enfoque académico con las plataformas como Arduino, Raspberry Pi, Intel Edison. Etc. Además en el mundo de la industria logística y los gatgets la internet de las cosas es tendencia y se estima que para 2017 el mercado sea ade aprox 17 Billones de dolares.

140 |

Por esta razón se hace necesario empezar proyectos de desarrollo de software enfocados al control del hardware, los sistemas tradicionales transaccionales han estado por años, ahora es el turno donde los sistemas pueden producir datos y responder en tiempo real a las demandas actuales de soluciones eficientes para ciudades, personas, hogares, empresas.

141 |

Lo anterior se justifica bajo las siguientes premisas;

142 |
    143 |
  • Micro-controladores y sensores pequeños y baratos
  • 144 |
  • Nuevas herramientas de software
  • 145 |
  • La comunidad open source/hardware ha estado bastante activa los últimos años.
  • 146 |
  • La Internet de las cosas es tendencia
  • 147 |
148 |
149 | 150 | 151 |
152 |
153 |
154 | 155 | 163 | 164 | 165 |
166 | 167 |
168 |

169 | © Copyright 2015-2016, Secbi. 170 | 171 |

172 |
173 | Built with Sphinx using a theme provided by Read the Docs. 174 | 175 |
176 | 177 |
178 |
179 | 180 |
181 | 182 |
183 | 184 | 185 | 186 | 187 | 188 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 215 | 216 | 217 | 218 | -------------------------------------------------------------------------------- /docs/_build/html/mercury.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Mercury robot challenge 2016 — Voyager 0.5 documentation 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
44 | 45 | 46 | 110 | 111 |
112 | 113 | 114 | 118 | 119 | 120 | 121 |
122 |
123 | 124 | 125 | 126 | 127 | 128 | 129 |
130 |
    131 |
  • Docs »
  • 132 | 133 |
  • Mercury robot challenge 2016
  • 134 |
  • 135 | 136 | 137 | View page source 138 | 139 | 140 |
  • 141 |
142 |
143 |
144 |
145 |
146 | 147 |
148 |

Mercury robot challenge 2016

149 |

Voyager Technical Document

150 |

logo

151 |
152 |

Team

153 | 159 |
160 |

Summary

161 |

This technical document describes the creation and specs of a remotely controlled robot. The Robot “Voyager” 162 | was designed and built to meet the requirements of the Oklahoma State University Mercury 163 | Robotics competition for 2016 in Bogota, Colombia.

164 |
165 |
166 |

High­level block diagram

167 |

dia

168 |
169 |
170 |

Communication

171 |

The microcontroller will be conecte via serial to the raspberry pi, on the raspberry we use a Nodejs library in order to expose a real time socket web based server. 172 | For handle browser events we use jQuery and keypress in order to detect when a key is pressed then and do a socket emit.

173 |
174 |
175 |

Main board

176 |

The robot uses the Raspberri pi B+ as the principal board, this board allow the commnincation to a higer level user application using a Sockect TCP server. It is attached direclty to the microcontroller via serial USB port.

177 |
178 |
179 |

Video feedback

180 |

The robot has a camera module attached to the raspberry pi, we expose this camera thougth a UDP video stream server.

181 |
182 |
183 |

Cotroller interface

184 |

We have a web based interface using HTML,CSS and Javascript to handle browser events.

185 |
186 |
187 |

Drive train

188 |

The robot has one motor per side, each running a tread through a gearbox with an encoder.

189 |
190 |
191 |

Subsystems

192 |

The robot has two Ultrasonic sensors......

193 |
194 |
195 |

Power

196 |

The robot has a 7.2[V] standard 3000[mAh] NiMH battery.

197 |
198 |
199 | 200 | 201 |
202 |
203 |
204 | 205 | 211 | 212 | 213 |
214 | 215 |
216 |

217 | © Copyright 2015-2016, Secbi. 218 | 219 |

220 |
221 | Built with Sphinx using a theme provided by Read the Docs. 222 | 223 |
224 | 225 |
226 |
227 | 228 |
229 | 230 |
231 | 232 | 233 | 234 | 235 | 236 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 263 | 264 | 265 | 266 | -------------------------------------------------------------------------------- /docs/_build/html/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_build/html/objects.inv -------------------------------------------------------------------------------- /docs/_build/html/objetivos.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Objetivos — Voyager 0.5 documentation 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
45 | 46 | 47 | 103 | 104 |
105 | 106 | 107 | 111 | 112 | 113 | 114 |
115 |
116 | 117 | 118 | 119 | 120 | 121 | 122 |
123 | 135 |
136 |
137 |
138 |
139 | 140 |
141 |

Objetivos

142 |
143 |

General

144 |
    145 |
  • Desarrollar un apliacion (WEB) que permita manipular un microcontrolador arduido y raspberry por medio de una interfaz de facil manejo y compatible con varios modelos de estos.
  • 146 |
147 |
148 |
149 |

Especificos

150 |
    151 |
  • Prototipar hardware utilizando Arduino que permita comunicación serial en tiempo real utilizando el protocolo firmata y lectura de sensores.
  • 152 |
  • Codificar una aplicación que reciba peticiones HTTPvia web socket y las transforme a señales digitales utilizando Nodejs con la libreria Jhonny five.
  • 153 |
  • Desplegar la aplicación en un container de Linux(LXC) compatible con ARM utilizando Docker bajo una Raspberry pi B+ 2 que permita comunicación serial con un Arduino e integre periféricos.
  • 154 |
  • Diseñar una interfaz web que capte los eventos del navegador para controlar el robot y presente información en streaming de sensores y/o periféricos.
  • 155 |
156 |
157 |
158 | 159 | 160 |
161 |
162 |
163 | 164 | 172 | 173 | 174 |
175 | 176 |
177 |

178 | © Copyright 2015-2016, Secbi. 179 | 180 |

181 |
182 | Built with Sphinx using a theme provided by Read the Docs. 183 | 184 |
185 | 186 |
187 |
188 | 189 |
190 | 191 |
192 | 193 | 194 | 195 | 196 | 197 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 224 | 225 | 226 | 227 | -------------------------------------------------------------------------------- /docs/_build/html/requerimientos.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Requerimientos — Voyager 0.5 documentation 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
45 | 46 | 47 | 104 | 105 |
106 | 107 | 108 | 112 | 113 | 114 | 115 |
116 |
117 | 118 | 119 | 120 | 121 | 122 | 123 |
124 |
    125 |
  • Docs »
  • 126 | 127 |
  • Requerimientos
  • 128 |
  • 129 | 130 | 131 | View page source 132 | 133 | 134 |
  • 135 |
136 |
137 |
138 |
139 |
140 | 141 |
142 |

Requerimientos

143 |
144 |

1. Configuracion

145 |

1.1. Los parámetros se deberán ajustar. El sistema deberá permitir configurar los parámetros de el respectivo microcontrolador.

146 |

1.2. Debe restringirse el acceso al control remote de robot con un usuario y una contraseña via web

147 |

1.3. Debe existir un sito de configuración para definir lo puertos web, usb, direccion ip, configuracion de interfaz de red.

148 |

1.4. Listar direcciones MAC de los dipositivos utlizados

149 |
150 |
151 |

2. Funciones y control

152 |

2.1. Los movimientos deben poder controlarse desde cualquier parte. Estos deberán poder controlarse desde cualquier lugar, por medio de eventos del navegador via internet.

153 |

2.2. Estado de la batería del dispotivio

154 |

2.3. Streaming de video en una interfaz web.

155 |

2.4. Control del dispositivo desde el navegar utilizando eventos del teclado, movimiento (izquierda, derecha, adelante, atrás), movimiento de la camara 360.

156 |

2.5. Motricidad en cualquier direccion. Generara movimientos en cualquier direccion usando las teclas de direccion de los equipos.

157 |

2.6. Si existe mas de un usuario controlador, mostrar el número de conexiones.

158 |

2.7. Almacenar en una base de datos el recorrido del robot.

159 |
160 |
161 |

3. Altertas y notificaciones, referecias

162 |

3.1. Debe producirse una alerta cuando se pierda la conexión o la batería esté baja.

163 |

3.2. Debe permitir configurar alertas basado en lecturas de sensores (proximidad, temperatura, humedad etc.)

164 |

3.3. Los elementos del arduino deberán ser referenciados. El sistema deberá visualizar la respectiva referencia de cada componente Arduino.

165 |

3.4. Los componentes del Rapsberry Pi serán referenciados. El sistema deberá visualizar la correspondiente referencia de cada componente rapsberry.

166 |
167 |
168 | 169 | 170 |
171 |
172 |
173 | 174 | 182 | 183 | 184 |
185 | 186 |
187 |

188 | © Copyright 2015-2016, Secbi. 189 | 190 |

191 |
192 | Built with Sphinx using a theme provided by Read the Docs. 193 | 194 |
195 | 196 |
197 |
198 | 199 |
200 | 201 |
202 | 203 | 204 | 205 | 206 | 207 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 234 | 235 | 236 | 237 | -------------------------------------------------------------------------------- /docs/_build/html/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Search — Voyager 0.5 documentation 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |
43 | 44 | 45 | 98 | 99 |
100 | 101 | 102 | 106 | 107 | 108 | 109 |
110 |
111 | 112 | 113 | 114 | 115 | 116 | 117 |
118 |
    119 |
  • Docs »
  • 120 | 121 |
  • 122 |
  • 123 | 124 |
  • 125 |
126 |
127 |
128 |
129 |
130 | 131 | 139 | 140 | 141 |
142 | 143 |
144 | 145 |
146 |
147 |
148 | 149 | 150 |
151 | 152 |
153 |

154 | © Copyright 2015-2016, Secbi. 155 | 156 |

157 |
158 | Built with Sphinx using a theme provided by Read the Docs. 159 | 160 |
161 | 162 |
163 |
164 | 165 |
166 | 167 |
168 | 169 | 170 | 171 | 172 | 173 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 201 | 202 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | -------------------------------------------------------------------------------- /docs/_build/html/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({envversion:46,filenames:["analisis","arquitectura","design","index","introduccion","justificacion","mercury","objetivos","requerimientos"],objects:{},objnames:{},objtypes:{},terms:{"\u00faltimo":5,"a\u00f1o":5,"abstract":[],"acad\u00e9mico":5,"adem\u00e1":5,"aplicaci\u00f3n":[3,7],"atr\u00e1":8,"bater\u00eda":8,"c\u00f3mo":5,"comunicaci\u00f3n":7,"conexi\u00f3n":8,"configuraci\u00f3n":8,"contrase\u00f1a":8,"deber\u00e1":8,"deber\u00e1n":8,"dise\u00f1ar":7,"est\u00e1ndar":3,"est\u00e9":8,"function":3,"informaci\u00f3n":7,"log\u00edstica":5,"n\u00famero":8,"new":4,"par\u00e1metro":8,"peque\u00f1a":3,"peque\u00f1o":5,"perif\u00e9rico":7,"r\u00e1pido":[3,5],"raz\u00f3n":5,"se\u00f1al":7,"ser\u00e1n":8,"tecnolog\u00eda":5,"trav\u00e9":[],acced:3,acceso:8,acontinuacion:3,activa:5,actual:5,adelant:8,adopt:4,afortunadament:3,ahora:[3,5],aislar:3,ajustar:8,alerta:8,algo:3,alguno:3,all:[],allow:6,almacenar:8,alterta:[],anterior:5,apliacion:7,aplicacion:3,apoy:5,app:3,applic:6,aprendizaj:5,aprox:5,apt:3,archivo:3,arduido:7,arduino:[3,5,7,8],arm:[3,7],asegurarno:3,asi:3,asociado:3,attach:6,audiovisual:3,aun:3,avanc:5,avanza:5,ayudara:3,baja:8,bajo:[5,7],barato:5,basado:8,base:[6,8],basi:4,basica:3,basico:3,bastant:5,batteri:6,becom:4,billon:5,block:[],board:[],bogota:6,bot:3,breakdown:[],bridg:3,browser:[3,6],buen:3,buena:3,build:3,built:6,cada:8,camara:[3,8],camera:[3,6],campo:5,campusucc:6,capt:7,caso:5,castellano:6,castellanosa:6,cesar:6,challeng:4,cisco:4,ciudad:5,clonamo:3,clone:3,codificar:7,colombia:6,column:[],com:3,comando:3,commninc:6,commun:[],como:[3,5],compat:[3,7],competit:6,compilamo:3,complat:3,component:8,comunica:3,comunicacion:3,comunidad:5,con:[3,5,7,8],conect:6,conecta:3,conectamo:3,conexion:[3,8],configuramo:3,configurar:8,connect:4,consol:3,construir:5,consultarlo:3,container_ip:3,contenedor:3,contrll:[],control:[],controlado:5,controlador:[5,8],controlar:7,controlars:8,corremo:3,correspond:3,correspondient:8,cosa:5,cost:5,cotrol:[],cration:[],creation:6,crecient:5,crucial:3,css:6,cualquier:[3,8],cuando:[3,8],cumpla:3,curso:3,dario:6,data:4,dato:[5,8],debe:8,debemo:3,deben:8,definir:[3,8],del:[3,5,7,8],demanda:5,depencia:3,derecha:8,desarrollar:[3,7],desarrollo:5,describ:6,desd:[3,5,8],design:6,desplegar:7,despliegu:3,detal:[],detect:6,detectar:3,dev:3,develop:4,devic:3,diagram:[],digital:7,dipositivo:8,direccion:8,direclti:6,dispositivo:[3,8],dispotivio:8,disrupt:4,distro:3,document:6,documentacion:3,documentar:[],dolar:5,dond:5,dongl:3,drive:[],each:6,easy_instal:3,edison:5,editamo:3,edu:6,educ:4,educativo:[],eficient:5,ejecutamo:3,elemento:8,emerg:4,emit:[3,6],empezar:[3,5],empresa:5,encod:6,enfocado:5,enfoqu:5,entr:3,equipo:8,era:4,escuchamo:3,escuchar:3,eso:3,especificacion:3,especifico:[],est:[3,5],esta:[3,5],estado:[5,8],estan:3,estara:3,estima:5,esto:[3,7,8],etc:[5,8],event:6,evento:[3,7,8],everyth:4,evident:5,exist:8,existir:8,experimeinto:3,exponenti:4,expos:6,express:3,facil:7,facto:3,feedback:[],fig:3,file:3,finalidad:3,fine:[],firmaata:3,five:[3,7],flag:3,flash:3,forma:3,formal:3,forward:3,foto:3,from:3,funcion:[],funciona:3,garantiza:3,gatget:5,gearbox:6,gener:[],generara:8,get:3,git:3,github:3,global:4,goforward:3,googlecod:3,growth:4,guia:3,hace:5,hacer:3,hacerl:3,hacker:3,han:[3,5],handl:6,have:6,herramienta:[3,5],higer:6,high:[],hogar:5,html:6,http:3,httpvia:7,humedad:8,hypriot:3,idea:3,imagen:3,important:3,incial:3,includ:[],industria:5,ingenieria:3,ini:3,inluenc:4,instal:3,instalacion:3,instalada:3,instalado:3,instalamo:3,institut:4,integr:7,intel:5,interaccion:3,interfac:[],interfaz:[7,8],internet:[4,5,8],introduccion:[],introduct:[],io_:[],ioe:4,iot:3,ivan:6,izquierda:8,javascript:[3,6],jhonni:[3,7],jqueri:[3,6],julio:6,juliocesar:3,juliocesar_io:[],juliocesar_io_:[],just:4,justifica:5,justificacion:[],kei:[3,6],kernel:3,keypress:[3,6],knowledg:4,lado:3,learn:4,lectura:[7,8],leve:[],level:[],librari:6,libreria:[3,7],linea:3,linux:7,lista:3,listar:8,listen:3,listo:3,live:4,llamada:3,llamaron:3,lm35:3,ln28n:3,log:3,logeamo:3,lsusb:3,luego:3,lugar:8,lui:6,lxc:7,mac:8,mah:6,main:[],make:3,manejar:3,manejo:7,mani:4,manipular:7,market:4,materi:[],medio:[7,8],meet:6,mega2560:3,mega:3,mejor:3,mercado:5,mercuri:[],micro:5,microcontrol:6,microcontrolador:[7,8],model:3,modelo:7,modificada:3,modificado:3,modul:6,more:4,mostrar:8,motor:[3,6],motricidad:8,movimiento:[5,8],mucha:5,mucho:5,mui:3,mundo:5,navegador:[3,7,8],navegar:[3,8],necesario:5,necesidad:5,neserio:3,network:4,nimh:6,nivel:3,node:3,nodej:[3,6,7],notificacion:[],nuestra:3,nueva:5,objetivo:[],observar:3,observaremo:3,obten:3,oklahoma:6,on_keydown:3,open:5,order:6,organizado:3,ortizp:6,para:[3,5,7,8],part:[3,8],peopl:4,per:6,permita:7,permitir:8,pero:[3,5],persona:5,peticion:7,pierda:8,pip:3,placa:3,plataforma:[3,5],podemo:3,poder:8,podremo:3,por:[5,7,8],porqu:3,port:[3,6],portabilidad:3,posibl:3,power:3,premisa:5,present:7,presionada:3,press:6,primer:3,princip:6,probamo:3,process:4,producir:5,producirs:8,programa:5,protagonista:5,prototipar:7,prototipo:[3,5],proximidad:8,proxomidad:3,pued:5,pueda:5,pueden:5,puent:3,puerto:[3,8],que:[3,5,7],rafael:6,rapsberri:8,rasberri:3,raspberri:[3,5,6,7],real:[3,5,6,7],realizado:3,realizar:3,reaspberri:3,reciba:7,recorrido:8,recurso:3,red:8,referecia:[],referencia:8,referenciado:8,remot:[6,8],repo:3,report:[],requerimiento:[],requir:6,respectiva:8,respectivo:8,respond:5,restringirs:8,rethink:4,robot:[5,7,8],rpi:3,sabemo:3,sea:5,seguido:3,sensor:[3,5,6,7,8],ser:[5,8],sera:3,serial:[3,6,7],server:[3,6],servor:3,side:6,sido:5,significa:3,siguient:[3,5],sistema:[5,8],sitio:3,sito:8,sketch:3,small:[],sockect:6,socket:[3,6,7],solucion:5,someth:3,son:3,soport:3,sourc:5,spec:6,specif:[],src:3,standard:6,state:6,stream:[6,7,8],subimo:3,subir:3,subsystem:3,sudo:3,summari:[],surgimiento:5,tanto:3,tar:3,targeta:3,tcp:6,teach:4,team:[],technic:6,technolog:4,tecla:[3,8],teclado:8,temperatura:8,tendencia:5,termin:3,thecnic:[],thei:4,thi:6,thing:4,thougth:6,thrive:4,through:6,tiempo:[3,5,7],time:6,todai:4,todo:3,tradicional:5,train:[],transaccional:5,transform:7,tread:6,ttyacm0:3,turno:5,two:6,ubicuo:[],udp:6,ultrason:6,una:[3,7,8],univers:6,universidad:5,upload:3,usa:3,usamo:3,usando:[3,8],usb:[3,6,8],user:6,usuario:8,utilizamo:3,utilizando:[3,5,7,8],utilizar:3,utliiza:3,utlizado:8,utlizamo:3,utlizando:3,utulizar:3,vamo:3,vario:7,vergara:6,vergarah:6,version:3,vez:3,via:[3,6,8],video:8,villadiego:6,visualizar:8,wealth:4,web:[3,6,7,8],wget:3,when:6,where:4,which:4,wifi:3,world:4,xvzf:3,your_tag_nam:3,yum:3},titles:["Analisis","Arquitectura","Dise\u00f1o","Proyecto Voyager","Introduccion","Justificacion","Mercury robot challenge 2016","Objetivos","Requerimientos"],titleterms:{"abstract":[],"dise\u00f1o":2,alterta:8,analisi:0,ardunio:3,arquitectura:[1,3],block:6,board:6,challeng:6,client:3,commun:6,configuracion:[3,8],configurando:3,contain:3,contenido:3,control:8,cotrol:6,dependencia:3,diagram:6,docker:3,drive:6,especifico:7,feedback:6,firmata:3,funcion:8,gener:7,green:[],hardwar:3,high:6,inici:3,ino:3,instalando:3,instalar:3,interfac:6,introduccion:4,introduct:[],justificacion:5,level:6,main:6,mercuri:6,notificacion:8,npm:3,objetivo:7,paso:3,picocom:3,power:6,presentacion:3,primero:3,protocolo:3,proyecto:3,referecia:8,requerimiento:8,robot:6,run:3,servidor:3,softwar:3,subsystem:6,summari:6,team:[],train:6,video:6,voyag:3}}) -------------------------------------------------------------------------------- /docs/_static/1.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_static/1.1.png -------------------------------------------------------------------------------- /docs/_static/2.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_static/2.1.png -------------------------------------------------------------------------------- /docs/_static/2016-03-30_1219.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_static/2016-03-30_1219.png -------------------------------------------------------------------------------- /docs/_static/cisco.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_static/cisco.png -------------------------------------------------------------------------------- /docs/_static/dia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_static/dia.png -------------------------------------------------------------------------------- /docs/_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_static/logo.png -------------------------------------------------------------------------------- /docs/_static/pos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_static/pos.png -------------------------------------------------------------------------------- /docs/_static/ucc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_static/ucc.png -------------------------------------------------------------------------------- /docs/_static/ucc_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_static/ucc_2.png -------------------------------------------------------------------------------- /docs/_static/voyager.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/docs/_static/voyager.jpg -------------------------------------------------------------------------------- /docs/analisis.rst: -------------------------------------------------------------------------------- 1 | Analisis 2 | ============= 3 | -------------------------------------------------------------------------------- /docs/arquitectura.rst: -------------------------------------------------------------------------------- 1 | Arquitectura 2 | ============= 3 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # rpi-module documentation build configuration file, created by 4 | # sphinx-quickstart on Thu Dec 10 14:51:36 2015. 5 | # 6 | # This file is execfile()d with the current directory set to its 7 | # containing dir. 8 | # 9 | # Note that not all possible configuration values are present in this 10 | # autogenerated file. 11 | # 12 | # All configuration values have a default; values that are commented out 13 | # serve to show the default. 14 | 15 | import sys 16 | import os 17 | 18 | import sphinx_rtd_theme 19 | 20 | 21 | # If extensions (or modules to document with autodoc) are in another directory, 22 | # add these directories to sys.path here. If the directory is relative to the 23 | # documentation root, use os.path.abspath to make it absolute, like shown here. 24 | #sys.path.insert(0, os.path.abspath('.')) 25 | 26 | # -- General configuration ------------------------------------------------ 27 | 28 | # If your documentation needs a minimal Sphinx version, state it here. 29 | #needs_sphinx = '1.0' 30 | 31 | # Add any Sphinx extension module names here, as strings. They can be 32 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 33 | # ones. 34 | extensions = [] 35 | 36 | # Add any paths that contain templates here, relative to this directory. 37 | templates_path = ['_templates'] 38 | 39 | # The suffix of source filenames. 40 | source_suffix = '.rst' 41 | 42 | # The encoding of source files. 43 | #source_encoding = 'utf-8-sig' 44 | 45 | # The master toctree document. 46 | master_doc = 'index' 47 | 48 | # General information about the project. 49 | project = u'Voyager' 50 | copyright = u'2015-2016, Secbi' 51 | 52 | # The version info for the project you're documenting, acts as replacement for 53 | # |version| and |release|, also used in various other places throughout the 54 | # built documents. 55 | # 56 | # The short X.Y version. 57 | version = '0.5' 58 | # The full version, including alpha/beta/rc tags. 59 | release = '0.5' 60 | 61 | # The language for content autogenerated by Sphinx. Refer to documentation 62 | # for a list of supported languages. 63 | #language = None 64 | 65 | # There are two options for replacing |today|: either, you set today to some 66 | # non-false value, then it is used: 67 | #today = '' 68 | # Else, today_fmt is used as the format for a strftime call. 69 | #today_fmt = '%B %d, %Y' 70 | 71 | # List of patterns, relative to source directory, that match files and 72 | # directories to ignore when looking for source files. 73 | exclude_patterns = ['_build'] 74 | 75 | # The reST default role (used for this markup: `text`) to use for all 76 | # documents. 77 | #default_role = None 78 | 79 | # If true, '()' will be appended to :func: etc. cross-reference text. 80 | #add_function_parentheses = True 81 | 82 | # If true, the current module name will be prepended to all description 83 | # unit titles (such as .. function::). 84 | #add_module_names = True 85 | 86 | # If true, sectionauthor and moduleauthor directives will be shown in the 87 | # output. They are ignored by default. 88 | #show_authors = False 89 | 90 | # The name of the Pygments (syntax highlighting) style to use. 91 | pygments_style = 'sphinx' 92 | 93 | # A list of ignored prefixes for module index sorting. 94 | #modindex_common_prefix = [] 95 | 96 | # If true, keep warnings as "system message" paragraphs in the built documents. 97 | #keep_warnings = False 98 | 99 | 100 | # -- Options for HTML output ---------------------------------------------- 101 | 102 | # The theme to use for HTML and HTML Help pages. See the documentation for 103 | # a list of builtin themes. 104 | 105 | html_theme = "sphinx_rtd_theme" 106 | 107 | html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] 108 | 109 | # Theme options are theme-specific and customize the look and feel of a theme 110 | # further. For a list of options available for each theme, see the 111 | # documentation. 112 | #html_theme_options = {} 113 | 114 | # Add any paths that contain custom themes here, relative to this directory. 115 | #html_theme_path = [] 116 | 117 | # The name for this set of Sphinx documents. If None, it defaults to 118 | # " v documentation". 119 | #html_title = None 120 | 121 | # A shorter title for the navigation bar. Default is the same as html_title. 122 | #html_short_title = None 123 | 124 | # The name of an image file (relative to this directory) to place at the top 125 | # of the sidebar. 126 | #html_logo = None 127 | 128 | # The name of an image file (within the static path) to use as favicon of the 129 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 130 | # pixels large. 131 | #html_favicon = None 132 | 133 | # Add any paths that contain custom static files (such as style sheets) here, 134 | # relative to this directory. They are copied after the builtin static files, 135 | # so a file named "default.css" will overwrite the builtin "default.css". 136 | html_static_path = ['_static'] 137 | 138 | # Add any extra paths that contain custom files (such as robots.txt or 139 | # .htaccess) here, relative to this directory. These files are copied 140 | # directly to the root of the documentation. 141 | #html_extra_path = [] 142 | 143 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 144 | # using the given strftime format. 145 | #html_last_updated_fmt = '%b %d, %Y' 146 | 147 | # If true, SmartyPants will be used to convert quotes and dashes to 148 | # typographically correct entities. 149 | #html_use_smartypants = True 150 | 151 | # Custom sidebar templates, maps document names to template names. 152 | #html_sidebars = {} 153 | 154 | # Additional templates that should be rendered to pages, maps page names to 155 | # template names. 156 | #html_additional_pages = {} 157 | 158 | # If false, no module index is generated. 159 | #html_domain_indices = True 160 | 161 | # If false, no index is generated. 162 | #html_use_index = True 163 | 164 | # If true, the index is split into individual pages for each letter. 165 | #html_split_index = False 166 | 167 | # If true, links to the reST sources are added to the pages. 168 | #html_show_sourcelink = True 169 | 170 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 171 | #html_show_sphinx = True 172 | 173 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 174 | #html_show_copyright = True 175 | 176 | # If true, an OpenSearch description file will be output, and all pages will 177 | # contain a tag referring to it. The value of this option must be the 178 | # base URL from which the finished HTML is served. 179 | #html_use_opensearch = '' 180 | 181 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 182 | #html_file_suffix = None 183 | 184 | # Output file base name for HTML help builder. 185 | htmlhelp_basename = 'rpi-moduledoc' 186 | 187 | 188 | # -- Options for LaTeX output --------------------------------------------- 189 | 190 | latex_elements = { 191 | # The paper size ('letterpaper' or 'a4paper'). 192 | #'papersize': 'letterpaper', 193 | 194 | # The font size ('10pt', '11pt' or '12pt'). 195 | #'pointsize': '10pt', 196 | 197 | # Additional stuff for the LaTeX preamble. 198 | #'preamble': '', 199 | } 200 | 201 | # Grouping the document tree into LaTeX files. List of tuples 202 | # (source start file, target name, title, 203 | # author, documentclass [howto, manual, or own class]). 204 | latex_documents = [ 205 | ('index', 'rpi-module.tex', u'Voyager Documentation', 206 | u'Julio César Castellanos', 'manual'), 207 | ] 208 | 209 | # The name of an image file (relative to this directory) to place at the top of 210 | # the title page. 211 | #latex_logo = None 212 | 213 | # For "manual" documents, if this is true, then toplevel headings are parts, 214 | # not chapters. 215 | #latex_use_parts = False 216 | 217 | # If true, show page references after internal links. 218 | #latex_show_pagerefs = False 219 | 220 | # If true, show URL addresses after external links. 221 | #latex_show_urls = False 222 | 223 | # Documents to append as an appendix to all manuals. 224 | #latex_appendices = [] 225 | 226 | # If false, no module index is generated. 227 | #latex_domain_indices = True 228 | 229 | 230 | # -- Options for manual page output --------------------------------------- 231 | 232 | # One entry per manual page. List of tuples 233 | # (source start file, name, description, authors, manual section). 234 | man_pages = [ 235 | ('index', 'Voyager', u'Voyager Documentation', 236 | [u'Julio César Castellanos'], 1) 237 | ] 238 | 239 | # If true, show URL addresses after external links. 240 | #man_show_urls = False 241 | 242 | 243 | # -- Options for Texinfo output ------------------------------------------- 244 | 245 | # Grouping the document tree into Texinfo files. List of tuples 246 | # (source start file, target name, title, author, 247 | # dir menu entry, description, category) 248 | texinfo_documents = [ 249 | ('index', 'Voyager', u'Voyager Documentation', 250 | u'Julio César Castellanos', 'Voyager', 'One line description of project.', 251 | 'Miscellaneous'), 252 | ] 253 | 254 | # Documents to append as an appendix to all manuals. 255 | #texinfo_appendices = [] 256 | 257 | # If false, no module index is generated. 258 | #texinfo_domain_indices = True 259 | 260 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 261 | #texinfo_show_urls = 'footnote' 262 | 263 | # If true, do not generate a @detailmenu in the "Top" node's menu. 264 | #texinfo_no_detailmenu = False 265 | 266 | 267 | # -- Options for Epub output ---------------------------------------------- 268 | 269 | # Bibliographic Dublin Core info. 270 | epub_title = u'Voyager' 271 | epub_author = u'Julio César Castellanos' 272 | epub_publisher = u'Julio César Castellanos' 273 | epub_copyright = u'2015, Julio César Castellanos' 274 | 275 | # The basename for the epub file. It defaults to the project name. 276 | #epub_basename = u'rpi-module' 277 | 278 | # The HTML theme for the epub output. Since the default themes are not optimized 279 | # for small screen space, using the same theme for HTML and epub output is 280 | # usually not wise. This defaults to 'epub', a theme designed to save visual 281 | # space. 282 | #epub_theme = 'epub' 283 | 284 | # The language of the text. It defaults to the language option 285 | # or en if the language is not set. 286 | #epub_language = '' 287 | 288 | # The scheme of the identifier. Typical schemes are ISBN or URL. 289 | #epub_scheme = '' 290 | 291 | # The unique identifier of the text. This can be a ISBN number 292 | # or the project homepage. 293 | #epub_identifier = '' 294 | 295 | # A unique identification for the text. 296 | #epub_uid = '' 297 | 298 | # A tuple containing the cover image and cover page html template filenames. 299 | #epub_cover = () 300 | 301 | # A sequence of (type, uri, title) tuples for the guide element of content.opf. 302 | #epub_guide = () 303 | 304 | # HTML files that should be inserted before the pages created by sphinx. 305 | # The format is a list of tuples containing the path and title. 306 | #epub_pre_files = [] 307 | 308 | # HTML files shat should be inserted after the pages created by sphinx. 309 | # The format is a list of tuples containing the path and title. 310 | #epub_post_files = [] 311 | 312 | # A list of files that should not be packed into the epub file. 313 | epub_exclude_files = ['search.html'] 314 | 315 | # The depth of the table of contents in toc.ncx. 316 | #epub_tocdepth = 3 317 | 318 | # Allow duplicate toc entries. 319 | #epub_tocdup = True 320 | 321 | # Choose between 'default' and 'includehidden'. 322 | #epub_tocscope = 'default' 323 | 324 | # Fix unsupported image types using the PIL. 325 | #epub_fix_images = False 326 | 327 | # Scale large images. 328 | #epub_max_image_width = 0 329 | 330 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 331 | #epub_show_urls = 'inline' 332 | 333 | # If false, no index is generated. 334 | #epub_use_index = True 335 | -------------------------------------------------------------------------------- /docs/design.rst: -------------------------------------------------------------------------------- 1 | Diseño 2 | ============ 3 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. rpi-module documentation master file, created by 2 | sphinx-quickstart on Thu Dec 10 14:51:36 2015. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Proyecto Voyager 7 | ================ 8 | 9 | En sitio estara la documentacion, software y recursos audiovisuales asociados al Proyecto Voyager realizado en el curso de ingenieria del Software I y II. 10 | 11 | 12 | .. raw:: html 13 | 14 | 15 |
16 | 17 | *Voyager is an Arduino bot controlling from a web browser using Nodejs on Docker for Raspberry pi* 18 | 19 | ----------- 20 | 21 | 22 | Presentacion 23 | ------------ 24 | 25 | .. raw:: html 26 | 27 | 28 | 29 | Contenidos 30 | ---------- 31 | 32 | Los contenidos estan organizados desde un pequeña introduccion y justificacion del porque de este proyecto, seguido de una analisis de requerimientos formal para asi obtener la mejor arquitectura y diseño posible de tanto el software como el hardware que cumpla con el objetivo de este proyecto. 33 | 34 | 35 | .. toctree:: 36 | :maxdepth: 2 37 | 38 | introduccion 39 | objetivos 40 | justificacion 41 | requerimientos 42 | analisis 43 | arquitectura 44 | design 45 | mercury 46 | 47 | 48 | ----------- 49 | 50 | 51 | .. note:: 52 | 53 | La foto acontinuacion corresponde el primer prototipo con una placa de Ardunio MEGA 2560, una Raspberry Pi B+ con su camara, un sensor LM35 y puente H LN28N. La Rpi se conecta a la Wifi y se comunica con el Arduino via serial. 54 | 55 | |voyager| 56 | 57 | ---------- 58 | 59 | 60 | Configuracion inicial 61 | --------------------- 62 | 63 | Para empezar a desarrollar con este proyecto es neserio realizar una configuracion incial, y la conexion de los dispositivos de hardware. 64 | 65 | Acontinuacion la lista de dispositivos a utilizar y las dependencias de software 66 | 67 | Hardware 68 | -------- 69 | 70 | - Raspberry pi 71 | 72 | - Camera board 73 | - Usb Wifi dongle 74 | 75 | - Arduino 76 | 77 | - DC Motors 78 | - H bridge 79 | - Sensors 80 | 81 | Arquitectura 82 | ------------ 83 | 84 | Asi sera la conexion basica entre el Ardunio y la Raspberry pi, y la interaccion de las partes de software 85 | 86 | 87 | En la *Fig.1* podemos observar que la forma de comunicacion entre la reaspberry y el ardunio es via serial, utlizando una libreria de Nodejs llamada *serial port*. 88 | 89 | |arq1| 90 | 91 | En la *Fig.2* se utliiza un servidor HTTP basico de Express con Socket.io para escuchar eventos en el navegar en tiempo real utilizando Javascript. 92 | 93 | 94 | |arq2| 95 | 96 | 97 | 98 | 99 | 100 | Software 101 | -------- 102 | 103 | - Firmata (Arduino) 104 | - Nodejs 105 | 106 | - Jhonny-five 107 | - Socket.io 108 | 109 | Primeros pasos 110 | --------------- 111 | 112 | Lo primero que debemos hacer es hacerle un "flash" a la targeta de 113 | Ardunio con el protocolo *Firmata*. 114 | 115 | Para este experimeinto usamos una version modificada de Firmaata que funciona con sensores de proxomidad servor motor. 116 | 117 | 118 | 119 | En ``src/sketch.ino`` esta listo el archivo para subir a la placa. Para hacer esto utlizamos la herramienta de linea de comandos ``ino`` 120 | 121 | Instalar el Ardunio IDE 122 | ^^^^^^^^^^^^^^^^^^^^^^^ 123 | 124 | Lo podemos instalar con ``yum`` o ``apt-get``. 125 | 126 | .. code:: bash 127 | 128 | $ yum install arduino 129 | 130 | Instalar picocom 131 | ^^^^^^^^^^^^^^^ 132 | 133 | La herramienta de linea de comandos ``picocom`` nos ayudara con la comunicacion serial desde la Raspberry pi. 134 | 135 | 136 | 137 | .. code:: bash 138 | 139 | $ wget https://picocom.googlecode.com/files/picocom-1.7.tar.gz 140 | $ tar -xvzf picocom-1.7.tar.gz 141 | $ cd picocom-1.7 142 | $ sudo make 143 | $ sudo make install 144 | 145 | Una vez instaladas las depencias podemos ahora instalar ``ino`` usando 146 | ``pip`` o ``easy_install`` 147 | 148 | .. code:: bash 149 | 150 | $ pip install ino 151 | 152 | Configurando ino 153 | ^^^^^^^^^^^^^^^^^ 154 | 155 | Editamos el archivo ``ino.ini`` con las especificaciones de la placa de Ardunio y los puertos que usa. 156 | 157 | .. code:: yaml 158 | 159 | [build] 160 | board-model = mega2560 161 | 162 | [upload] 163 | board-model = mega2560 164 | serial-port = /dev/ttyACM0 165 | 166 | [serial] 167 | serial-port = /dev/ttyACM0 168 | 169 | Instalando el Protocolo Firmata 170 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 171 | 172 | Compilamos el archivo en ``src/sketch.ino`` utlizando ino. 173 | 174 | .. code:: bash 175 | 176 | $ ino build 177 | 178 | y lo subimos a la placa. 179 | 180 | .. code:: bash 181 | 182 | $ ino upload 183 | 184 | Instalando las dependencias NPM 185 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 186 | 187 | Ahora que la placa de Arduino esta lista, podemos utulizar Nodejs con Jhonny-five. 188 | 189 | Debemos asegurarnos que este instalado Nodejs y npm en la Raspberry pi. 190 | 191 | 192 | .. code:: bash 193 | 194 | $ npm install 195 | 196 | Luego que termine la instalacion, conectamos el Ardunio a la Raspberry pi, corremos la app: 197 | 198 | .. code:: bash 199 | 200 | $ node app.js 201 | 202 | Observaremos lo siguiente: 203 | 204 | .. figure:: http://40.media.tumblr.com/e41ff9a259a2eafafe7774530c9debdd/tumblr_nr50tvIen01tp6kj3o1_r1_500.png 205 | :alt: 206 | 207 | Servidor y cliente 208 | ^^^^^^^^^^^^^^^^^^ 209 | 210 | Configuramos un servidor HTTP en ``app.js`` 211 | 212 | .. code:: js 213 | 214 | app.listen(8000, function () { 215 | console.log('Http server listening on port %d', 8000); 216 | }); 217 | 218 | Con eso podremos acceder desde el navegador al cliente Socket. 219 | 220 | 221 | Para manejar eventos utilizamos jQuery y keypress con la finalidad de detectar cuando una tecla es presionada y hacer un ``socket emit``, asi: 222 | 223 | .. code:: js 224 | 225 | "keys": "up", 226 | "on_keydown": function() { 227 | console.log("Client: Going forward"); 228 | socket.emit('goForward'); 229 | 230 | Del lado del servidor escuchamos este emit utilizando ``socket on`` 231 | 232 | .. code:: js 233 | 234 | socket.on('goForward', function(){ 235 | console.log("Server: Going forward! "); 236 | // Do something 237 | }); 238 | 239 | 240 | Running in a Docker container 241 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 242 | 243 | Los contenedores son una muy buena idea para los proyectos de la Iot porque podemos 244 | aislar a nuestra aplicación en un nivel de kernel y eso significa portabilidad en cualquier plataforma que soporte Docker, esto garantiza un despliegue rápido de aplicaciones, algo que es crucial para 245 | proyectos de Iot. 246 | 247 | Pero Docker, que es un estándar de facto, no es compatible con ARM. 248 | Asi que aun no es complatible con Raspberry Pi, afortunadamente, algunos hackers han modificado una Distro 249 | De Raspberry Pi, que llamaron `Hypriot`_. 250 | 251 | Para esto instalamos Hypriot de esta `guia`_ 252 | 253 | Nos logeamos a la Rasberry pi. 254 | 255 | Clonamos el repo 256 | 257 | .. code:: bash 258 | 259 | $ git clone https://github.com/juliocesar-io/voyager-bot.git 260 | 261 | :: 262 | 263 | cd voyager-bot 264 | 265 | Compilamos la imagen 266 | 267 | :: 268 | 269 | $ docker build -t . 270 | 271 | Conectamos el Ardunio(Con Firmata ) a la Raspberry pi. 272 | 273 | 274 | 275 | Ejecutamos el contenedor. 276 | 277 | :: 278 | 279 | $ docker run --device=/dev/ttyACM0 280 | 281 | Es importante definir buen el puerto con el flag ``--device=/dev/ttyACM0``, si no sabemos el puerto podemos consultarlo con 282 | ``lsusb``. 283 | 284 | Vamos al navegador y probamos que todo funcione en ``http://:3000`` 285 | 286 | 287 | .. _Hypriot: http://blog.hypriot.com/downloads/ 288 | .. _guia: 289 | 290 | .. |green| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat 291 | 292 | .. |voyager| image:: _static/voyager.jpg 293 | 294 | .. |arq1| image:: _static/1.1.png 295 | 296 | .. |arq2| image:: _static/2.1.png 297 | -------------------------------------------------------------------------------- /docs/introduccion.rst: -------------------------------------------------------------------------------- 1 | Introduccion 2 | ============ 3 | 4 | Technology is just one of many disruptive inluences in education today. We live in an era where the wealth of data and the exponential growth in the development of new 5 | knowledge is challenging institutions to rethink teaching 6 | and learning in a global market. - Cisco (2013) 7 | 8 | 9 | .. image:: _static/cisco.png 10 | 11 | 12 | As more people adopt new technologies for learning, they will thrive in the emerging world of the Internet of Everything (IoE)—the networked connection of people, process, data, and things—which is becoming the basis for the Internet of Learning Things 13 | -------------------------------------------------------------------------------- /docs/justificacion.rst: -------------------------------------------------------------------------------- 1 | Justificacion 2 | ============= 3 | 4 | 5 | ¿ Cómo construir un prototipo de un robot que pueda ser controlado desde Internet utilizando hardware de bajo coste que apoye la creciente necesidad de aprendizaje en el campo del Internet de las cosas* en las universidades? 6 | 7 | La tecnología avanza mucha mas rápido que lo que un programa de universidad puede, en el caso del software es mucho más evidente este avance, pero en lo últimos 2 años el Hardware ha sido protagonista con el surgimiento del movimiento Open Hardware y su enfoque académico con las plataformas como Arduino, Raspberry Pi, Intel Edison. Etc. Además en el mundo de la industria logística y los gatgets la internet de las cosas es tendencia y se estima que para 2017 el mercado sea ade aprox 17 Billones de dolares. 8 | 9 | Por esta razón se hace necesario empezar proyectos de desarrollo de software enfocados al control del hardware, los sistemas tradicionales transaccionales han estado por años, ahora es el turno donde los sistemas pueden producir datos y responder en tiempo real a las demandas actuales de soluciones eficientes para ciudades, personas, hogares, empresas. 10 | 11 | Lo anterior se justifica bajo las siguientes premisas; 12 | 13 | - Micro-controladores y sensores pequeños y baratos 14 | - Nuevas herramientas de software 15 | - La comunidad open source/hardware ha estado bastante activa los últimos años. 16 | - La Internet de las cosas es tendencia 17 | -------------------------------------------------------------------------------- /docs/mercury.rst: -------------------------------------------------------------------------------- 1 | Mercury robot challenge 2016 2 | ============================ 3 | 4 | **Voyager** Technical Document 5 | 6 | |logo| 7 | 8 | ------ 9 | 10 | **Team** 11 | 12 | * Julio Cesar Castellanos - julio.castellanosa@campusucc.edu.co 13 | * Ivan Dario - ivan.ortizp@campusucc.edu.co 14 | * Rafael Vergara - Rafael.vergarah@campusucc.edu.co 15 | * Luis Villadiego - luis.villadiego@campusucc.edu.co 16 | 17 | 18 | Summary 19 | ------- 20 | 21 | This technical document describes the creation and specs of a remotely controlled robot. The Robot "Voyager" 22 | was designed and built to meet the requirements of the Oklahoma State University Mercury 23 | Robotics competition for 2016 in Bogota, Colombia. 24 | 25 | 26 | High­level block diagram 27 | ----------------------- 28 | 29 | |dia| 30 | 31 | 32 | Communication 33 | ------------- 34 | 35 | The microcontroller will be conecte via serial to the raspberry pi, on the raspberry we use a Nodejs library in order to expose a real time socket web based server. 36 | For handle browser events we use jQuery and keypress in order to detect when a key is pressed then and do a socket emit. 37 | 38 | 39 | Main board 40 | ---------- 41 | 42 | The robot uses the Raspberri pi B+ as the principal board, this board allow the commnincation to a higer level user application using a Sockect TCP server. It is attached direclty to the microcontroller via serial USB port. 43 | 44 | 45 | Video feedback 46 | -------------- 47 | 48 | The robot has a camera module attached to the raspberry pi, we expose this camera thougth a UDP video stream server. 49 | 50 | 51 | Cotroller interface 52 | ------------------- 53 | 54 | We have a web based interface using HTML,CSS and Javascript to handle browser events. 55 | 56 | Drive train 57 | ----------- 58 | 59 | The robot has one motor per side, each running a tread through a gearbox with an encoder. 60 | 61 | Subsystems 62 | ---------- 63 | The robot has two Ultrasonic sensors...... 64 | 65 | Power 66 | ----- 67 | The robot has a 7.2[V] standard 3000[mAh] NiMH battery. 68 | 69 | 70 | 71 | .. |logo| image:: _static/logo.png 72 | 73 | .. |dia| image:: _static/dia.png 74 | -------------------------------------------------------------------------------- /docs/objetivos.rst: -------------------------------------------------------------------------------- 1 | Objetivos 2 | ============= 3 | 4 | 5 | General 6 | ------- 7 | 8 | - Desarrollar un apliacion (WEB) que permita manipular un microcontrolador arduido y raspberry por medio de una interfaz de facil manejo y compatible con varios modelos de estos. 9 | 10 | 11 | Especificos 12 | ----------- 13 | 14 | - Prototipar hardware utilizando Arduino que permita comunicación serial en tiempo real utilizando el protocolo firmata y lectura de sensores. 15 | 16 | - Codificar una aplicación que reciba peticiones HTTPvia web socket y las transforme a señales digitales utilizando Nodejs con la libreria Jhonny five. 17 | 18 | - Desplegar la aplicación en un container de Linux(LXC) compatible con ARM utilizando Docker bajo una Raspberry pi B+ 2 que permita comunicación serial con un Arduino e integre periféricos. 19 | 20 | - Diseñar una interfaz web que capte los eventos del navegador para controlar el robot y presente información en streaming de sensores y/o periféricos. 21 | -------------------------------------------------------------------------------- /docs/requerimientos.rst: -------------------------------------------------------------------------------- 1 | Requerimientos 2 | ============== 3 | 4 | 5 | 1. Configuracion 6 | ---------------- 7 | 8 | 9 | **1.1.** Los parámetros se deberán ajustar. El sistema deberá permitir configurar los parámetros de el respectivo microcontrolador. 10 | 11 | **1.2.** Debe restringirse el acceso al control remote de robot con un usuario y una contraseña via web 12 | 13 | **1.3.** Debe existir un sito de configuración para definir lo puertos web, usb, direccion ip, configuracion de interfaz de red. 14 | 15 | **1.4.** Listar direcciones MAC de los dipositivos utlizados 16 | 17 | 18 | 2. Funciones y control 19 | ---------------------- 20 | 21 | 22 | **2.1.** Los movimientos deben poder controlarse desde cualquier parte. Estos deberán poder controlarse desde cualquier lugar, por medio de eventos del navegador via internet. 23 | 24 | **2.2.** Estado de la batería del dispotivio 25 | 26 | **2.3.** Streaming de video en una interfaz web. 27 | 28 | **2.4.** Control del dispositivo desde el navegar utilizando eventos del teclado, movimiento (izquierda, derecha, adelante, atrás), movimiento de la camara 360. 29 | 30 | **2.5.** Motricidad en cualquier direccion. Generara movimientos en cualquier direccion usando las teclas de direccion de los equipos. 31 | 32 | **2.6.** Si existe mas de un usuario controlador, mostrar el número de conexiones. 33 | 34 | **2.7.** Almacenar en una base de datos el recorrido del robot. 35 | 36 | 37 | 3. Altertas y notificaciones, referecias 38 | ---------------------------------------- 39 | 40 | 41 | **3.1.** Debe producirse una alerta cuando se pierda la conexión o la batería esté baja. 42 | 43 | **3.2.** Debe permitir configurar alertas basado en lecturas de sensores (proximidad, temperatura, humedad etc.) 44 | 45 | **3.3.** Los elementos del arduino deberán ser referenciados. El sistema deberá visualizar la respectiva referencia de cada componente Arduino. 46 | 47 | **3.4.** Los componentes del Rapsberry Pi serán referenciados. El sistema deberá visualizar la correspondiente referencia de cada componente rapsberry. 48 | -------------------------------------------------------------------------------- /img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/img/logo.png -------------------------------------------------------------------------------- /img/tex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/img/tex.jpg -------------------------------------------------------------------------------- /img/volume-empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/img/volume-empty.png -------------------------------------------------------------------------------- /img/volume-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/img/volume-full.png -------------------------------------------------------------------------------- /img/volume-knob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/img/volume-knob.png -------------------------------------------------------------------------------- /ino.ini: -------------------------------------------------------------------------------- 1 | [build] 2 | board-model = mega2560 3 | 4 | [upload] 5 | board-model = mega2560 6 | serial-port = /dev/cu.usbmodem1421 7 | 8 | [serial] 9 | serial-port = /dev/cu.usbmodem1421 10 | -------------------------------------------------------------------------------- /interstellar.js: -------------------------------------------------------------------------------- 1 | var socket = io.connect(); 2 | $("#volume").slider({ 3 | min: 0, 4 | max: 255, 5 | value: 127, 6 | range: "min", 7 | animate: true, 8 | slide: function(event, ui) { 9 | speed = ui.value; 10 | console.log((speed)); 11 | $("#speed").text(speed) 12 | if (speed = 255) { 13 | 14 | } else { 15 | socket.emit('vel', speed); 16 | } 17 | 18 | } 19 | }); 20 | -------------------------------------------------------------------------------- /lib/.holder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/lib/.holder -------------------------------------------------------------------------------- /lib/Firmata/Firmata.h: -------------------------------------------------------------------------------- 1 | /* 2 | Firmata.h - Firmata library v2.4.3 - 2015-4-11 3 | Copyright (C) 2006-2008 Hans-Christoph Steiner. All rights reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | See file LICENSE.txt for further informations on licensing terms. 11 | */ 12 | 13 | #ifndef Firmata_h 14 | #define Firmata_h 15 | 16 | #include "Boards.h" /* Hardware Abstraction Layer + Wiring/Arduino */ 17 | 18 | /* Version numbers for the protocol. The protocol is still changing, so these 19 | * version numbers are important. This number can be queried so that host 20 | * software can test whether it will be compatible with the currently 21 | * installed firmware. */ 22 | #define FIRMATA_MAJOR_VERSION 2 // for non-compatible changes 23 | #define FIRMATA_MINOR_VERSION 4 // for backwards compatible changes 24 | #define FIRMATA_BUGFIX_VERSION 3 // for bugfix releases 25 | 26 | #define MAX_DATA_BYTES 64 // max number of data bytes in incoming messages 27 | 28 | // message command bytes (128-255/0x80-0xFF) 29 | #define DIGITAL_MESSAGE 0x90 // send data for a digital pin 30 | #define ANALOG_MESSAGE 0xE0 // send data for an analog pin (or PWM) 31 | #define REPORT_ANALOG 0xC0 // enable analog input by pin # 32 | #define REPORT_DIGITAL 0xD0 // enable digital input by port pair 33 | // 34 | #define SET_PIN_MODE 0xF4 // set a pin to INPUT/OUTPUT/PWM/etc 35 | // 36 | #define REPORT_VERSION 0xF9 // report protocol version 37 | #define SYSTEM_RESET 0xFF // reset from MIDI 38 | // 39 | #define START_SYSEX 0xF0 // start a MIDI Sysex message 40 | #define END_SYSEX 0xF7 // end a MIDI Sysex message 41 | 42 | // extended command set using sysex (0-127/0x00-0x7F) 43 | /* 0x00-0x0F reserved for user-defined commands */ 44 | #define ENCODER_DATA 0x61 // reply with encoders current positions 45 | #define SERVO_CONFIG 0x70 // set max angle, minPulse, maxPulse, freq 46 | #define STRING_DATA 0x71 // a string message with 14-bits per char 47 | #define STEPPER_DATA 0x72 // control a stepper motor 48 | #define ONEWIRE_DATA 0x73 // send an OneWire read/write/reset/select/skip/search request 49 | #define SHIFT_DATA 0x75 // a bitstream to/from a shift register 50 | #define I2C_REQUEST 0x76 // send an I2C read/write request 51 | #define I2C_REPLY 0x77 // a reply to an I2C read request 52 | #define I2C_CONFIG 0x78 // config I2C settings such as delay times and power pins 53 | #define EXTENDED_ANALOG 0x6F // analog write (PWM, Servo, etc) to any pin 54 | #define PIN_STATE_QUERY 0x6D // ask for a pin's current mode and value 55 | #define PIN_STATE_RESPONSE 0x6E // reply with pin's current mode and value 56 | #define CAPABILITY_QUERY 0x6B // ask for supported modes and resolution of all pins 57 | #define CAPABILITY_RESPONSE 0x6C // reply with supported modes and resolution 58 | #define ANALOG_MAPPING_QUERY 0x69 // ask for mapping of analog to pin numbers 59 | #define ANALOG_MAPPING_RESPONSE 0x6A // reply with mapping info 60 | #define REPORT_FIRMWARE 0x79 // report name and version of the firmware 61 | #define SAMPLING_INTERVAL 0x7A // set the poll rate of the main loop 62 | #define SCHEDULER_DATA 0x7B // send a createtask/deletetask/addtotask/schedule/querytasks/querytask request to the scheduler 63 | #define SYSEX_NON_REALTIME 0x7E // MIDI Reserved for non-realtime messages 64 | #define SYSEX_REALTIME 0x7F // MIDI Reserved for realtime messages 65 | // these are DEPRECATED to make the naming more consistent 66 | #define FIRMATA_STRING 0x71 // same as STRING_DATA 67 | #define SYSEX_I2C_REQUEST 0x76 // same as I2C_REQUEST 68 | #define SYSEX_I2C_REPLY 0x77 // same as I2C_REPLY 69 | #define SYSEX_SAMPLING_INTERVAL 0x7A // same as SAMPLING_INTERVAL 70 | 71 | // pin modes 72 | //#define INPUT 0x00 // defined in wiring.h 73 | //#define OUTPUT 0x01 // defined in wiring.h 74 | #define ANALOG 0x02 // analog pin in analogInput mode 75 | #define PWM 0x03 // digital pin in PWM output mode 76 | #define SERVO 0x04 // digital pin in Servo output mode 77 | #define SHIFT 0x05 // shiftIn/shiftOut mode 78 | #define I2C 0x06 // pin included in I2C setup 79 | #define ONEWIRE 0x07 // pin configured for 1-wire 80 | #define STEPPER 0x08 // pin configured for stepper motor 81 | #define ENCODER 0x09 // pin configured for rotary encoders 82 | #define IGNORE 0x7F // pin configured to be ignored by digitalWrite and capabilityResponse 83 | #define TOTAL_PIN_MODES 11 84 | 85 | extern "C" { 86 | // callback function types 87 | typedef void (*callbackFunction)(byte, int); 88 | typedef void (*systemResetCallbackFunction)(void); 89 | typedef void (*stringCallbackFunction)(char *); 90 | typedef void (*sysexCallbackFunction)(byte command, byte argc, byte *argv); 91 | } 92 | 93 | 94 | // TODO make it a subclass of a generic Serial/Stream base class 95 | class FirmataClass 96 | { 97 | public: 98 | FirmataClass(); 99 | /* Arduino constructors */ 100 | void begin(); 101 | void begin(long); 102 | void begin(Stream &s); 103 | /* querying functions */ 104 | void printVersion(void); 105 | void blinkVersion(void); 106 | void printFirmwareVersion(void); 107 | //void setFirmwareVersion(byte major, byte minor); // see macro below 108 | void setFirmwareNameAndVersion(const char *name, byte major, byte minor); 109 | /* serial receive handling */ 110 | int available(void); 111 | void processInput(void); 112 | /* serial send handling */ 113 | void sendAnalog(byte pin, int value); 114 | void sendDigital(byte pin, int value); // TODO implement this 115 | void sendDigitalPort(byte portNumber, int portData); 116 | void sendString(const char *string); 117 | void sendString(byte command, const char *string); 118 | void sendSysex(byte command, byte bytec, byte *bytev); 119 | void write(byte c); 120 | /* attach & detach callback functions to messages */ 121 | void attach(byte command, callbackFunction newFunction); 122 | void attach(byte command, systemResetCallbackFunction newFunction); 123 | void attach(byte command, stringCallbackFunction newFunction); 124 | void attach(byte command, sysexCallbackFunction newFunction); 125 | void detach(byte command); 126 | 127 | /* utility methods */ 128 | void sendValueAsTwo7bitBytes(int value); 129 | void startSysex(void); 130 | void endSysex(void); 131 | 132 | private: 133 | Stream *FirmataStream; 134 | /* firmware name and version */ 135 | byte firmwareVersionCount; 136 | byte *firmwareVersionVector; 137 | /* input message handling */ 138 | byte waitForData; // this flag says the next serial input will be data 139 | byte executeMultiByteCommand; // execute this after getting multi-byte data 140 | byte multiByteChannel; // channel data for multiByteCommands 141 | byte storedInputData[MAX_DATA_BYTES]; // multi-byte data 142 | /* sysex */ 143 | boolean parsingSysex; 144 | int sysexBytesRead; 145 | /* callback functions */ 146 | callbackFunction currentAnalogCallback; 147 | callbackFunction currentDigitalCallback; 148 | callbackFunction currentReportAnalogCallback; 149 | callbackFunction currentReportDigitalCallback; 150 | callbackFunction currentPinModeCallback; 151 | systemResetCallbackFunction currentSystemResetCallback; 152 | stringCallbackFunction currentStringCallback; 153 | sysexCallbackFunction currentSysexCallback; 154 | 155 | /* private methods ------------------------------ */ 156 | void processSysexMessage(void); 157 | void systemReset(void); 158 | void strobeBlinkPin(int count, int onInterval, int offInterval); 159 | }; 160 | 161 | extern FirmataClass Firmata; 162 | 163 | /*============================================================================== 164 | * MACROS 165 | *============================================================================*/ 166 | 167 | /* shortcut for setFirmwareNameAndVersion() that uses __FILE__ to set the 168 | * firmware name. It needs to be a macro so that __FILE__ is included in the 169 | * firmware source file rather than the library source file. 170 | */ 171 | #define setFirmwareVersion(x, y) setFirmwareNameAndVersion(__FILE__, x, y) 172 | 173 | #endif /* Firmata_h */ 174 | -------------------------------------------------------------------------------- /lib/Firmata/utility/EthernetClientStream.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | EthernetClientStream.cpp 3 | An Arduino-Stream that wraps an instance of Client reconnecting to 4 | the remote-ip in a transparent way. A disconnected client may be 5 | recognized by the returnvalues -1 from calls to peek or read and 6 | a 0 from calls to write. 7 | 8 | Copyright (C) 2013 Norbert Truchsess. All rights reserved. 9 | 10 | This library is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU Lesser General Public 12 | License as published by the Free Software Foundation; either 13 | version 2.1 of the License, or (at your option) any later version. 14 | 15 | See file LICENSE.txt for further informations on licensing terms. 16 | 17 | formatted using the GNU C formatting and indenting 18 | */ 19 | 20 | #include "EthernetClientStream.h" 21 | #include 22 | 23 | //#define SERIAL_DEBUG 24 | #include "firmataDebug.h" 25 | 26 | #define MILLIS_RECONNECT 5000 27 | 28 | EthernetClientStream::EthernetClientStream(Client &client, IPAddress localip, IPAddress ip, const char* host, uint16_t port) 29 | : ip(ip), 30 | host(host), 31 | port(port), 32 | connected(false), 33 | client(client), 34 | localip(localip) 35 | { 36 | } 37 | 38 | int 39 | EthernetClientStream::available() 40 | { 41 | return maintain() ? client.available() : 0; 42 | } 43 | 44 | int 45 | EthernetClientStream::read() 46 | { 47 | return maintain() ? client.read() : -1; 48 | } 49 | 50 | int 51 | EthernetClientStream::peek() 52 | { 53 | return maintain() ? client.peek() : -1; 54 | } 55 | 56 | void EthernetClientStream::flush() 57 | { 58 | if (maintain()) 59 | client.flush(); 60 | } 61 | 62 | size_t 63 | EthernetClientStream::write(uint8_t c) 64 | { 65 | return maintain() ? client.write(c) : 0; 66 | } 67 | 68 | void 69 | EthernetClientStream::maintain(IPAddress localip) 70 | { 71 | if (this->localip!=localip) 72 | { 73 | this->localip = localip; 74 | if (connected) 75 | stop(); 76 | } 77 | } 78 | 79 | void 80 | EthernetClientStream::stop() 81 | { 82 | client.stop(); 83 | connected = false; 84 | time_connect = millis(); 85 | } 86 | 87 | bool 88 | EthernetClientStream::maintain() 89 | { 90 | if (client && client.connected()) 91 | return true; 92 | 93 | if (connected) 94 | { 95 | stop(); 96 | } 97 | else if (millis()-time_connect >= MILLIS_RECONNECT) 98 | { 99 | connected = host ? client.connect(host,port) : client.connect(ip,port); 100 | if (!connected) { 101 | time_connect = millis(); 102 | DEBUG_PRINTLN("connection failed"); 103 | } else { 104 | DEBUG_PRINTLN("connected"); 105 | } 106 | } 107 | return connected; 108 | } 109 | -------------------------------------------------------------------------------- /lib/Firmata/utility/EthernetClientStream.h: -------------------------------------------------------------------------------- 1 | /* 2 | EthernetClientStream.h 3 | An Arduino-Stream that wraps an instance of Client reconnecting to 4 | the remote-ip in a transparent way. A disconnected client may be 5 | recognized by the returnvalues -1 from calls to peek or read and 6 | a 0 from calls to write. 7 | 8 | Copyright (C) 2013 Norbert Truchsess. All rights reserved. 9 | 10 | This library is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU Lesser General Public 12 | License as published by the Free Software Foundation; either 13 | version 2.1 of the License, or (at your option) any later version. 14 | 15 | See file LICENSE.txt for further informations on licensing terms. 16 | 17 | formatted using the GNU C formatting and indenting 18 | */ 19 | 20 | #ifndef ETHERNETCLIENTSTREAM_H 21 | #define ETHERNETCLIENTSTREAM_H 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | class EthernetClientStream : public Stream 30 | { 31 | public: 32 | EthernetClientStream(Client &client, IPAddress localip, IPAddress ip, const char* host, uint16_t port); 33 | int available(); 34 | int read(); 35 | int peek(); 36 | void flush(); 37 | size_t write(uint8_t); 38 | void maintain(IPAddress localip); 39 | 40 | private: 41 | IPAddress localip; 42 | IPAddress ip; 43 | const char* host; 44 | uint16_t port; 45 | Client &client; 46 | bool connected; 47 | uint32_t time_connect; 48 | bool maintain(); 49 | void stop(); 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /lib/Firmata/utility/FirmataStepper.h: -------------------------------------------------------------------------------- 1 | /* 2 | FirmataStepper is a simple non-blocking stepper motor library 3 | for 2 and 4 wire bipolar and unipolar stepper motor drive circuits 4 | as well as EasyDriver (http://schmalzhaus.com/EasyDriver/) and 5 | other step + direction drive circuits. 6 | 7 | FirmataStepper (0.1) by Jeff Hoefs 8 | 9 | EasyDriver support based on modifications by Chris Coleman 10 | 11 | Acceleration / Deceleration algorithms and code based on: 12 | app note: http://www.atmel.com/dyn/resources/prod_documents/doc8017.pdf 13 | source code: http://www.atmel.com/dyn/resources/prod_documents/AVR446.zip 14 | 15 | stepMotor function based on Stepper.cpp Stepper library for 16 | Wiring/Arduino created by Tom Igoe, Sebastian Gassner 17 | David Mellis and Noah Shibley. 18 | 19 | Relevant notes from Stepper.cpp: 20 | 21 | When wiring multiple stepper motors to a microcontroller, 22 | you quickly run out of output pins, with each motor requiring 4 connections. 23 | 24 | By making use of the fact that at any time two of the four motor 25 | coils are the inverse of the other two, the number of 26 | control connections can be reduced from 4 to 2. 27 | 28 | A slightly modified circuit around a Darlington transistor array or an L293 H-bridge 29 | connects to only 2 microcontroler pins, inverts the signals received, 30 | and delivers the 4 (2 plus 2 inverted ones) output signals required 31 | for driving a stepper motor. 32 | 33 | The sequence of control signals for 4 control wires is as follows: 34 | 35 | Step C0 C1 C2 C3 36 | 1 1 0 1 0 37 | 2 0 1 1 0 38 | 3 0 1 0 1 39 | 4 1 0 0 1 40 | 41 | The sequence of controls signals for 2 control wires is as follows 42 | (columns C1 and C2 from above): 43 | 44 | Step C0 C1 45 | 1 0 1 46 | 2 1 1 47 | 3 1 0 48 | 4 0 0 49 | 50 | The circuits can be found at 51 | http://www.arduino.cc/en/Tutorial/Stepper 52 | */ 53 | 54 | // ensure this library description is only included once 55 | #ifndef FirmataStepper_h 56 | #define FirmataStepper_h 57 | 58 | #if defined(ARDUINO) && ARDUINO >= 100 59 | #include "Arduino.h" 60 | #else 61 | #include "WProgram.h" 62 | #endif 63 | 64 | #define PI_2 2*3.14159 65 | #define T1_FREQ 1000000L // provides the most accurate step delay values 66 | #define T1_FREQ_148 ((long)((T1_FREQ*0.676)/100)) // divided by 100 and scaled by 0.676 67 | 68 | // library interface description 69 | class FirmataStepper { 70 | public: 71 | FirmataStepper(byte interface = FirmataStepper::DRIVER, 72 | int steps_per_rev = 200, 73 | byte pin1 = 2, 74 | byte pin2 = 3, 75 | byte pin3 = 3, 76 | byte pin4 = 4); 77 | 78 | enum Interface { 79 | DRIVER = 1, 80 | TWO_WIRE = 2, 81 | FOUR_WIRE = 4 82 | }; 83 | 84 | enum RunState { 85 | STOP = 0, 86 | ACCEL = 1, 87 | DECEL = 2, 88 | RUN = 3 89 | }; 90 | 91 | enum Direction { 92 | CCW = 0, 93 | CW = 1 94 | }; 95 | 96 | void setStepsToMove(long steps_to_move, int speed, int accel=0, int decel=0); 97 | 98 | // update the stepper position 99 | bool update(); 100 | 101 | byte version(void); 102 | 103 | private: 104 | void stepMotor(byte step_num, byte direction); 105 | void updateStepPosition(); 106 | bool running; 107 | byte interface; // Type of interface: DRIVER, TWO_WIRE or FOUR_WIRE 108 | byte direction; // Direction of rotation 109 | unsigned long step_delay; // delay between steps, in microseconds 110 | int steps_per_rev; // number of steps to make one revolution 111 | long step_number; // which step the motor is on 112 | long steps_to_move; // total number of teps to move 113 | 114 | byte run_state; 115 | int accel_count; 116 | long min_delay; 117 | long decel_start; 118 | int decel_val; 119 | 120 | long lastAccelDelay; 121 | unsigned long stepCount; 122 | unsigned int rest; 123 | 124 | float alpha; // PI * 2 / steps_per_rev 125 | long at_x100; // alpha * T1_FREQ * 100 126 | long ax20000; // alph a* 20000 127 | float alpha_x2; // alpha * 2 128 | 129 | // motor pin numbers: 130 | byte dir_pin; 131 | byte step_pin; 132 | byte motor_pin_1; 133 | byte motor_pin_2; 134 | byte motor_pin_3; 135 | byte motor_pin_4; 136 | 137 | unsigned long last_step_time; // time stamp in microseconds of when the last step was taken 138 | }; 139 | 140 | #endif 141 | 142 | -------------------------------------------------------------------------------- /lib/Firmata/utility/firmataDebug.h: -------------------------------------------------------------------------------- 1 | #ifndef FIRMATA_DEBUG_H 2 | #define FIRMATA_DEBUG_H 3 | 4 | #ifdef SERIAL_DEBUG 5 | #define DEBUG_BEGIN(baud) Serial.begin(baud); while(!Serial) {;} 6 | #define DEBUG_PRINTLN(x) Serial.println (x) 7 | #define DEBUG_PRINT(x) Serial.print (x) 8 | #else 9 | #define DEBUG_BEGIN(baud) 10 | #define DEBUG_PRINTLN(x) 11 | #define DEBUG_PRINT(x) 12 | #endif 13 | 14 | #endif /* FIRMATA_DEBUG_H */ 15 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "voyager-bot", 3 | "version": "0.0.0", 4 | "description": "A cam-streaming carbot controlling from a web browser using socket.io & J5", 5 | "main": "app.js", 6 | "scripts": { 7 | "test": "test" 8 | }, 9 | "author": "Julio César", 10 | "license": "BSD", 11 | "dependencies": { 12 | "express": "^4.13.4", 13 | "express-stormpath": "^3.1.2", 14 | "johnny-five": "~0.8.85", 15 | "socket.io": "~1.3.5" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "https://github.com/juliocesar-io/voyager-bot.git" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /servo.js: -------------------------------------------------------------------------------- 1 | var five = require("johnny-five"); 2 | var board = new five.Board(); 3 | 4 | board.on("ready", function() { 5 | 6 | var servo = new five.Servo({ 7 | pin: 10, 8 | startAt: 70 9 | }); 10 | 11 | // Angle change takes 500ms to complete 12 | servo.to(70, 50); 13 | 14 | setTimeout(function() { 15 | servo.to(170, 50); 16 | }, 3000); 17 | 18 | 19 | }); 20 | -------------------------------------------------------------------------------- /status.css: -------------------------------------------------------------------------------- 1 | 2 | body{ 3 | padding: 100px 120px 0 120px; 4 | background: url("https://juliocesar.io/voyager_static/img/tex.jpg"); 5 | background-size: cover; 6 | } 7 | 8 | .keys { 9 | 10 | top: 0; 11 | bottom: 0; 12 | left: 0; 13 | right: 0; 14 | margin: auto; 15 | text-align: center; 16 | line-height: 8rem; 17 | height: 16rem; 18 | } 19 | 20 | .keys div { 21 | 22 | display: inline-block; 23 | margin: 0 0.5rem; 24 | height: 4rem; 25 | width: 4rem; 26 | line-height: 3.6rem; 27 | text-align: center; 28 | vertical-align: bottom; 29 | color: white; 30 | border-style: solid; 31 | border-width: 0.4rem 0.45rem 0.6rem; 32 | border-radius: 0.8rem; 33 | border-color: #eee #858585 #424242 #212121; 34 | background: #2b2728; 35 | -moz-transition: all 80ms ease; 36 | -o-transition: all 80ms ease; 37 | -webkit-transition: all 80ms ease; 38 | transition: all 80ms ease; 39 | } 40 | 41 | .keys .pressed { 42 | border-bottom-width: 0.5rem; 43 | text-shadow: 0 0 10px #23aadf; 44 | color: #23aadf; 45 | } 46 | 47 | .key-wrapper { 48 | position: relative; 49 | 50 | } 51 | 52 | .row {text-align: center;} 53 | 54 | .key { 55 | margin: 3px 1px; 56 | width: 50px; 57 | height: 50px; 58 | border: 2px solid #333; 59 | border-radius: 5px; 60 | display: inline-block; 61 | line-height: 52px; 62 | text-align: center; 63 | text-transform: uppercase; 64 | -webkit-transition: .5s; 65 | -moz-transition: .5s; 66 | -o-transition: .5s; 67 | -ms-transition: .5s; 68 | transition: .5s; 69 | } 70 | 71 | .k32 { 72 | width: 330px; 73 | } 74 | .k16 { 75 | width: 80px; 76 | } 77 | 78 | .active { 79 | border: 2px solid #23aadf; 80 | color: #23aadf; 81 | -webkit-transition: 0s; 82 | -moz-transition: 0s; 83 | -ms-transition: 0s; 84 | transition: 0s; 85 | } 86 | 87 | .menu { 88 | float: left; 89 | position: absolute;; 90 | text-align: left; 91 | top:150px; 92 | } 93 | 94 | .status-bar { 95 | float: right; 96 | position: relative; 97 | top:-200px; 98 | margin-right: 20px; 99 | text-align: left; 100 | } 101 | .menu li { 102 | list-style: none; 103 | text-align: left; 104 | } 105 | .panel { 106 | background: white; 107 | opacity: 0.95; 108 | } 109 | #player { 110 | width: 350px; 111 | height: 50px; 112 | position: relative; 113 | margin: 0 auto; 114 | 115 | top: 10px; 116 | } 117 | 118 | #volume { 119 | position: absolute; 120 | left: 24px; 121 | margin: 0 auto; 122 | height:15px; 123 | width: 300px; 124 | background: url('https://juliocesar.io/voyager_static/img/volume-empty.png') no-repeat left top; 125 | border: none; 126 | outline: none; 127 | } 128 | 129 | #volume .ui-slider-range-min { 130 | height:15px; 131 | width: 300px; 132 | position: absolute; 133 | background: url('https://juliocesar.io/voyager_static/img/volume-full.png') no-repeat left top; 134 | border: none; 135 | outline: none; 136 | } 137 | 138 | #volume .ui-slider-handle { 139 | width: 38px; 140 | height:39px; 141 | background: url('https://juliocesar.io/voyager_static/img/volume-knob.png') no-repeat left top; 142 | position: absolute; 143 | margin-left: -15px; 144 | cursor: pointer; 145 | outline: none; 146 | border: none; 147 | top: -40%; 148 | } 149 | -------------------------------------------------------------------------------- /stream/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juliocesar-io/voyager-bot/14b0fb40b9b642134e03110769a8b56170b70fee/stream/.gitkeep --------------------------------------------------------------------------------