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
/* A tiny BASIC interpreter */ | |
// heavily modified from: | |
// https://gist.github.com/pmachapman/661f0fff9814231fde48 | |
// | |
// Now it works with doubles instead of ints. Also fixed some bugs. | |
#include <string.h> | |
#include <stdio.h> | |
#include <setjmp.h> |
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 hexdump | |
import serial | |
import struct | |
def decode_addr(data, cursor): | |
(a1, a2, a3, a4, a5, a6, a7) = struct.unpack("<BBBBBBB", data[cursor:cursor+7]) | |
hrr = a7 >> 5 | |
ssid = (a7 >> 1) & 0xf | |
ext = a7 & 0x1 |