From aca0f9dbbb020c5519263d1b82f46eefd31c535d Mon Sep 17 00:00:00 2001 From: redfast00 Date: Fri, 11 Mar 2022 11:36:24 +0100 Subject: [PATCH] Wiring info --- README.md | 8 ++++++++ src/modules/info_003_ports/info_003_ports.ino | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2e9492c..0c33614 100644 --- a/README.md +++ b/README.md @@ -37,3 +37,11 @@ There are two roles: These two roles can communicate with each other. To successfully defuse the bomb, they must communicate efficiently and clearly. If a mistake is made, the team gets a strike. If they get too many strikes or the timer runs out, the bomb explodes. + + +## Common wiring between all modules + +- CAN-H: red on JST 3 pin connectors, purple on CAN wire +- CAN-L: white on JST 3 pin connectors, brown on CAN wire +- +12V: red on 2 pin JST connector and power wire +- ground: black on 2 pin JST connector, no color on power wire \ No newline at end of file diff --git a/src/modules/info_003_ports/info_003_ports.ino b/src/modules/info_003_ports/info_003_ports.ino index baccae2..6b772d7 100644 --- a/src/modules/info_003_ports/info_003_ports.ino +++ b/src/modules/info_003_ports/info_003_ports.ino @@ -7,14 +7,14 @@ message: X -> binary value -There are 4 bits in the value that indicate +There are 4 bits in the value that indicate if a port is visible or not: VGA: 8-bit Serial: 4-bit MIDI: 2-bit Parallel: 1-bit -If a bit is 0, this means the port is shown, if it is 1, the port is hidden. +If a bit is 0, this means the port is **shown**, if it is 1, the port is **hidden**. For example, if the value is 7 (in binary: 0111), that means that only the VGA port is visible. */ @@ -25,6 +25,7 @@ For example, if the value is 7 (in binary: 0111), that means that only the VGA p const int stepsPerRevolution = 2038; +// Connected to motor driver #define IN_ONE 2 #define IN_TWO 3 #define IN_THREE 5