Skip to content

Instantly share code, notes, and snippets.

View schedutron's full-sized avatar
🎯
Focusing

Saurabh Chaturvedi schedutron

🎯
Focusing
View GitHub Profile
# -*- coding: utf-8 -*-
"""WhatsApp.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1jyDKgWPj7_nwyhRKyvjpeGojLRU0VqqF
"""
!pip install wordcloud
@schedutron
schedutron / code.py
Created October 25, 2020 11:21
CircuitPlayground Express Code for Sending Power-on Signal to a class of Fujitsu General ACs
import array
import supervisor
import sys
import time
import pulseio
import board
from adafruit_circuitplayground import cp
@schedutron
schedutron / command_sender.py
Last active October 25, 2020 11:34
Flask server to receive commands via /switch endpoint and send them via USB to CircuitPlayground Express
import serial
from flask import Flask, Response
# /dev/ttyACM0 is the USB interface to CPX on my Pi. It might be different for you,
# there are many resources on the web to help you find the correct interface.
SERIAL_PATH = '/dev/ttyACM0'
BAUDRATE = 115200
TIMEOUT = 0.01
SER = serial.Serial(SERIAL_PATH, baudrate=BAUDRATE, timeout=TIMEOUT)