Skip to content

Instantly share code, notes, and snippets.

Avatar
🔒
busy

Dario Longobardi kashimAstro

🔒
busy
View GitHub Profile
@kashimAstro
kashimAstro / sem_multithread.cpp
Created Oct 18, 2017
simple multithreading with semaphore posix c++
View sem_multithread.cpp
#include <iostream>
#include <unistd.h>
#include <thread>
#include <vector>
#include <signal.h>
#include <semaphore.h>
using namespace std;
vector<thread*> th;
@kashimAstro
kashimAstro / tcp.ino
Created Mar 13, 2017
TCP server for ESP-07
View tcp.ino
#include <ESP8266WiFi.h>
const char* ssid = "************";
const char* password = "************";
WiFiServer server(5055);
int pinLeft = 13;
int pinRight = 12;
bool ValLeft = false;
@kashimAstro
kashimAstro / google_image.cpp
Created Mar 3, 2017
search image by google for popular trainer dlib
View google_image.cpp
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <stdio.h>
#include <regex>
#include <fstream>
#include <curl/curl.h>
void write_file(std::string p, std::string d)
@kashimAstro
kashimAstro / UART3_enable.md
Last active Feb 18, 2017
sunxi H3 enable UART3
View UART3_enable.md

#simple step for enable UART3 H3 allwinner sunxi
download suite sunxi:
git clone https://github.com/linux-sunxi/sunxi-tools
compile:
make
convert /boot/script.bin in .fex ascii file for editing:
./bin2fex /boot/script.bin ~script.fex

@kashimAstro
kashimAstro / README.md
Last active Feb 15, 2020
H3 / Mali GPU driver and openframeworks armv7 ES / ES2
View README.md

#A small guide to compile openFrameworks armv7 with driver OpenGL ES / ES2 sunxi for H3 / Mali GPU on ARMBIAN OS, compatible with orangepi and bananapi.

tested on: orangepi one banana pi M2

dependencies:

apt-get install libx11-dev libxext-dev xutils-dev libdrm-dev \ 
           x11proto-xf86dri-dev libxfixes-dev x11proto-dri2-dev xserver-xorg-dev \
           build-essential automake pkg-config libtool ca-certificates git cmake subversion
@kashimAstro
kashimAstro / fhogOF.cpp
Created Jan 25, 2017
extract fhog with dlib and openframeworks
View fhogOF.cpp
void drawFHOG(ofPixels store, int x, int y)
{
ofPixels pix;
ofImage debug;
ofPushMatrix();
array2d<matrix<float,31,1> > hog;
array2d<rgb_pixel> img;
toDLib(store,img);//<-- view ofxDLib
@kashimAstro
kashimAstro / imglab_commandline.cpp
Last active Mar 2, 2017
dlib imglab command line, tool for train machine learning with dlib
View imglab_commandline.cpp
/*
http://dlib.net/train_object_detector.cpp.html
Usage:
first step create positive train:
./bin/imglab_commandline positive/ "30,20,520,520" "person"
second step create negative train in append positive train previously created:
@kashimAstro
kashimAstro / OLEDpi.cpp
Created Jan 24, 2017
OLED i2c 128x64 script test
View OLEDpi.cpp
#include <iostream>
#include "ofxGPIO.h"
#define OLED 0x3C
#define WIDTH_OLED 128
#define HEIGHT_OLED 64
int main(int argc, char *argv[])
{
if(argc > 2)
@kashimAstro
kashimAstro / main.cpp
Last active Feb 22, 2019
Simple Motion blur by (Keijiro Takahashi) rewritten in c++
View main.cpp
/*
Rewritten Code by Keijiro Takahashi
source:
https://github.com/keijiro/sketches2016/blob/master/Moblur/Moblur.pde
*/
#include "ofMain.h"
@kashimAstro
kashimAstro / ofLogAudio.h
Last active Jan 23, 2018
simple script audio synth for openframeworks
View ofLogAudio.h
class ofLogAudio : public ofThread{
public:
bool startSpeak = false;
string msg;
string speak;
void start(string _c="/usr/bin/espeak -v mb-it3")
{
speak = _c;
startThread(true);
You can’t perform that action at this time.