Skip to content

Instantly share code, notes, and snippets.

@Gray-Stone
Gray-Stone / Traj-minimal.py
Last active August 2, 2024 02:05
HelloRobot Stretch3 test script.
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}')
@Gray-Stone
Gray-Stone / 7SigArduino.ino
Created October 21, 2018 06:42
Code for 7-sig display
// 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.