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 stretch_body.robot | |
import time | |
r = stretch_body.robot.Robot() | |
did_startup = r.startup() | |
print(f'Robot connected to hardware: {did_startup}') | |
is_homed = r.is_homed() | |
print(f'Robot is homed: {is_homed}') |
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
// pin 6 - 13 will be used for the 8 pins on the segment. | |
// pin 6 - 7 = PORTD 6-7 | |
// pin 8 - 13 = PORTB 0-5 | |
// pin 2 is used for button input | |
#define PORTDMASK 0b00000011 | |
#include <string.h> // for able to use strlen measure message length | |
volatile unsigned char timeTic=0; // keep track of number of interrupts. use Char to ensure atomic operation | |
const unsigned char oneSec = 250; // since timer work at 250Hz, timeTic will count 250 for one second. |