Skip to content

Instantly share code, notes, and snippets.

View ghlens's full-sized avatar

Geert Lens ghlens

  • Amsterdam, Netherlands
  • 08:55 (UTC +02:00)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ghlens on github.
  • I am ghlens (https://keybase.io/ghlens) on keybase.
  • I have a public key ASBUSPIWOk5uzBdVfBNU03uX1WcYn6ReXYZDntZGLESWpAo

To claim this, I am signing this object:

@ghlens
ghlens / CMakeLists.txt
Created November 20, 2018 11:48
CMakeLists.txt for ROS with OpenCV
cmake_minimum_required(VERSION 2.8.3)
project(opencv_test)
set(CMAKE_CXX_STANDARD 14)
find_package(catkin REQUIRED COMPONENTS cv_bridge roscpp rospy std_msgs)
find_package(OpenCV)
catkin_package()
#include <Wire.h>
//Values for register setup found: http://cache.freescale.com/files/sensors/doc/app_note/AN4600.pdf
#define maxthreshold 10
#define minthreshold 8
int yvalue = 0;
int xvalue = 0;
bool xtouched = false;
import processing.serial.*;
int[] vals = new int[2];
int[][] xy = new int[][]{
{ 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0},
#define topbar_width 376
#define topbar_height 42
#define bottombar_width 376
#define bottombar_height 32
static const uint8_t PROGMEM topbar_data[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/*
* Made with the code by bbx10node@gmail.com
* https://gist.github.com/bbx10/149bba466b1e2cd887bf
*/
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
#include <ESP8266HTTPClient.h>
#include <ArduinoJson.h>
#include <Ticker.h>
@ghlens
ghlens / pitches.h
Last active February 14, 2018 10:13
/*************************************************
* Public Constants
* Notes with corresponding frequenties
*************************************************/
#define NOTE_B0 31
#define NOTE_C1 33
#define NOTE_CS1 35
#define NOTE_D1 37
#define NOTE_DS1 39
#include <Wire.h> //Used for I2C connections
#include "Adafruit_MPR121.h"
#include "pitches.h" //Notes with corresponding frequenties
//Initialized the MPR121 sensor that is connected via I2C
//The SCL pin from the sensor has to be connected to the SCL pin from the ESP8266
//The SDA pin from the sensor has to be connected to the SDA pin from the ESP8266
Adafruit_MPR121 cap = Adafruit_MPR121();
const int speakerPin = 16;
@ghlens
ghlens / ESP8266_AP_list_connected_devices.ino
Last active February 13, 2018 10:56
Example code that list all the devices that are connected to the ESP8266 AP
#include <ESP8266WiFi.h>
#include <SPI.h>
#include "SSD1306Spi.h"
#include "OLEDDisplayUi.h"
extern "C" {
#include "user_interface.h"
}
SSD1306Spi display(0, 16, 2);