Skip to content

Instantly share code, notes, and snippets.

@idreamsi
idreamsi / HowToOTGFast.md
Created August 1, 2016 15:54 — forked from gbaman/HowToOTGFast.md
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

###Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)
More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. Finally, open up the cmdline.txt. Be careful with this file, it is very picky with its formatting! Each parameter is seperated by a single

@idreamsi
idreamsi / mcs_blink.py
Created June 8, 2016 12:38 — forked from pablosun/mcs_blink.py
Example Python code that use MediaTek Cloud Sandbox to control on-board Wi-Fi LED of LinkIt Smart 7688
@idreamsi
idreamsi / grove_ds18b20.cpp
Created June 5, 2016 15:31 — forked from anonymous/grove_ds18b20.cpp
wiolink grove driver for ds18b20
/*
* grove_ds18b20.cpp
*
* Copyright (c) 2012 seeed technology inc.
* Website : www.seeed.cc
* Author : Kai
*
* The MIT License (MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@idreamsi
idreamsi / nokia-demo.ino
Created April 22, 2016 09:06
Nokia LCD 5110
SYSTEM_MODE(SEMI_AUTOMATIC);
#define PIN_POWER A7 //Pin 1 on LCD
#define PIN_SCE A2 //Pin 3 on LCD
#define PIN_RESET A0 //Pin 4 on LCD
#define PIN_DC A1 //Pin 5 on LCD
#define PIN_SDIN A5 //Pin 6 on LCD
#define PIN_SCLK A3 //Pin 7 on LCD
#define PIN_LED D0 //Pin 8 on LCD
@idreamsi
idreamsi / pythonscript.py
Last active August 15, 2024 17:18
Python script for Telegram
# -*- coding: utf-8 -*-
#!/usr/bin/python
import subprocess
import os
import picamera
import time
import shlex
from datetime import datetime
from datetime import timedelta
import datetime as dt
#!/usr/bin/env python
import sys
import time
import csv
import sqlite3
from google.appengine.datastore import entity_pb
from google.appengine.api import datastore
@idreamsi
idreamsi / pizumo.py
Created August 17, 2014 12:38
PiZumo v1.0
#!/usr/bin/env python
from flask import Flask, render_template, request, jsonify
# Initialize the Flask application
app = Flask(__name__)
import pigpio
pi = pigpio.pi() # Connect to local Pi.
# Motor PINs