the handy board

12
The Handy Board Bryan Valentini General Robotics 2003

Upload: jaime-willis

Post on 02-Jan-2016

74 views

Category:

Documents


0 download

DESCRIPTION

The Handy Board. Bryan Valentini General Robotics 2003. Overview. What is the Handy Board? The Anatomy of the Handy Board The HB and Interactive C Care and Tips Mantra: Charge your batteries before Demo. What is the Handy Board?. Battery powered microcontroller - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: The Handy Board

The Handy Board

Bryan Valentini

General Robotics 2003

Page 2: The Handy Board

Overview

• What is the Handy Board?• The Anatomy of the Handy Board• The HB and Interactive C• Care and Tips

Mantra: Charge your batteries before Demo

Page 3: The Handy Board

What is the Handy Board?

• Battery powered microcontroller• Capable of handling up to 4 DC motors

(output)• Can read several sensors (input)• Re-chargeable• Re-programmable• Static Memory• Serial comm./IC allows for real-time

interaction (USAR)

Page 4: The Handy Board

HB Features

• 16x2 char LCD• Beating Heart

• Two methods for Charging (important!)

• Analog/Digital Input

Page 5: The Handy Board

HB Features

• SerialComm.

• DC MotorOutputs

• Feedback LEDs

• Power• Bootstrap

• User Buttons

• User Knob

Page 6: The Handy Board

Battery Charging

• Trickle-charge (normal mode) – Adapter plugged directly to HB, charge light ON

– Takes 12-14 hours– Can leave indefinitely

• Via Serial Interface (normal mode) – like trickle charge mode

• Zap Charge – must set to ZAP mode– Charge in 3 hours– Charge light OFF– Be careful, remove after charging.– NOT YOUR FRIEND! EMERGENCY USE ONLY!

Page 7: The Handy Board

Interactive C

• Powerful, interpreted, very similar to C

• Free IDE provided on website

• Require Reg. Number• Serial communication

through Adapter to HB via Telephone wire

• Read manual for details• Load .c files through IDE to

HB, restart HB and code will immediately start executing

• Additional libraries may be needed for sensors: fencdrX.asm

From Newton Labs:

•Complete type safety. Interactive C verifies correct arguments for all function calls and types across separate ".c" files.

•Array bounds checking. Array bounds are verified, preventing writing off the ends of arrays and corrupting memory.

Page 8: The Handy Board

Interactive C

Free IDE available on Website

License: Howie Choset, 24-userKey : 58471-53648-17580-18

Page 9: The Handy Board

Bootstrap to Get Started

• Used to reset board in case of serious malfunction.1 - While board is off, hold stop button down. 2 - Turn board power on3 - Both LEDs should turn

on, and the off.4 - Only mode where board is on, but power light is off.

• With IDE, load pcode_hb.s19

• Pcode initializes the HB

Page 10: The Handy Board

Some Useful Library Functions

• See page 20 –24

• void motor(int m, int p)– Turns on motor m at power level p. Power

levels range from 100 for full on forward to -100 for full on backward.

• void ao()– Turns off all motors. ao is a short form for

alloff.

• int analog(int p)– Returns value of sensor port numbered p.

Result is integer between 0 and 255.

• void stop press()– Waits for STOP button to be pressed, then

released. Then issues a short beep and returns.

• int knob()– Returns the position of a knob as a value from

0 to 255.

• void sleep(float sec)– Waits for an amount of time equal to or

slightly greater than sec seconds. sec is a floating point number.

• void printf(char*)– Print to LCD

• void beep()– Produces a tone of 500 Hertz for a period of

0.3 seconds.

• Much Much more!

Page 11: The Handy Board

Care and Tips

• BE CAREFUL!!!!

• Trickle charge overnight.• Avoid Zap charge

• Not all engines are equal.

• Do not solder or glue anything directly to HB.

• Build solid bases for HB in your robots.

• There is limited memory, program wisely.

Page 12: The Handy Board

Final

• Charge your batteries before Demo!

• Everyone should have a base-level familiarity with the HB.

• Look to website for reference material. Read some of this before you code.

• Ask TAs for help before you get frustrated.