Main repository for dump truck API development in Spring 2017
Dependencies: Tracker mbed MotorV2 SRF05 nRF24L01P
Fork of DUMP_TRUCK_TEST_V1 by
Dump_Truck_API_Outline
Dump Truck API Outline¶
(Work in Progress)¶
The plan for this semester is to compile the previous semesters' work with individual sensors and integrate them into a complete "Dump Truck" class. The picture above displays the current pins needed on one mBed module and a task list for one of the libraries.
Sub-Libraries¶
Motor.h¶
Summary¶
This is a basic class used to control the dump truck motors. The motors of concern are the turning, driving, and bed actuation motors.
Pins Required¶
A direction pin and PWM pin per motor. The pins are PwmOut pins.
Imported Libraries¶
None.
Functions¶
- write to motor
- read from motor
Variables¶
- lastVal written to motor
IMU.h¶
Summary¶
This is a general class that helps the dump truck, using an IMU, manage two states of operation: driving and raising/lowering the bed.
Pins Required¶
The IMU requires one set of I2C pins.
Imported Libraries¶
- LSM9DS1.h
Functions for Bed State¶
- Calibrate base vector (when the bed is down)
- Output the current angle of the bed (when the bed is up)
Variables for Bed State¶
- Angle of bed
- Base vector
Functions for Drive State¶
- Output values from gyro
Variables for Drive State¶
- Gyro variables
Tracker.h¶
Summary¶
This is a class that combines the inputs from the potentiometer and WW-02 WheelWatcher Wheel encoder to allow the dump truck to track its X and Y position.
Pins Required¶
The potentiometer needs one AnalogIn pin. The wheel encoder needs two InterruptIn pins (digital, p29 and p30 works).
Imported Libraries¶
- QEI.h
Functions¶
- Clear
- Set zero angle on potentiometer
- Set direction that the dump truck is turning
- Wait until dump truck has started moving to measure distance
- Calculate displacement
Variables¶
- x
- y
RangeFinder.h¶
Summary¶
Pins Required¶
Imported Libraries¶
Functions¶
Variables¶
Transceiver.h¶
Summary¶
Pins Required¶
Imported Libraries¶
Functions¶
Variables¶
Misc task list¶
finish user interface
limit switches
make actual bed working
assemble complete dump truck with necessary jumper wires