Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:distancelab:wirelessprogram [2012/03/30 17:18] – created illoen:distancelab:wirelessprogram [2020/07/20 12:00] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Wireless programming ======
 +The technical solution description and a user manual for wireless programming of Distance Lab.
 +===== Quick Guide =====
 +
 +**The Robot**
 +  * Load Wireless_bootloader with a program called HapyJTAG2
 +  * Check FuseBits –if Boot vector is enabled 
 +  * Fusebits: 90 F7
 +  * Check configuration of the XBee\\
 +
 +**Distancelab Server **
 +\\
 +\\
 +Loading the code:
 +<code>
 +./robocop -r [robot’s number] -f [the hex file name]
 +./robocop -r 3 -f atmega2561_demo.hex 
 +</code>
 +\\
 +Creating reset\\
 +<code>
 +./robocop -r [robot’s number] -R
 +./robocop -r 3 -R
 +</code>
 +\\
 +Reading the ADC inputs:
 +<code>
 +./robocop -r [robot’s number] -a -i [interval (1/10 s)] -n [numbers of readings]
 +./robocop -r 2 -a -i 1 -n 10
 +</code>
 +\\
 +**In webserver**
 +<code>
 +</code>
 +
 +===== Detailed manual =====
 +RoboCop is Linux based client program for Distancelab robots, it uses if necessary RobotLoader and RobotCharger. The RobotLoader contains bootloader, as the RobotLoader contains a charging program.\\
 +
 +{{:et:distancelab:robotite_haldamine.png?330|}}\\
 +\\
 +Some of the opportunities offered by RoboCop
 +  * Loading the new .hex file to the robot
 +  * XBee pin configuration
 +  * Displaying  ADC values on console and saving them on User harddrive in .txt format   
 +  * Robot’s wireless module configuration check, check is done wireless
 +  * Configuration of the robot’s wireless module, check is done wireless
 +  * Monitoring the state of the robot and sending it to charge 
 +  * Refreshing the info about robots in the Distancelab webpage \\
 +\\
 +RoboLoader or wireless bootloader
 +  * Takes into account possible errors arising from the radio communication 
 +  * Sends the data by blocks
 +  * Checks the data blocks accuracy with checksum
 +  * In case of error, sends the data again
 +  * Has a reasonabe  delays \\
 +\\
 +RoboCharger also wireless charging program
 +  * Contains algorithm for finding the charger
 +  * Identifies the beginning of the charging cycle
 +  * Identifies the end of the charging cycle
 +  * Releases the charging station\\
 +
 +{{:et:distancelab:skeem.jpg?330|}}
 +
 +**Robocopi oleku kontroll**
 +    *Pärib baasist robotite loetelu, olekud, seadistused ...
 +    *Kontrollib iga roboti aku pinget, temperatuuri
 +    *Vajadusel muudab roboti olekut (DIO4) active -> charge
 +    *Saadab roboti laadima, laeb robotisse RoboCharger programmi 
 +    *Muudab roboti olekut Kauglabori veebikeskkonnas
 +    *Salvestab (ADC) parameetrid, analüüsi (graafikute) tarbeks.
 +
 +**RoboCharger**
 +    *Contains algorithm for seeking the charging station
 +    *Detects the beginning of charging *
 +    *Takse charging time in consideration just in case if chargind doesn' end
 +    *Checks the tempriture of the batteries, it’s also done by RoboCop
 +    *Detects the end of charging cycle, free’s the charging station in a program
 +    *Changes the robot status charge -> active
 +
 +==== Use of RoboCop====
 +
 +Usage: robocop [options]
 +
 +General options:\\
 +  * -r remote 16 bit address\\
 +  * -f <hexfile.hex>      flash robot\\
 +  * -R reset robot\\
 +  * -m maintenance (check batteries)\\
 +
 +GPIO options\\
 +  * -g gpio num\\
 +  * -v gpio value (0|1)\\
 +
 +ADC options\\
 +  * -a read adc0 value\\
 +  * -n <number> read number of samples\\
 +  * -i <seconds> interval between samples\\
 +  * -A all ADC's\\
 +
 +Diagnostics options\\
 +  * -c check remote XBee configuration\\
 +  * -F fix remote XBee configuration\\
 +  * -m test MySQL connectivity\\
 +
 +** Uploading the code**
 +
 +-r3 = robot’s 16 bit address
 +<code>
 +./robocop -r [robot’s number] -f [hex fail name]
 +./robocop -r 3 -f atmega2561_demo.hex 
 +</code>
 +\\
 +**Using the ADC  **
 +\\
 +Reading the ADC inputs:
 +<code>
 +./robocop -r [robot’s number] -a
 +./robocop -r 3 -f -a 
 +</code>
 +\\
 +Monitoring battery level
 +<code>
 +./robocop -r [robot’s number] -a -n [numbers of readings] -i [interval (1/10 s)]
 +./robocop -r 3 -a -n 100 -i 1
 +</code>
 +There will be 100 readings, taken in every 0.1 second, in a console
 +\\
 +All input ADC readings
 +
 +<code>
 +./robocop -r [robot’s number] -a -n [numbers of readings] -i [interval (1/10 s)] -A
 +./robocop -r 3 -a -n 100 -i 1 -A
 +</code>
 +\\
 +**Other operations**\\
 +\\
 +XBee configuration control
 +
 +<code>
 +./robocop -r [robot’s number] -c
 +./robocop -r 3 -c
 +</code>
 +\\
 +Improving the XBee configuration
 +
 +<code>
 +./robocop -r [robot’s number] -F
 +./robocop -r 3 -F
 +</code>
 +\\
 +Creating reset
 +
 +<code>
 +./robocop -r [robot’s number] -R
 +./robocop -r 3 -R
 +</code>
 +\\
 +GIPO pin configuration
 +
 +<code>
 +./robocop -r [robot’s number] -g [pin number] -v [1|0]
 +./robocop -r 3 -g 4 -v 1
 +</code>
 +g4 is XBee pin DIO4 and v1 means this pin is set to high\\
 +\\
 +**Locking**\\
 +Using multiple RoboCop program is not a problem. User will wait in gueue until robot is free or time run’s out.
  
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0