This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Pin_header(pos = [0,0,0],rot = [0,0,0], col = 3, row = 1, horiz = false, female = false) | |
{ | |
plastic_h = female ? 7.0 : 2.5; | |
plastic_tz = female ? 3.0 : 5.0; | |
metal_h = female ? 2.0 : 10.0; | |
metal_b = female ? 3.0 : 5.0; | |
translate (pos) | |
rotate(rot) | |
for (i=[0:abs(col)-1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*ARDUINO*/ | |
int b0, a1,a2,a3,a4,a5,a6; | |
int smooth_a1,smooth_a2,smooth_a3,smooth_a4,smooth_a5,smooth_a6; | |
int count[14]; | |
void setup() | |
{ | |
Serial.begin(9600); // Calculation of datas sent: 7 inputs x 24 bits (3 packages of 8bits) x 30hz (30 times / sec) = 5040 minimum; At 9600 baud, it is 57Hz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gamepad.py | |
# | |
# Copyright 2018 Francois De Bue | |
# | |
# This program show how work with game pad and a thread | |
# This was used to drive a robot with arduino | |
from threading import Thread | |
from inputs import get_gamepad |