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
#include <Arduino.h> | |
#include <SPI.h> // problems with PlatformIO | |
#include <U8g2lib.h> | |
#include <Wire.h> | |
#include <ClickEncoder.h> | |
#include <TimerOne.h> | |
#include <TaskScheduler.h> |
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
""" | |
Edistyneempi palvelinskripti. | |
localhost:5000/photo ottaa kuvan, | |
localhost:5000/video ottaa lyhyen videon. | |
Taman jalkeen paketti lahetetaan ennalta- | |
maaritetylle Telegram-kanavalle. | |
Muokkaa muuttujat | |
BOT_API_TOKEN ja GROUP_ID | |
ennen ajamista. |
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
""" | |
Skripti noutaa botin päivitykset ja parsii vastauksesta | |
group_id:t. | |
>> python get_group_id.py | |
@author Peter Kronstrom | |
""" | |
import json |
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
""" | |
A script that acts as a messaging bridge between Telegram and IRC. | |
Works in Python 3.x | |
Installation: | |
1. pip install pydle | |
2. go create a Telegram bot by talking to BotFather (https://telegram.me/botfather) | |
3. create a telegram group, and send a curl to: | |
curl -s -X POST "https://api.telegram.org/bot<BOT_TOKEN>w/getUpdates" | |
4. get the group_id from the response |
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
""" | |
Palvelinskripti. | |
Laheta pyynto osoitteeseen localhost:5000/photo | |
(esim. avaamalla selaimen). Kamera ottaa kuvan | |
ja lahettaa sen Telegram-kanavalle. | |
Koodista on vaihdettava <api-token> ja <group-id>, | |
jotta se toimii. | |
>> python selfie_cam.py |
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
#include <TimeLib.h> | |
#include <ESP8266WiFi.h> | |
#include <WiFiUdp.h> | |
#include <SPI.h> | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
// Using a modified fork from | |
// https://github.com/mcauser/Adafruit_SSD1306/tree/esp8266-64x48 |
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
#include <ESP8266WiFi.h> | |
#include <ESP8266HTTPClient.h> | |
#include <ArduinoOTA.h> | |
#include <Ticker.h> | |
#include "DHT.h" | |
#define DHTPIN D4 | |
#define BUTTONPIN D3 | |
#define DHTTYPE DHT22 | |
#define MEASUREMENT_INTERVAL 5000 |
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
#include <SoftwareSerial.h> | |
#include <ESP8266WiFi.h> | |
#include <ESP8266mDNS.h> | |
#include <ArduinoOTA.h> | |
#include <SoftwareSerial.h> | |
#include <Ticker.h> | |
const char* ssid = "Bembun"; | |
const char* password = "ananasakaama"; |
NewerOlder