A receipt printer connected to GPT-3 backend.
Building this device is fairly simple. You need:
#include <WiFi.h> | |
#include <WiFiUdp.h> | |
#include "FS.h" | |
#include "SPIFFS.h" | |
#include <ArduinoOTA.h> | |
#include <ESPmDNS.h> | |
#include <HTTPClient.h> | |
/* You only need to format SPIFFS the first time you run a |
/* */ | |
from bs4 import BeautifulSoup | |
import requests,re,json | |
from datetime import datetime | |
# get current datetime | |
dt = datetime.now() |
/* | |
* Noisebridge ESP32 Doorbell | |
* https://www.noisebridge.net/wiki/Doorbell | |
* | |
* This sketch should connect to Noisebridge wifi networks, respond to doorbell button presses, | |
* play a tone via an attached MP3 Player and send webhook notifications to both Slack and Discord. | |
* */ | |
#include <WiFi.h> | |
#include <WiFiUdp.h> |
extern "C" { | |
#include "osapi.h" | |
#include "ets_sys.h" | |
#include "user_interface.h" | |
} | |
// From https://github.com/miloh/esp8266ft/blob/master/square_noise_server/square_noise_server.ino | |
#include <lwip/udp.h> |
import serial | |
import time | |
import struct | |
import datetime | |
import matplotlib.pyplot as plt | |
# for use with sds021 sensor or similar | |
# https://www.aliexpress.com/item/NOVA-PM2-5-Air-particle-dust-sensor-SDS021-laser-inside-digital-output-SDS021-Laser-PM2-5/32638192686.html | |
# replace with your serial port |
# converts ballot images from sf elections into a csv you can easily import into your database/spreadsheet | |
# this is released into the public domain. dana sniezko, 2018 | |
# download the text file from https://sfelections.sfgov.org/june-5-2018-election-results-detailed-reports | |
ballot_image_file = "20180606_ballotimage.txt" | |
# what you want to name your output csv | |
output_file_name = "parsed_ballots.csv" | |
# from http://www.sfelections.org/results/20180605/data/20180605_4/20180605_4_masterlookup.txt | |
# dictionary of to precincts |
# pre-coffee code in the public domain | |
# this shows total 1,2,3 votes for a given candidate, it's not running RCV rounds | |
# for that you want https://sfelections.sfgov.org/june-5-2018-election-results-summary | |
total = {"001":0,"002":0,"003":0} # total by rank | |
# http://www.sfelections.org/results/20180605/data/20180605_4/20180605_4_masterlookup.txt | |
target = "0000184" # amy here! | |
# ballot images from https://sfelections.sfgov.org/june-5-2018-election-results-detailed-reports |