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 "DHT.h" | |
#include "LoRaWAN.h" | |
#include <stdint.h> | |
#include <SoftwareSerial.h> | |
DHT dht; | |
SoftwareSerial *hSerialCommands = NULL; |
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> | |
SoftwareSerial mySerial(2, 3); // RX, TX | |
void setup() | |
{ | |
// Open serial communications to computer | |
Serial.begin(9600); | |
mySerial.begin(9600); // Default for the board | |
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
import random, signal,sys, time, heapq | |
from PIL import Image | |
size = int(sys.argv[1]) | |
maze = [[0 for x in range (size)] for y in range(size)] #maze é glob | |
def createmaze(): | |
image = Image.new("RGB", (size,size)) | |
pixels = image.load() |
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
/* | |
0123456701234567 | |
0 0000000000000000 | |
1 0000011100001000 | |
2 0000100000100010 | |
3 0000011100001110 | |
4 0000000000000010 | |
0 0000011000000000 | |
1 0000100100011100 | |
2 0000100100001010 |
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
TIMSK1 = (1<<OCIE1A); // output capture enable | |
TCCR1B = (1<<WGM12)|(1<<CS12)|(0<<CS11)|(0<<CS10); //prescaler 256 | |
OCR1A = 0x7A11; //31.250 * 256 = 8.000.000 | |
TCNT1 = 0; | |
sei(); //system enable interrupt | |
ISR(TIMER1_COMPA_vect){ | |
i++; | |
TCNT1=0; | |
} |