IO Pinning - dresber/PowerWheelController GitHub Wiki

Documentation of PowerWheelControl

The controller used for this project is an Arduino Mega 2650.

IO Pinning

PWM

PinBoardNr Function Comment
2 motor_pwm_right speed of motor
3 motor_pwm_left speed of motor
4 buzzer_pwm power port for buzzer

GPIO

PinBoardNr Function Comment
22 motor_enable_right OUT
23 motor_enable_left OUT
24 light OUT
25 alarm_light OUT
26 motor_break OUT
27 steer_left OUT
28 steer_right OUT
29 OUT
30 OUT
31 OUT
32 throttle_pedale IN
33 direction_forward_switch IN
34 direction_back_switch IN
35 horn_btn IN
36 speed_plus_btn IN
37 speed_minus_btn IN
38 light_btn IN
39 alarm_light_btn IN
40 IN
41 IN
42 us_dist_front_1_trig ultra sonic sensor front 1
43 us_dist_front_1_in ultra sonic sensor front 1
44 us_dist_front_2_trig ultra sonic sensor front 2
45 us_dist_front_2_in ultra sonic sensor front 2
46 us_dist_back_trig ultra sonic sensor back
47 us_dist_back_in ultra sonic sensor back
48
49 debug_pin_1
50 debug_pin_2
51 debug_pin_3
52 debug_pin_4
53 debug_pin_5
54 debug_pin_6

Analog IN

PinBoardNr Function Comment
A0 battery_voltage
A1

Data Pins

PinBoardNr Function Comment
18 rx_bt_comm
19 tx_bt_comm
20 i2c_sda
21 i2c_scl