Skip to content

Instantly share code, notes, and snippets.

View iooner's full-sized avatar
:shipit:

iooner iooner

:shipit:
View GitHub Profile
@iooner
iooner / LiquidCrystal_I2C.cpp
Created January 19, 2022 16:30
Modifications LiquidCrystal I2C
// Based on the work by DFRobot
#include "LiquidCrystal_I2C.h"
#include <inttypes.h>
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#define printIIC(args) Wire.write(args)
inline size_t LiquidCrystal_I2C::write(uint8_t value) {
Timestamp : 000116.696
Encoding : NEC
Code : FFC03F (32 bits)
Library : v2.5.3
Raw Timing[71]:
+ 9152, - 4498, + 598, - 542, + 602, - 538, + 596, - 544,
+ 600, - 540, + 602, - 538, + 596, - 542, + 602, - 540,
+ 594, - 544, + 598, - 1648, + 600, - 1648, + 600, - 1646,
+ 600, - 1648, + 600, - 1646, + 602, - 1644, + 604, - 1644,
@iooner
iooner / Wemos pinout.h
Created January 14, 2018 16:19
Wemos pinout
static const uint8_t SDA = PIN_WIRE_SDA;
static const uint8_t SCL = PIN_WIRE_SCL;
static const uint8_t LED_BUILTIN = 2;
static const uint8_t BUILTIN_LED = 2;
static const uint8_t D0 = 16;
static const uint8_t D1 = 5;
static const uint8_t D2 = 4;
static const uint8_t D3 = 0;
@iooner
iooner / Random image generator
Created February 21, 2017 09:39
Random image generator
import os, numpy, Image, time
def create_image(width = 1920, height = 1080):
width = int(width)
height = int(height)
current = time.strftime("%Y%m%d%H%M%S")
os.mkdir(current)
filename = '{0}/{0}_{1:03d}.jpg'.format(current, n)
@iooner
iooner / m3u8-concat.sh
Created February 20, 2017 08:53 — forked from maxwellito/m3u8-concat.sh
Concat / join .ts segment files into an mp4 file
#!/bin/sh
# This script must be executed in the repo where
# the *.ts files are.
# It will concatenate the segments into one temp
# file which ffmpeg will reencode the audio track.
# By default the ouptup filename is output.mp4
# but can be changed by providing the name as parameter.
#
# ffmpeg is required
void BallSprite::animate() {
if (queue) {
queue_length += (get_position() - last_position);
queue_length -= queue_length / 10;
if (queue_length > 10) queue_length = 10;
if (queue_length < -10) queue_length = -10;
int imax = get_reversed() ? -queue_length : queue_length;
for (int i = 1; i < imax; ++i)
if (shiny)
draw(-i, 0, 120 - 12 * i, 255 - 12 * i);

Keybase proof

I hereby claim:

  • I am iooner on github.
  • I am iooner (https://keybase.io/iooner) on keybase.
  • I have a public key whose fingerprint is 1C01 2318 C418 2F61 C5C6 79B8 D905 332F 8398 5E1C

To claim this, I am signing this object:

{% highlight xxx %}.
<ul>
{% for member in site.data.members %}
<li>
<a href="https://github.com/{{ member.github }}">
{{ member.name }}
</a>
</li>
{% endfor %}
</ul>