This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# CMake configuration | |
# | |
# Please refer to http://www.cmake.org/cmake/help/documentation.html | |
# You may also refer to http://www.cmake.org/cmake/help/syntax.html for a quick | |
# introduction to CMake's syntax. | |
cmake_minimum_required (VERSION 2.8) | |
# The name of our project is "NODE". CMakeLists files in this project can |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GCC_BIN = | |
LIBRARY = ble_api | |
SRC_DIR := common public services | |
BUILD_DIR := $(addprefix build/,$(SRC_DIR)) | |
SRC := $(foreach sdir,$(SRC_DIR),$(wildcard $(sdir)/*.cpp)) | |
OBJ := $(patsubst %.cpp,build/%.o,$(SRC)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Use custom CMSIS DAP debug adapter with pyOCD | |
''' | |
from time import sleep | |
from random import randrange | |
from pyOCD.interface import INTERFACE, usb_backend | |
from pyOCD.board import MbedBoard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "mbed.h" | |
#include "USBKeyboard.h" | |
BusOut leds(LED1, LED2, LED3); //LED1: NUM_LOCK, LED2: CAPS_LOCK, LED3: SCROLL_LOCK | |
USBKeyboard keyboard; | |
int main(void) { | |
while (!keyboard.configured()) { // wait until keyboard is ready | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* led_breath.ino | |
* Use PWM to change LED's brightness | |
* Mode: | |
* Quadratic curve | |
* Linearity | |
*/ | |
#define NOT_USE_LINEARITY 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
// Pins' connection | |
// Arduino WiFly | |
// 2 <----> TX | |
// 3 <----> RX | |
SoftwareSerial wifly(2, 3); | |
void readWiFlyOutput() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$include /etc/hotplug2-common.rules | |
SUBSYSTEM ~~ (^net$|input$|^button$|^usb$|^ieee1394$|^block$|^atm$|^zaptel$|tty$) { | |
exec /sbin/hotplug-call %SUBSYSTEM% | |
} | |
DEVICENAME == watchdog { | |
exec /sbin/watchdog -t 5 /dev/watchdog | |
next-event | |
} |
NewerOlder