Skip to content

Instantly share code, notes, and snippets.

Avatar

Luis Rodil-Fernandez dropmeaword

  • Amsterdam, Netherlands
View GitHub Profile
View esp_networking.h
#ifndef __WIFI_H__
#define __WIFI_H__
#include <DNSServer.h>
#include <ESP8266mDNS.h>
enum WifiMode {
CLIENT = 10, // station node
HYBRID_AP = 15, // station + ap
ACCESS_POINT = 20, // ap only
View esp_networking.cpp
#if defined(ARDUINO_ARCH_ESP32)
#include <WiFi.h>
#else
#include <ESP8266WiFi.h>
#endif
#include <Arduino.h>
#include <WiFiUdp.h>
#include <ArtnetWifi.h>
#include <FastLED.h>
View SketchSystems.spec
Sonic
Standing
A button pressed -> Running
15 seconds passed -> Tap foot
Running
Buttons released -> Standing
Tap foot
A button pressed -> Running
@dropmeaword
dropmeaword / iot-mqtt-shiftr.md
Created Jan 20, 2021
description of problems I am having with shiftr.io
View iot-mqtt-shiftr.md

This sketch reads three analog values and sends them twice a second to a mqtt broker. Two implementations are provided running on Arduino MKR WiFi 1010, one uses the official ArduinoMqttClient library and the other one uses Joel's 256dpi MQTT library.

This is using the ArduinoMqttClient library. It works great with shiftr desktop, but when using it against a shiftr instance it chokes.

#include <ArduinoMqttClient.h>
#include <WiFiNINA.h>
View p5tweet_cmyk.pde
int i,s=450;void setup(){size(900,900,P3D);}void draw(){translate(s,s);rotate(--i*.1,i%9,i%7,i%4);fill((-7<<i%36)-1);rect(s,0,30,30);}//#p5
@dropmeaword
dropmeaword / p5tweet_sphere.pde
Created Feb 28, 2020
simple p5 sketch in a tweet that draw a sphere animation with some perlin noise
View p5tweet_sphere.pde
float i;void setup(){size(900,900,P3D);}void draw(){translate(450+450*cos(i*.9),600+400*sin(i+=.01)*noise(i));sphere(30/noise(i));}
@dropmeaword
dropmeaword / tinymondrian.pde
Last active Feb 27, 2020
a tiny processing sketch that generates Mondrianesque compositions (in 287 characters)
View tinymondrian.pde
int i,j;color clr=#ff0000;void I(int a,int b,int c,int d,int N){if(N==0){fill(clr);clr<<=2;clr%=0xffffff;rect(a,b,c-a,d-b);}else{i=int(random(a,c));j=int(random(b,d));I(a,b,i,j,N-1);I(i,b,c,j,N-1);I(a,j,i,d,N-1);I(i,j,c,d,N-1);}}void draw(){background(#1356A2);I(-1,-1,width,height,2);}
@dropmeaword
dropmeaword / gist:93c78c09804705e66970c2b2e805dd43
Created Nov 29, 2019
description of issue compiling OF on the Jetson
View gist:93c78c09804705e66970c2b2e805dd43
https://forum.openframeworks.cc/t/cannot-compile-of-errors-on-of3dprimitives-and-conflicting-gl-glew-declarations/30307/3
@dropmeaword
dropmeaword / gist:508f3cae3684ecf84f8239c9336b02a7
Created Nov 28, 2019
Listing of boot directory on a Jetson Nano before updating the kernel
View gist:508f3cae3684ecf84f8239c9336b02a7
nano@nano004:~$ ls -l /boot
total 55676
drwxr-xr-x 3 root root 4096 mei 21 2018 efi
drwxr-xr-x 2 root root 4096 aug 16 20:21 extlinux
drwxr-xr-x 2 root root 4096 nov 28 17:58 grub
-rw-r--r-- 1 root root 34179080 okt 20 01:07 Image
-rw-r--r-- 1 root root 5562384 aug 16 20:58 initrd
lrwxrwxrwx 1 root root 24 nov 28 17:58 initrd.img -> initrd.img-4.9.140-tegra
-rw-r--r-- 1 root root 14966197 nov 28 17:58 initrd.img-4.9.140-tegra
-rw-r--r-- 1 root root 487999 aug 13 06:29 tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb
@dropmeaword
dropmeaword / alvinutil.cpp
Created Nov 25, 2019
RealSense helper class for openFrameworks
View alvinutil.cpp
#ifndef __ALVINUTIL_HPP__
#define __ALVINUTIL_HPP__
#include <string>
#include <array>
#include <librealsense2/rs.hpp>
namespace alvin {