This file contains hidden or 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
// All the pins needed | |
int pin_led = 9; | |
int pin_pot = 0; | |
int pin_button_mode = 2; | |
int pin_button_up = 3; | |
int pin_button_down = 4; | |
// Button state. 0 = button off , 1 = button pressed in | |
bool button_mode_state = 1; | |
bool button_up_state = 1; |
This file contains hidden or 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
/* | |
* serial_echo.pde | |
* ----------------- | |
* Echoes what is sent back through the serial port. | |
* | |
* http://spacetinkerer.blogspot.com | |
*/ | |
int incomingByte = 0; // for incoming serial data |
This file contains hidden or 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
import serial,time | |
ser = serial.Serial('COM1') | |
ser.write("$$\r\n") | |
def readline(): | |
eol = b'\r' | |
leneol = len(eol) | |
line = bytearray() | |
while True: |
NewerOlder