Skip to content

Instantly share code, notes, and snippets.

View jkittley's full-sized avatar

Jacob Kittley-Davies jkittley

View GitHub Profile
@jkittley
jkittley / node.ino
Last active December 2, 2018 17:22
Arduino sketch for RFM69 radio - see http://www.kittley.com/2018/04/06/blog-async-rfm69/ for more information
// **********************************************************************************
//
// Test RFM69 Radio.
//
// **********************************************************************************
#include <RFM69.h> // https://www.github.com/lowpowerlab/rfm69
#include <RFM69_ATC.h> // https://www.github.com/lowpowerlab/rfm69
#include <SPI.h> // Included with Arduino IDE
@jkittley
jkittley / fabfile.py
Last active April 16, 2018 15:04
SDStore Python 3 Raspberry Pi Automation Fabric Script - see http://www.kittley.com/2018/04/04/blog-sdstore-and-pi/ for more information.
#encoding:UTF-8
# =============================================================================
# This fabfile will turn a Raspberry Pi into a webserver,
# See http://www.kittley.com/2018/04/04/blog-sdstore-and-pi/ for more details.
# =============================================================================
import socket
from os import sep, remove
from fabric.api import cd, lcd, task
@jkittley
jkittley / rfm69_async_rxtx.py
Last active April 16, 2018 15:03
RFM69 example code for receiving and sending data - see http://www.kittley.com/2018/04/06/blog-async-rfm69/ for more information
import asyncio
from aiohttp import ClientSession
from RFM69 import Radio, FREQ_433MHZ
async def call_API(url, packet):
async with ClientSession() as session:
print("Sending packet to server")
async with session.post(url, json=packet.to_dict('%c')) as response:
response = await response.read()
print("Server responded", response)