Skip to content

Commit f37e2bf

Browse files
committed
wiring diagram and doc
1 parent a57747d commit f37e2bf

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ Hardware:
1414
* 3 x TB6612FNG.
1515
* 1 x Heng Long chassis with gearbox (2 DC motors).
1616
* 1 x Turret rotation gearbox.
17-
* 1 x Airsoft gun unit.
17+
* 1 x MG90S servo for gun recoil.
18+
* 1 x MG90S servo for gun elevation.
1819
* 1 x Dasmikro TBS Mini sound unit.
1920
* 1 x 8 Ohm speaker.
2021
* 1 x PS2 controller (bluetooth is not necessary).
2122
* 1 x battery (I'm using a 14.5V 2.15Ah from a robot vacuum cleaner).
22-
* 1 x 9V battery for arduino standalone power.
2323
* A lot of jumper wires.
2424

2525
## Dependencies
@@ -28,6 +28,7 @@ Hardware:
2828
* [TBSMini](https://github.com/edumardo/TBSMini).
2929
* [PS2X_lib](https://github.com/madsci1016/Arduino-PS2X).
3030
* [arduino-timer](https://github.com/contrem/arduino-timer), available in the [library manager](https://www.arduino.cc/en/guide/libraries#).
31+
* [AsyncServo](https://github.com/luisllamasbinaburo/Arduino-AsyncServo). available in the [library manager](https://www.arduino.cc/en/guide/libraries#).
3132

3233
## Features
3334

@@ -37,7 +38,7 @@ Hardware:
3738
| PS2 left analog stick control | ✔️ Done | |
3839
| Turret rotation | ✔️ Done | |
3940
| Gun elevation | ✔️ Done | |
40-
| Airsoft gun shoot | ⚙️ In progress | |
41+
| Airsoft gun shoot | ⚠️ Pending | |
4142
| Smoke unit | ✔️ Done | |
4243
| Sound unit | ⚙️ In progress | |
4344
| Start / Stop sequence | ⚙️ In progress | |

arduino-panzer.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ void loop() {
5757
}
5858

5959
/* Fire gun */
60-
if ((tank.radioButton(CONTROLLER_FIRE_GUN)) && (millis() - debounceFireGunTime > CONTROLLER_MS_DEBOUNCE) && (tank.recoilGun()->readyToFire())) {
60+
if ((tank.radioButton(CONTROLLER_FIRE_GUN)) && (millis() - debounceFireGunTime > CONTROLLER_MS_DEBOUNCE) && (tank.gunRecoil()->readyToFire())) {
6161
debounceFireGunTime = millis();
62-
tank.recoilGun()->fire();
62+
tank.gunRecoil()->fire();
6363
tank.soundUnit()->playSound(1);
6464
}
6565

images/wiring-diagram.png

26.9 KB
Loading

wiring-diagram/wiring-diagram.fzz

20 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)