This file contains 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
from mindstorms.control import wait_for_seconds | |
import hub | |
battery = hub.battery.capacity_left() | |
def show_battery_level(): | |
led_on_crit_full = [20, 40, 60, 80, 100] # List that defines when each led should turn on. | |
if (battery >= 10): |
This file contains 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
#!/usr/bin/env python3 | |
__author__ = 'Artur Poznanski' | |
import evdev | |
import ev3dev.auto as ev3 | |
import threading | |
import time | |
## Some helpers ## | |
def clamp(n, minn, maxn): |
This file contains 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
#!/usr/bin/python | |
__author__ = 'Artur Poznanski' | |
from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor | |
import time | |
import atexit | |
import pygame | |
# create a default object, no changes to I2C address or frequency |
This file contains 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
#!/usr/bin/python | |
__author__ = 'Artur Poznanski' | |
from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor | |
import time | |
import atexit | |
import pygame | |
# create a default object, no changes to I2C address or frequency |
This file contains 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
#!/usr/bin/env python3 | |
__author__ = 'Artur Poznanski' | |
import evdev | |
import ev3dev.auto as ev3 | |
import threading | |
import time | |
## Some helpers ## | |
def clamp(n, minn, maxn): |