Skip to content

Instantly share code, notes, and snippets.

View enjoycowboy's full-sized avatar
🤘
analisando...

n.jOy enjoycowboy

🤘
analisando...
  • Pelotas/RS
View GitHub Profile
@enjoycowboy
enjoycowboy / main.cpp
Last active October 11, 2019 20:07
lorawan test
#include <Arduino.h>
#include "DHT.h"
#include "LoRaWAN.h"
#include <stdint.h>
#include <SoftwareSerial.h>
DHT dht;
SoftwareSerial *hSerialCommands = NULL;
@enjoycowboy
enjoycowboy / livecomm.c
Created May 10, 2019 19:38
live comm usart at
#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
@enjoycowboy
enjoycowboy / mazerunner.py
Created December 8, 2018 19:47
Implementação do A* em python
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()
@enjoycowboy
enjoycowboy / matriz.c
Last active March 24, 2017 16:04 — forked from Ravensgun/matriz
reveiw 1 que compilou no arduino
/*
0123456701234567
0 0000000000000000
1 0000011100001000
2 0000100000100010
3 0000011100001110
4 0000000000000010
0 0000011000000000
1 0000100100011100
2 0000100100001010
@enjoycowboy
enjoycowboy / 1stimer.c
Created March 19, 2017 01:16
8mhz 1s timer
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;
}