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 <SPI.h> | |
#include "Battery.h" | |
#include <Radio.h> | |
#include "PinChangeInterrupt.h" | |
//#include <TinyDebugSerial.h> | |
//TinyDebugSerial debug = TinyDebugSerial(); | |
#define BUTTON 10 | |
#define PHOTOCELL_PWR 9 |
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
//https://github.com/nettigo/RadioNRF24 | |
#include <SPI.h> | |
#include <RadioNRF24.h> | |
#define BUFF_SIZE 40 | |
struct Payload { | |
byte id; | |
unsigned long data; |
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
#define NOT_CORRECTED 10 | |
/* | |
Change brightness of LED linearly to Human eye | |
32 step brightness using 8 bit PWM of Arduino | |
brightness step 24 should be twice bright than step 12 to your eye. | |
*/ | |
#include <avr/pgmspace.h> | |
#define CIELPWM(a) (pgm_read_word_near(CIEL8 + a)) // CIE Lightness loopup table function |
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 | |
# -*- coding: UTF-8 -*- | |
import serial, time, struct, array | |
from datetime import datetime | |
ser = serial.Serial() | |
ser.port = "/dev/ttyUSB0" # Set this to your serial port | |
ser.baudrate = 9600 |
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 | |
# Supports 16x2 and 20x4 screens. | |
# | |
# Based on work by Matt Hawkins (raspberrypi-spy.co.uk) | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
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
function wait_for_new_usb_serial() { | |
local array=(`ls -1 //sys/bus/usb-serial/devices/`) | |
local ret="" | |
local current_devices | |
while (true) do | |
sleep 2 | |
current_devices=(`ls -1 //sys/bus/usb-serial/devices/`) | |
for value in "${current_devices[@]}" |
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> | |
#define AP | |
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(115200); | |
#ifdef AP | |
Serial.println("Access Point"); | |
WiFi.mode(WIFI_AP); |
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
// Example testing sketch for various DHT humidity/temperature sensors | |
// Written by ladyada, public domain | |
#include "DHT.h" | |
#define DHTPIN D7 // what digital pin we're connected to | |
// Uncomment whatever type you're using! | |
//#define DHTTYPE DHT11 // DHT 11 | |
#define DHTTYPE DHT22 // DHT 22 (AM2302), AM2321 |
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 <Wire.h> | |
#include <LiquidCrystal_PCF8574.h> | |
#include "PCF8574.h" | |
#define LCD_ADDR 0x27 // Adres I2C wyświetlacza LCD | |
#define BTN_ADDR 0x20 // Adres I2C macierzy przycisków | |
const int ROWS[] = {4, 5, 6, 7}; // Do których pinów expandera podłączone są wiersze macierzy? | |
const int COLS[] = {3, 2, 1, 0}; // Do których pinów expandera podłączone są kolumny macierzy? | |
const int NUM_ROWS = sizeof(ROWS)/sizeof(int); // Liczba wierszy (obliczana automatycznie) |
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
/*************************************************************************** | |
Pogodełko - mini stacja pogodowa | |
https://nettigo.pl/products/pogodelko-twoja-pierwsza-stacja-pogodowa-z-wifi | |
v 1.0 | |
***************************************************************************/ | |
#include <Wire.h> | |
#include <SPI.h> | |
#include <Adafruit_Sensor.h> | |
#include <Adafruit_BMP280.h> |
NewerOlder