Skip to content

Instantly share code, notes, and snippets.

# shell-build123d.nix
# Shell environment for build123d
# https://build123d.readthedocs.io/en/latest/index.html
# https://wiki.nixos.org/wiki/Python#Using_nix-shell_alongside_pip
{ pkgs ? import <nixpkgs> {} }:
let
$uname -a
Linux prototype 4.7.6-1-ARCH #1 SMP PREEMPT Fri Sep 30 19:28:42 CEST 2016 x86_64 GNU/Linux
$ lsb_release -a
LSB Version: 1.4
Distributor ID: Arch
Description: Arch Linux
Release: rolling
Codename: n/a
print("GPIO TEST")
lighton = 0
gpio.mode(1, gpio.OUTPUT)
tmr.alarm(1, 1000, 1, function()
if lighton == 0 then
lighton = 1
gpio.write(1, gpio.LOW)
print("\tGPIO LOW\n")
else
lighton = 0
@Technicus
Technicus / git_pull-repositories.sh
Last active August 25, 2016 16:07
Repository Management Scripts
#!/bin/bash
clear
# Check for arguments, and give feedback
if [ -z "$1" ]; then
printf "\n\tThis script will read the list-git.<account> file and download the git project"
printf "\n\tto the directory provided.\n"
printf "\n\t\tInsifficient arguments provided."
printf "\n\t\tUsage:"
// FluidSynth_Test_03_GPIO_INPUT_24_NOTES_NO_INTERRUPT.c
// http://www.malinov.com/Home/sergey-s-blog/inteledison-simplei2saudiosetup
// http://www.instructables.com/id/MIDI-SoundFont-synthetizer-with-Intel-Edison-and-F/?ALLSTEPS
// http://fluidsynth.sourceforge.net/api/
// http://fluidsynth.sourcearchive.com/documentation/1.0.5/example_8c-source.html
// https://musescore.org/en/handbook/soundfont#list
// http://www.i-programmer.info/programming/hardware/8744-exploring-edison-mraa-gpio.html?start=3
// Fluidsynth Library Documentation
// FluidSynth_Test_02_GPIO_INPUT_SINGLE_NOTE.c
// http://fluidsynth.sourceforge.net/api/
// http://www.i-programmer.info/programming/hardware/8744-exploring-edison-mraa-gpio.html?start=3
// http://www.malinov.com/Home/sergey-s-blog/inteledison-simplei2saudiosetup
// Compile with this
// gcc FluidSynth_Test_02_GPIO_INPUT_SINGLE_NOTE.c -o FluidSynth_Test_02_GPIO_INPUT_SINGLE_NOTE -lmraa -L/usr/local/lib -lfluidsynth
#include "mraa.h"
@Technicus
Technicus / compileFail.txt
Created July 13, 2016 05:42
DS4driver Intel Edison Compile
Git source = < https://github.com/TXBDan/DS4driver >
/DS4driver# g++ main.cpp -o d4 -lmraa
main.cpp: In function 'int main()':
main.cpp:26:35: warning: comparison between 'enum mraa::Result' and 'enum mraa_result_t' [-Wenum-compare]
if (d_pin->dir(mraa::DIR_OUT) != MRAA_SUCCESS) {
^
/tmp/ccrS03EX.o: In function `main':
main.cpp:(.text+0xc2): undefined reference to `DS4driver::DS4driver()'
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1351.h>
#include <Adafruit_VS1053.h>
#include <SPI.h>
#define VERSION "Development - 2"
// Color definitions
#define BLACK 0x0000
#define BLUE 0x001F
@Technicus
Technicus / Bounce2.h
Last active February 13, 2016 20:45
Referencing a different object from an object, line 37 of Bounce2.h with line 62 of Development_0.ino
/*
The MIT License (MIT)
Copyright (c) 2013 thomasfredericks
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.