Skip to content

Instantly share code, notes, and snippets.

View yuasatakayuki's full-sized avatar

Takayuki Yuasa yuasatakayuki

View GitHub Profile
@yuasatakayuki
yuasatakayuki / nucleo_l432kc_accelerometer_buzzer.cpp
Last active June 4, 2017 13:18
NUCLEO-L432KC accelerometer example
#include "mbed.h"
#include "LIS3DH.h"
#include <math.h>
#define USE_LED
#define USE_SERIAL
#ifdef USE_SERIAL
Serial pc(SERIAL_TX, SERIAL_RX);
#endif
@yuasatakayuki
yuasatakayuki / Dockerfile
Created June 30, 2017 13:02
Example Dockerfile that builds RubyFits on Scientific Linux 6
FROM cern/slc6-base
# Instll prerequisites - yum
RUN yum install -y wget zlib zlib-devel bzip2 bzip2-devel readline-devel git cmake tar gzip
RUN yum groupinstall -y "Development Tools"
RUN wget https://gist.githubusercontent.com/mustafaturan/8290150/raw/a85c6194f36d7b08b7b97bdf676fa5f945815b70/ruby.2.4.0-setup.sh; \
bash ruby.2.4.0-setup.sh
RUN wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/Openwsman/CentOS_CentOS-6/x86_64/swig-3.0.2-5.1.x86_64.rpm; \
require 'RubyROOT'
require 'colorable'
DEFAULT_CANVAS_WIDTH = 600
DEFAULT_CANVAS_HEIGHT = 600
DEFAULT_FONT = 43 # Helvetica
DEFAULT_FONT_SIZE = 16
DEFAULT_FONT_SIZE_TITLE = 18
Root.gROOT.SetStyle('Plain')
#include <SoftwareSerial.h>
// Serial.print() outputs to the USB-UART (i.e. eventually to the PC).
//
uint8_t PIN_ORANGE_LED = PD7;
uint8_t PIN_BUZZER = PD6;
uint8_t PIN_SOFT_UART_RX = PD4;
const uint8_t BUFFER_SIZE = 16;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.