Skip to content

Instantly share code, notes, and snippets.

View andrecurvello's full-sized avatar

André Márcio de Lima Curvello andrecurvello

View GitHub Profile
@andrecurvello
andrecurvello / main.c
Created September 1, 2017 21:16 — forked from mchalapetr/main.c
OV7670 control library
/**
* ==========================================================================
* main.c
* (c) 2014-2015, Petr Machala
*
* Description:
* OptRec sensor system main file.
* Optimized for 32F429IDISCOVERY board.
*
* License:

ESP8266 Web Server to storing ap config to EEPROM.

Original by chriscook8 from esp8266.com I just modified to use ESP8266WebServer library for easy to handle the http request.

This is sample code not yet complete.

Todo

  • when Wifi connected need to close the softAP.
@andrecurvello
andrecurvello / tweets.py
Created November 30, 2015 03:22 — forked from alansaid/tweets.py
Get all tweets with a certain hashtag
from TwitterAPI import TwitterAPI
from TwitterAPI import TwitterRestPager
from natsort import versorted
import json, sys, glob, os
def main(args):
if len(args) < 2:
print "usage: python tweets.py #hashtag"
print ""
@andrecurvello
andrecurvello / ILI9341
Created November 29, 2015 22:49 — forked from khwas/ILI9341
QVGA over SPI Initialization, choosing left top, orientation and X, Y meaning, rectangles, lines, colors. Speed test
#include <Wire.h> // Use Wire according to arcticle https://garretlabs.wordpress.com/2014/03/18/the-dark-side-of-porting-arduino-sketches-on-intel-galileo-part-one/
int RESET_PIN = 8;
int DC_PIN = 9;
int CS_PIN = 7;
int MOSI_PIN = 2;
int MISO_PIN = 12;
int SCK_PIN = 3;
//TFT resolution 240*320
@andrecurvello
andrecurvello / FTDI_Basic_Hookup_for_ESP-01.jpg
Created September 28, 2015 02:52 — forked from stonehippo/FTDI_Basic_Hookup_for_ESP-01.jpg
Notes on using the ESP8266 with the Arduino IDE
FTDI_Basic_Hookup_for_ESP-01.jpg
@andrecurvello
andrecurvello / simple_mjpeg_streamer_http_server
Last active September 18, 2015 14:23 — forked from n3wtron/simple_mjpeg_streamer_http_server
Simple Python Motion Jpeg (mjpeg server) from webcam. Using: OpenCV,BaseHTTPServer
#!/usr/bin/python
'''
Author: Igor Maculan - n3wtron@gmail.com
A Simple mjpg stream http server
'''
import cv2
import Image
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer
import StringIO
import time
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/* HC-SR04 Sensor
https://www.dealextreme.com/p/hc-sr04-ultrasonic-sensor-distance-measuring-module-133696
This sketch reads a HC-SR04 ultrasonic rangefinder and returns the
distance to the closest object in range. To do this, it sends a pulse
to the sensor to initiate a reading, then listens for a pulse
to return. The length of the returning pulse is proportional to
the distance of the object from the sensor.
The circuit:
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,