Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wtrssn
wtrssn / RASPBERRY CONFIGURACIÓN.ipynb
Created October 10, 2016 15:40
PYTHON Ipython/RASPBERRY PI/RASPBERRY CONFIGURACIÓN.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wtrssn
wtrssn / part9_AJAXautoDigitalAnalogReading.ino
Created January 26, 2017 16:23
Analog Inputs and Switches using AJAX
/*--------------------------------------------------------------
Program: eth_websrv_AJAX_IN
Description: Uses Ajax to update the state of two switches
and an analog input on a web page. The Arduino
web server hosts the web page.
Does not use the SD card.
Hardware: Arduino Uno and official Arduino Ethernet
shield. Should work with other Arduinos and
from time import sleep, time
total_reaction_time=0
for i in range(5):
print('Run number: ', i+1)
print('Ready...')
sleep(5)
start = time()
import sys
import threading
from gpiozero import LED, RGBLED, Button, Buzzer
from time import time, sleep
from signal import pause
from random import randint
STATUS_BLOCKED = (0,0,0)
STATUS_LOCK = (1,0,0)
STATUS_UNLOCK = (0,1,0)
#!/usr/bin/python3
import socket
import os
import subprocess
import smtplib
from email.mime.text import MIMEText
import datetime
gw = os.popen("ip -4 route show default").read().split()
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)