Skip to content

Instantly share code, notes, and snippets.

View mwinkler's full-sized avatar

Matthias Winkler mwinkler

View GitHub Profile
#include <BleGamepad.h>
BleGamepad bleGamepad;
int btn_last = 0;
int btn_pin = 4;
int poti_pin = 34;
int con = 0;
void setup()
{
# thanks to Vinz1911 (https://github.com/Vinz1911/PrimePoweredUP) for the BLE handling
from spike import PrimeHub, LightMatrix, Button, StatusLight, ForceSensor, MotionSensor, Speaker, ColorSensor, App, DistanceSensor, Motor, MotorPair
from spike.control import wait_for_seconds, wait_until, Timer
from math import *
import utime
import ubluetooth
import ubinascii