Skip to content

Instantly share code, notes, and snippets.

@xd2
xd2 / ES200Starter.ino
Created March 4, 2021 21:39
Arduino starter for es200
#include <Arduino.h>
int powerPin = 5;
byte messageA[] = {0xA6, 0x12, 0x02, 0x10, 0x14, 0xCF}; // BLANK CODE?
byte messageB[] = {0xA6, 0x12, 0x02, 0x01, 0x14, 0xE7}; // ESC ON & MPH
byte messageC[] = {0xA6, 0x12, 0x02, 0X05, 0x14, 0xDC}; // LIGHT ON & ESC ON & MPH
void setup() {
// initialize Serial1:
Serial.begin(9600);
class CircularBuffer(entrySize: Int, private val capacity: Int) {
private var buffers = Array(capacity) { ByteArray(entrySize) }
private var index = 0
fun next(): ByteArray {
val buffer = buffers[index]
index = ++index % capacity
return buffer
}
}

Liquibase legacy changelog

I encountered unexplainable issues (about liquibase dependancies, classpath, jar inclusion) using liquibase command line interface in my macosX terminal.
I eneded up using the intellij to run liquibase successfully.
Hereunder the command line to generate a YML changelog of an existing database running on localhost.

--driver=org.postgresql.Driver
--classpath=/Users/Xavier/.m2/repository/org/postgresql/postgresql/9.4.1212.jre7/postgresql-9.4.1212.jre7.jar
--changeLogFile=db.changelog.yml
#include "UnoJoy.h"
int hZero = 0;
int vZero = 0;
void setup(){
setupPins();
setupUnoJoy();
setupZeros();