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 asyncio | |
| import app | |
| from events.input import Buttons, BUTTON_TYPES | |
| from system.hexpansion.config import * | |
| class ServoApp(app.App): | |
| def __init__(self): | |
| self.button_states = Buttons(self) |
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
| from PIL import Image, ImageDraw, ImageFont, ImageColor | |
| from datetime import datetime | |
| import os | |
| import pytz | |
| now = datetime.now() | |
| dt_string = now.strftime("%m-%d %H:%M") | |
| dt_string_2 = now.strftime("%Y%m%d%H%M%S") |
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
| # info bin braucht man nur einmal auslesen | |
| python3 OEPL-Flasher.py -z -i -p /dev/cu.usbmodem01 read info.bin | |
| # die ID muss aber pro tag ueberschrieben werden | |
| python3 patch_mac.py --zbs243 -mac 021EBB6D3B1F info.bin | |
| # die info.bin wird dann neu geschrieben | |
| python3 OEPL-Flasher.py -z -i -p /dev/cu.usbmodem01 write info.bin | |
| #dann kommt die eigentliche firmware rauf |
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
| <?php | |
| // this will probably be arduino code at one point | |
| // but it's still trash atm | |
| function gcd2($k, $n, $steps) { | |
| if($n<2) return $steps; | |
| else { | |
| // $steps | |
| $cnt = count($steps); |
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
| #include <Servo.h> | |
| #include <SPI.h> | |
| #include <Ethernet.h> | |
| #include <PusherClient.h> | |
| byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; | |
| //PusherClient client; | |
| Servo leftServo; | |
| Servo rightServo; |
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
| /* https://www.banggood.com/ESP32-C3-Development-Board-RISC-V-WiFi-Bluetooth-IoT-Development-Board-Compatible-with-Python-p-1914005.html?cur_warehouse=CN | |
| * | |
| * GPIO09 button | |
| * GPIO08 neopixels | |
| * GPIO10 status led | |
| * | |
| */ | |
| #include <Adafruit_GFX.h> | |
| #include <Adafruit_NeoPixel.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
| #include <Wire.h> | |
| #include "OSO_LCD.h" | |
| OSO_LCDWing display; | |
| void setup() { | |
| // put your setup code here, to run once: | |
| if (!display.begin(0x3E, &Wire1)) { | |
| while (1) Serial.println("ERR"); |
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
| #!/bin/sh | |
| #This example will create a 15min video, with 10 frames per second | |
| fps=10; | |
| seconds=900; | |
| mantissaDigits=2; | |
| upperFont=14; | |
| #upperFont=53; | |
| lowerFont=100; | |
| ffmpeg -loop 1 -i ~/Pictures/black-background.png -c:v libx264 -r $fps -t $seconds -pix_fmt rgb24 -vf "fps=$fps,drawtext=fontfile='/usr/share/fonts/truetype/freefont/FreeMono.ttf':fontcolor=white:fontsize=$upperFont:x=(w-text_w)/2:y=(h-text_h)/2:text='%{eif\:(($seconds-t)/60)\:d}\:%{eif\:(mod($seconds-t, 60))\:\d\:2 }'" "$seconds seconds countdown timer.mp4"; |
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
| var mqtt = require('mqtt'); | |
| var HOST = '192.168.43.10'; | |
| var client = mqtt.connect("mqtt:\/\/" + HOST, { port: 1883 }); | |
| client.on('connect', function () { | |
| console.log("Connected to " + HOST); | |
| client.subscribe('hermes/intent/#'); | |
| }); |
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
| #include <Wire.h> | |
| #include "SH1106Wire.h" | |
| #include <Adafruit_NeoPixel.h> | |
| #define PIN 0 | |
| Adafruit_NeoPixel strip = Adafruit_NeoPixel(2, PIN, NEO_GRB + NEO_KHZ800); | |
| int brightness = 4; | |
| /* | |
| default arduino esp8266 pinout for I2C |
NewerOlder