This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial,time | |
ser = serial.Serial('COM1') | |
ser.write("$$\r\n") | |
def readline(): | |
eol = b'\r' | |
leneol = len(eol) | |
line = bytearray() | |
while True: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* serial_echo.pde | |
* ----------------- | |
* Echoes what is sent back through the serial port. | |
* | |
* http://spacetinkerer.blogspot.com | |
*/ | |
int incomingByte = 0; // for incoming serial data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// All the pins needed | |
int pin_led = 9; | |
int pin_pot = 0; | |
int pin_button_mode = 2; | |
int pin_button_up = 3; | |
int pin_button_down = 4; | |
// Button state. 0 = button off , 1 = button pressed in | |
bool button_mode_state = 1; | |
bool button_up_state = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import imaplib | |
import email | |
mail = imaplib.IMAP4_SSL('imap.gmail.com') | |
mail.login('user','password') | |
mail.list() | |
# Out: list of "folders" aka labels in gmail. | |
mail.select("inbox") # connect to inbox. | |
mail.select('INBOX', readonly=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Return the Quantity Search | |
// @namespace https://gist.github.com/sleemanj/95035bf2c0141ac72420 | |
// @updateURL https://gist.github.com/sleemanj/95035bf2c0141ac72420/raw/aliexpress-qty-search-fix.js | |
// @downloadURL https://gist.github.com/sleemanj/95035bf2c0141ac72420/raw/aliexpress-qty-search-fix.js | |
// @version 0.1 | |
// @description Put the quantity search fields back into the search interface on Aliexpress when they are not present. | |
// @author You | |
// @match http://*.aliexpress.com/* | |
// @grant none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
server, but for some reason omit a client connecting to it. I added an | |
example at the bottom. | |
Save the following server in example.js: | |
*/ | |
var net = require('net'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif | |
#define PIN 4 | |
#define NUM_LEDS 16 | |
#define BRIGHTNESS 25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:1000000006C1000016C1000014C1000012C10000AA | |
:1000100010C100000EC100000CC100000AC10000A8 | |
:1000200008C1000006C1000004C1000002C10000B8 | |
:1000300000C10000FEC00000FCC00000FAC00000CB | |
:10004000F8C00000F6C00000F4C00000F2C00000DC | |
:10005000F0C00000EEC00000ECC0000003C20000D1 | |
:10006000E8C00000E6C00000E4C00000E2C00000FC | |
:10007000E0C00000DEC00000DCC00000DAC000000C | |
:10008000D8C00000D6C00000D4C00000D2C000001C | |
:10009000D0C00000CEC00000CCC00000CAC000002C |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install NodeMCU | |
https://github.com/nodemcu/nodemcu-flasher/blob/master/Win64/Release/ESP8266Flasher.exe?raw=true | |
-- Connect via serial port | |
majorVer, minorVer, devVer, chipid, flashid, flashsize, flashmode, flashspeed = node.info(); | |
print(flashsize) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo ----------------------------------------------- increment.bat script ----------------------------------------------- | |
rem ======================================================================================== | |
rem == This script automatically increments build number in "version.h" file. | |
rem == Instructions and more information: | |
rem == http://codeblog.vurdalakov.net/2017/04/autoincrement-build-number-in-arduino-ide.html | |
rem ======================================================================================== | |
setlocal |
OlderNewer