Skip to content

Instantly share code, notes, and snippets.

@5shekel
5shekel / tiny_IRremote.cpp
Created March 1, 2018 11:08 — forked from SeeJayDee/tiny_IRremote.cpp
tiny_IRremote - Arduino IRremote ported to the ATtiny
/*
* tiny_IRremote
* Version 0.2 July, 2016
* Christian D'Abrera
* Fixed what was originally rather broken code from http://www.gammon.com.au/Arduino/
* ...itself based on work by Ken Shirriff.
*
* This code was tested for both sending and receiving IR on an ATtiny85 DIP-8 chip.
* IMPORTANT: IRsend only works from PB4 ("pin 4" according to Arduino). You will need to
* determine which physical pin this corresponds to for your chip, and connect your transmitter
@5shekel
5shekel / riot.ino
Last active November 1, 2017 06:53
/*
* words http://idiot.io
* code https://github.com/shenkarSElab/IRiot
*
* pin out attiny85
* NC --+----+-- VCC
* Touch --|* |-- NC
* IRsend --| |-- NC
* GND --+----+-- LED
*
BUILD YOUR OWN MOLDS
Yes, it’s possible to make gumdrops without using a silicone mold, but you’ll have to get crafty and make a mold. Cornstarch molds require some work and are a bit of a mess but are very useful if you want to create candy in a specific shape. Here’s what you will need:
- 8 pounds cornstarch
- 3 half sheet pans
- Wooden spoon or whisk with a handle ½ to ¾ inch in diameter
- Coconut oil, for coating candy
First, preheat the oven to 250°F. Next, pour 4 pounds of the cornstarch into a half sheet pan, then pack the cornstarch down by rapping the pan on the countertop. Set a second sheet pan on top of the cornstarch and press down on the pan to pack and level the cornstarch. If any cornstarch falls out of the pan, scoop it up, return it to the pan, and smooth it out again. Pour the remaining 4 pounds cornstarch into the third sheet pan and pack and level it the same way. Bake the cornstarch-filled sheet pans in the oven for 1½ hours.
@5shekel
5shekel / neo-ali-bom.txt
Last active November 19, 2017 15:10
aliexpress links for neopixel
https://www.aliexpress.com/item/100pcs-LOT-Blue-Light-Diode-1210-SMD-LED-Super-Bright-3528-LED-3-5-2-8mm/32821411982.html
https://www.aliexpress.com/item/100pcs-LOT-Red-Light-Diode-1210-SMD-LED-Super-Bright-3528-LED-3-5-2-8mm/32821451559.html
https://www.aliexpress.com/item/5-Values-100PCS-LOT-Super-Bright-3528-1210-SMD-LED-Red-Green-Blue-Yellow-White-20pcs/32798221267.html
https://www.aliexpress.com/item/220pcs-lot-free-shipping-2N7002-MOS-SOT-23-100-new-Original-Quality-Assurance/2029421500.html
https://www.aliexpress.com/item/Free-shipping-1206-SMD-capacitor-10UF-25V-106K-100PCS/32372423744.html
https://www.aliexpress.com/item/1206-104-100NF-0-1UF-1206-SMD-capacitance-SMD-capacitors-100PCS-LOT/2025043980.html
https://www.aliexpress.com/item/100pcs-lot-SMD-Chip-Resistor-1206-1K-1K-ohm-5-Free-shippng/32382933718.html
https://www.aliexpress.com/item/100pcs-lot-SMD-Chip-Resistor-1206-330R-330-ohm-5-Free-shippng/32383295862.html
https://www.aliexpress.com/item/100pcs-lot-SMD-Chip-Resistor-1206-22K-22K-ohm-5-Fre
@5shekel
5shekel / read_thingspeak.py
Last active January 19, 2018 20:53 — forked from rw950431/read_thingspeak.py
Read last update from thingspeak
#!/usr/bin/env python
import urllib2,json
CHANNEL_ID=203342
def main():
conn = urllib2.urlopen("http://api.thingspeak.com/channels/%s/feeds/last.json" % (CHANNEL_ID))
response = conn.read()
print "http status code=%s" % (conn.getcode())
data=json.loads(response)
@5shekel
5shekel / tami_lock.py
Last active July 5, 2017 19:24
rfid_python_ard_pi
# cat ~pi/do_this
#!/usr/bin/sudo /usr/bin/python
#/usr/bin/env python
# -*- coding: utf-8 -*-
from multiprocessing import Process, Value
import os
import sys
import time
import hashlib
// Library for servo use
#include <Servo.h>
// Digital pin for servo motor
int palm_servo_pin = 10;
int thumb_servo_pin = 9;
// Analog pin for the muscle sensor
int muscle_pin = A0;
int joy_pin = A5;
var tech = [
["Citizen Science","DIY culture","+Makers from the Makerspaces","+Hackers from the Hackerspaces"],
["+IoTs","3D printing","Additive manufacturing","Digital fabrication"],
["Bioprinting","Tissue Engineering","Artificial meat","Regenerative medicine","Cloning"],
["Genetic engineering","Gene editing (CRISPR-Cas9)"],
["Nanotechnology","Biomicrorobotics","Biobanking"],
["Synthetic Biology","+Stem cells","Astrobiology"],
["Male contraceptive","Personalized medicine","Microbiome research","+Next generation robots"],
["+Autonomous Vehicles","+Drones","+Killer robots and autonomous weapons systems"],
["+Big data","+Open data","Open government"],
//http://doc.lijun.li/misc-nrf24-ble.html
// Inspired by http://dmitry.gr/index.php?r=05.Projects&proj=11.%20Bluetooth%20LE%20fakery
#define DEBUG 1
#include <math.h> //http://sean.voisen.org/blog/2011/10/breathing-led-with-arduino/
//this is the ID the beacon will transmit, keep it a number
const static int my_num = 1 ;
@5shekel
5shekel / CokeMan.ino
Last active March 30, 2016 06:31
Coke Man
//code for motion sensor circuit
//
const int ledPin = 13;
const int inputPin = A2;
int threshold = 500;
void setup() {
Serial.println("restart......");