Skip to content

Instantly share code, notes, and snippets.

View botamochi6277's full-sized avatar

botamochi botamochi6277

View GitHub Profile
@botamochi6277
botamochi6277 / HSVLEDws.ino
Created July 8, 2017 02:30
light RGB LED based on HSV model and change color with switch
/*
* light RGB LED based on HSV model and change color with switch
* This code is derived from "Adafruit Arduino - Lesson 3. RGB LED"
* https://learn.adafruit.com/adafruit-arduino-lesson-3-rgb-leds/overview
*/
// #define DEBUG
const int swPin = 2;
int redPin = 11;
@botamochi6277
botamochi6277 / HSVLED.ino
Created July 8, 2017 02:12
light RGB LED based on HSV model
/*
* light RGB LED based on HSV model
* This code is derived from "Adafruit Arduino - Lesson 3. RGB LED"
* https://learn.adafruit.com/adafruit-arduino-lesson-3-rgb-leds/overview
*/
// #define DEBUG
int redPin = 11;
int greenPin = 10;
int bluePin = 9;
@botamochi6277
botamochi6277 / fusion360_parts_export.py
Last active December 26, 2023 10:38
Fusion360 Script
import adsk.core, adsk.fusion, traceback
import os.path, sys
def run(context):
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
# get active design
@botamochi6277
botamochi6277 / mydevice.ino
Created October 11, 2016 11:08
Curie for BLE logger
#include <CurieBLE.h>
/* */
BLEPeripheral blePeripheral; // BLE Peripheral Device (the board you're programming)
int oldBatteryLevel = 0; // last battery level reading from analog input
unsigned long previousMillis = 0; // last time the battery level was checked, in ms
unsigned long interval = 1; // ms
BLEService myService("BF77"); // BLE my Service
description[de] = <b>Design Rules for Modela</b>\n<p>\nMinimum drill : 60 deg V-cutter
description[en] = <b>Design Rules for Modela</b>\n<p>\nMinimum drill : 60 deg V-cutter
layerSetup = (1*16)
mtCopper = 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm
mtIsolate = 1.5mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm
mdWireWire = 0.3mm
mdWirePad = 0.3mm
mdWireVia = 0.3mm
mdPadPad = 0.3mm
mdPadVia = 0.3mm
#include "stdio.h"
void main(){
printf("Hello World\n\r");
return 0;
}
@botamochi6277
botamochi6277 / battery.js
Created August 2, 2016 11:18
Get Battery Level with BLE
var async = require('async');
var NobleDevice = require('../index');
// Add my service
var idOrLocalName = process.argv[2];
if (!idOrLocalName) {
console.log("node battery.js [ID or local name]");
process.exit(1);
}