Skip to content

Instantly share code, notes, and snippets.

View botamochi6277's full-sized avatar

botamochi botamochi6277

View GitHub Profile
@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);
}
#include "stdio.h"
void main(){
printf("Hello World\n\r");
return 0;
}
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
@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
@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 / 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 / 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 / DualMPU9250Basic.ino
Created December 1, 2018 09:15
Dual MPU9250 libraries for M5stack
/**
* MPU9250 Basic Example Code for Dual MPU9250
* Copyright (c) 2014 Kris Winer
* Copyright (c) 2018 botamochi6277
* license: Beerware - Use this code however you'd like. If you
* find it useful you can buy me a beer some time.
*/
#include <M5Stack.h>
#include "utility/MPU9250.h"
@botamochi6277
botamochi6277 / test_run.cpp
Last active April 27, 2019 12:38
A ROS package to control Tamiya's Cam-Program Robot
/**
* @brief Drive brushed DC-motors with TB6612
* @author botamochi6277
*/
#include "ros/ros.h"
#include <iostream>
#include <chrono>
#include <thread>
#include <TB6612.hpp>
@botamochi6277
botamochi6277 / M5StackFire_MPU9250_ROS.ino
Created July 22, 2019 04:44
M5Stack, MPU9250 and ROS Publisher Example Code
/*
M5Stack Fire
M5Stack, MPU9250 and ROS Publisher Example Code
by: Kris Winer
date: April 1, 2014
license: Beerware - Use this code however you'd like. If you
find it useful you can buy me a beer some time.
Modified by Brent Wilkins July 19, 2016