Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédenteProchaine révisionLes deux révisions suivantes | ||
contribs:usbcollective [2017/04/10 14:03] – créée cbellot | contribs:usbcollective [2017/04/17 17:16] – cbellot | ||
---|---|---|---|
Ligne 36: | Ligne 36: | ||
{{: | {{: | ||
+ | Programme : | ||
+ | <code c> | ||
+ | #include < | ||
+ | |||
+ | Bounce button0 = Bounce(0, 10); // 10 ms debounce time | ||
+ | Bounce button1 = Bounce(1, 10); | ||
+ | Bounce button2 = Bounce(2, 10); | ||
+ | Bounce button3 = Bounce(3, 10); | ||
+ | Bounce button4 = Bounce(4, 10); | ||
+ | Bounce button5 = Bounce(5, 10); | ||
+ | Bounce button6 = Bounce(6, 10); | ||
+ | Bounce button7 = Bounce(7, 10); | ||
+ | |||
+ | void setup() { | ||
+ | pinMode(0, INPUT_PULLUP); | ||
+ | pinMode(1, INPUT_PULLUP); | ||
+ | pinMode(2, INPUT_PULLUP); | ||
+ | pinMode(3, INPUT_PULLUP); | ||
+ | pinMode(4, INPUT_PULLUP); | ||
+ | pinMode(5, INPUT_PULLUP); | ||
+ | pinMode(6, INPUT_PULLUP); | ||
+ | pinMode(7, INPUT_PULLUP); | ||
+ | } | ||
+ | void loop() { | ||
+ | Joystick.Z(analogRead(0)); | ||
+ | Joystick.Zrotate(analogRead(1)); | ||
+ | Joystick.X(analogRead(2)); | ||
+ | Joystick.Y(analogRead(3)); | ||
+ | |||
+ | button0.update(); | ||
+ | button1.update(); | ||
+ | button2.update(); | ||
+ | button3.update(); | ||
+ | button4.update(); | ||
+ | button5.update(); | ||
+ | button6.update(); | ||
+ | button7.update(); | ||
+ | |||
+ | if (button0.fallingEdge()) { | ||
+ | Joystick.button(1, | ||
+ | } | ||
+ | if (button1.fallingEdge()) { | ||
+ | Joystick.button(2, | ||
+ | } | ||
+ | if (button2.fallingEdge()) { | ||
+ | Joystick.button(3, | ||
+ | } | ||
+ | if (button3.fallingEdge()) { | ||
+ | Joystick.button(4, | ||
+ | } | ||
+ | if (button4.fallingEdge()) { | ||
+ | Joystick.button(5, | ||
+ | } | ||
+ | if (button5.fallingEdge()) { | ||
+ | Joystick.button(6, | ||
+ | } | ||
+ | if (button6.fallingEdge()) { | ||
+ | Joystick.button(7, | ||
+ | } | ||
+ | if (button7.fallingEdge()) { | ||
+ | Joystick.button(8, | ||
+ | } | ||
+ | |||
+ | if (button0.risingEdge()) { | ||
+ | Joystick.button(1, | ||
+ | } | ||
+ | if (button1.risingEdge()) { | ||
+ | Joystick.button(2, | ||
+ | } | ||
+ | if (button2.risingEdge()) { | ||
+ | Joystick.button(3, | ||
+ | } | ||
+ | if (button3.risingEdge()) { | ||
+ | Joystick.button(4, | ||
+ | } | ||
+ | if (button4.risingEdge()) { | ||
+ | Joystick.button(5, | ||
+ | } | ||
+ | if (button5.risingEdge()) { | ||
+ | Joystick.button(6, | ||
+ | } | ||
+ | if (button6.risingEdge()) { | ||
+ | Joystick.button(7, | ||
+ | } | ||
+ | if (button7.risingEdge()) { | ||
+ | Joystick.button(8, | ||
+ | } | ||
+ | |||
+ | delay(50); | ||
+ | } | ||
+ | </ | ||
===== Montage et soudures ===== | ===== Montage et soudures ===== | ||
{{: | {{: | ||
- | ===== Montage terminé ===== | + | ===== Montage |
{{: | {{: | ||
{{: | {{: | ||
{{: | {{: | ||
+ | |||
+ | ===== Système de fixation sur le siège ===== | ||
+ | |||
+ | {{: | ||
+ | {{: | ||
+ | {{: | ||
+ | |||
+ | ===== Montage sur le siège ===== | ||
+ | {{: |