Skip to content

Instantly share code, notes, and snippets.

View Miceuz's full-sized avatar

Albertas Mickėnas Miceuz

View GitHub Profile
This file has been truncated, but you can view the full file.
execve("/usr/bin/chronograf", ["chronograf", "-v", "-l", "debug"], 0xbed1c60c /* 30 vars */) = 0
getpid() = 2604
sched_getaffinity(0, 8192, [0]) = 4
mmap2(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f3b000
mmap2(NULL, 270663680, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa6d1b000
brk(NULL) = 0x4d48000
mmap2(0x5000000, 541065216, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x5000000
clock_gettime(CLOCK_MONOTONIC, {tv_sec=65989, tv_nsec=730575215}) = 0
mmap2(0x5000000, 4194304, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x5000000
mmap2(0xa6d1b000, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xa6d1b000
#include <PID_v1.h>
#include <Hash.h>
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <ArduinoOTA.h>
#include <Bounce2.h>
@Miceuz
Miceuz / rs485-sensor-tester.ino
Created November 22, 2018 13:56
Script for Arduino to test rs485 sensors
#include <Bounce2.h>
#include <ModbusMaster.h>
#include <SoftwareSerial.h>
#include <SdFat.h>
SoftwareSerial softSerial(2, 3); // RX, TX
Bounce button = Bounce();
ModbusMaster sensor;
SdFat sd;
/*
* A controller for Schiederwerk PVG 12-12 AC Electronic Lamp Power Supply
* for metal halide lamps
*
* © Albertas Mickėnas 2016
* [email protected] [email protected]
* This code is Open Source distributed under Apache 2.0 licence.
*/
#include <Bounce2.h>
#include <Bounce2.h>
Bounce but1 = Bounce();
Bounce but2 = Bounce();
byte outPin[8] = {2,3,5,6, 8,9,11,12}; // kintamuju masyvas nepaeiliui pasiskirsciusiems pin'ams suzymeti
byte outNo = 0; // ciklams prasukti
int input; // nuskaityto analoginio iejimo reiksmei irasineti
// int lygis = 0; // lygis arba kitaip tariant
int koefi = 10; // analoginio signalo iejimo sriprinimo koeficientas (kartais). Leisgtinos ribos 10...50 (bet jei nepakaks, galima meginti ir iki 200).
#include "Tlc5940.h"
void setup() {
Tlc.init();
}
void fadeOut() {
for(int j = 4095; j >= 0; j--){
for(int i = 0; i < 16; i++) {
Tlc.set(i, j);
#include<SPI.h>
#include <Tone.h>
Tone player;
void beep(){
player.play(4000);
delay(100);
player.stop();
}
/*
* A controller for Schiederwerk PVG 12-12 AC Electronic Lamp Power Supply
* for metal halide lamps
*
* © Albertas Mickėnas 2016
* [email protected] [email protected]
* This code is Open Source distributed under Apache 2.0 licence.
*/
#include <Bounce2.h>
#include <ESP8266WiFi.h>
#include <Base64.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <Phant.h>
//AP definitions
#define AP_SSID "TECHNARIUM"
#define AP_PASSWORD "change me"
//the original code by Ted Meyers
//posted here: https://groups.google.com/d/msg/diyrovers/lc7NUZYuJOg/ICPrYNJGBgAJ
#include <Wire.h>
#define VL53L0X_REG_IDENTIFICATION_MODEL_ID 0xc0
#define VL53L0X_REG_IDENTIFICATION_REVISION_ID 0xc2
#define VL53L0X_REG_PRE_RANGE_CONFIG_VCSEL_PERIOD 0x50
#define VL53L0X_REG_FINAL_RANGE_CONFIG_VCSEL_PERIOD 0x70
#define VL53L0X_REG_SYSRANGE_START 0x00