Skip to content

Instantly share code, notes, and snippets.

View facchinm's full-sized avatar
🐢

Martino Facchin facchinm

🐢
  • Arduino
  • Torino, Italy
View GitHub Profile
@facchinm
facchinm / dnsmasq_install_rpi.sh
Created September 8, 2016 10:27
dnsmasq_install.sh
#!/bin/bash
set -e
# Raspberry Pi dnsmasq script
# Stephen Wood
# www.heystephenwood.com
#
# Usage: $ sudo ./raspberrypi_dnsmasq
#
# Net install:
From 970583587fbb9860cef9c17829f26b4c5f6170f0 Mon Sep 17 00:00:00 2001
From: Martino Facchin <[email protected]>
Date: Fri, 26 Aug 2016 18:08:52 +0200
Subject: [PATCH] Treat cpp string as UTF8
Solves https://github.com/arduino/Arduino/issues/5277
---
src/arduino.cc/builder/utils/utils.go | 118 ++++++++++++++++++++++++++++------
1 file changed, 100 insertions(+), 18 deletions(-)
@facchinm
facchinm / error.txt
Created February 3, 2016 09:26
Galileo 1.6.7 compilation error
/ssd/Arduino-master/build/linux/work/arduino-builder -dump-prefs -logger=machine -hardware "/ssd/Arduino-master/build/linux/work/hardware" -hardware "/home/martino/.arduino15/packages" -hardware "/home/martino/Arduino/hardware" -tools "/ssd/Arduino-master/build/linux/work/tools-builder" -tools "/ssd/Arduino-master/build/linux/work/hardware/tools/avr" -tools "/home/martino/.arduino15/packages" -built-in-libraries "/ssd/Arduino-master/build/linux/work/libraries" -libraries "/home/martino/Arduino/libraries" -fqbn=Intel-Test:i586:izmir_fd -ide-version=10608 -build-path "/tmp/build69fcfd56c01e23f9fbc227a6dc53fb04.tmp" -warnings=all -prefs=build.warn_data_percentage=75 -verbose "/tmp/untitled506475262.tmp/sketch_feb03a/sketch_feb03a.ino"
/ssd/Arduino-master/build/linux/work/arduino-builder -compile -logger=machine -hardware "/ssd/Arduino-master/build/linux/work/hardware" -hardware "/home/martino/.arduino15/packages" -hardware "/home/martino/Arduino/hardware" -tools "/ssd/Arduino-master/build/linux/work/tools-builde
// test for DUE PR 3524
// connection:
// 18 (dut) -> 0 (tester)
// 19 -> 1
// 2 -> A0 -> test1
// 3 -> A1 -> test2
// 4 -> 4 -> test3
// A0 -> 5 -> test4
// 5 -> 6 -> test5
--- gcc/lto-wrapper.c 2015-01-30 16:15:00.000000000 +0000
+++ gcc/lto-wrapper.c 2015-07-10 14:06:42.104411726 +0000
@@ -934,7 +934,7 @@
filename[p - argv[i]] = '\0';
file_offset = (off_t) loffset;
}
- fd = open (argv[i], O_RDONLY);
+ fd = open (argv[i], O_RDONLY|O_BINARY);
if (fd == -1)
{
compiler.path=/usr/bin/
# These can be overridden in platform.local.txt
compiler.c.extra_flags=-Wextra -flto
compiler.c.elf.extra_flags=-w -flto -fuse-linker-plugin
compiler.S.extra_flags=-flto
compiler.cpp.extra_flags=-Wextra -flto
compiler.ar.extra_flags=--plugin=/usr/lib/gcc/avr/4.9.2/liblto_plugin.so
compiler.objcopy.eep.extra_flags=
compiler.elf2hex.extra_flags=
#if defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAM_DUE)
#define SERIAL_PORT SerialUSB
#else
#define SERIAL_PORT Serial
#endif
uint8_t speedTestBuffer[256];
void setup()
{
package main
import (
//"flag"
"bytes"
//"crypto/rand"
"fmt"
"github.com/facchinm/go-serial"
"math/rand"
"os"
@facchinm
facchinm / dot2json.py
Last active August 29, 2015 14:21
dot notation to json
import itertools
import collections
import pprint
import json
import os
import dicttoxml
def dot_to_json(a,b):
output = {}
for index, key in enumerate(a):
// watchdog sam test
// initialize watchdog and then hardfault
// and see averything restarting
int counter = 0;
int limit = 200;
int limit2 = 0;
void print2(void) {
Serial.println("print2");