Skip to content

Instantly share code, notes, and snippets.

View Arachnid's full-sized avatar

Nick Johnson Arachnid

View GitHub Profile
I want to make better tools for electronics makers and hobbyists, and I want you
to help me do it.
About a year ago, I was working on a project with a power supply I needed to
test, and I designed the original Re:load. As it happens, I'm not the only one
that needed one, and the Re:load became my first commercial product, and led to
the formation of Arachnid Labs. The Re:load's hugely popular with anyone who
needs to test a power supply, check battery life or discharge rates, or anything
else that requires a steady current source - especially if they don't have
thousands of dollars to throw at expensive lab equipment.
Archive member included because of file (symbol)
.\CortexM0\ARM_GCC_473\Release\Bootloader.a(cyfitter_cfg.o)
.\CortexM0\ARM_GCC_473\Release\Cm0Start.o (cyfitter_cfg)
.\CortexM0\ARM_GCC_473\Release\Bootloader.a(Bootloader.o)
.\CortexM0\ARM_GCC_473\Release\Cm0Start.o (CyBtldr_CheckLaunch)
.\CortexM0\ARM_GCC_473\Release\Bootloader.a(UART.o)
.\CortexM0\ARM_GCC_473\Release\main.o (UART_Start)
.\CortexM0\ARM_GCC_473\Release\Bootloader.a(UART_SPI_UART.o)
.\CortexM0\ARM_GCC_473\Release\main.o (UART_SpiUartGetRxBufferSize)
>>> struct.pack("B", 0x38) + struct.pack("H", 0)
'8\x00\x00'
>>> struct.pack("BH", 0x38, 0)
'8\x00\x00\x00'
CommsLink cl("My device", 12345);
int my_int;
void ioinit() {
cl.register(&my_int);
}
void loop() {
while(1) {
#define register(exporter, var) ExportedVariable _exported ## #var (exporter, #var, &var)
Exporter ex;
int blah;
register(ex, blah);
template <typename T>
class Monitored {
protected:
T value;
boolean dirty;
public:
Monitored<T>& operator=(const T source) {
value = source;
dirty = true;
}
#define NEXT goto *opcodes[program[pc++]]
int interpret(char *stack, int sp, char *program) {
int pc = 0;
static const void *opcodes[] = {&&push, &&pop, &&add, &&sub, &&ret};
NEXT;
push:
stack[sp++] = program[pc++];
NEXT;
switch (GET_DURATION(*pByte)) {
case 7:
delay(vel * 6);
case 6:
delay(vel * 2);
case 5:
delay(vel * 4);
case 4:
delay(vel * 4);
case 3:
typedef enum {
STATE_MAIN,
STATE_RECEIVE,
STATE_SEND,
STATE_PLAY
} state_t;
void state_machine() {
while(1)
{
#define PIN 3
void setup() {
Serial.begin(115200);
}
void loop() {
long last = 0;
boolean last_value = -1;
while(1) {