Skip to content

Instantly share code, notes, and snippets.

View janjongboom's full-sized avatar

Jan Jongboom janjongboom

View GitHub Profile
@janjongboom
janjongboom / main.cpp
Created June 3, 2017 06:47
Memory breakpoint testing mbed OS 5
#include "mbed.h"
DigitalOut led1(LED1);
// main() runs in its own thread in the OS
int main() {
Serial pc(USBTX, USBRX);
pc.baud(115200);
char test[200];
@janjongboom
janjongboom / c_cpp_properties.json
Last active March 10, 2017 08:36
VsCode config for mbed OS 5 (blinky on K64F)
{
"configurations": [
{
"includePath": [
"${workspaceRoot}/*",
"${workspaceRoot}/img/*",
"${workspaceRoot}/mbed-os/*",
"${workspaceRoot}/mbed-os/cmsis/*",
"${workspaceRoot}/mbed-os/cmsis/TOOLCHAIN_GCC/*",
"${workspaceRoot}/mbed-os/drivers/*",
static void start_filling_up() {
void* buffer;
uint32_t allocated = 0;
uint32_t size = 4096;
while (true) {
if (size == 64) break;
buffer = malloc(size);
{ "text": "-interpreter-exec console \"monitor endian little\"", "description": "monitor1", "ignoreFailures": false },
{ "text": "-interpreter-exec console \"monitor reset\"", "ignoreFailures": false },
{ "text": "-interpreter-exec console \"monitor halt\"", "ignoreFailures": false },
{ "text": "-interpreter-exec console \"monitor arm semihosting enable\"", "ignoreFailures": false },
@janjongboom
janjongboom / vscode.js
Last active January 5, 2023 07:30
Cloud9 IDE keybindings for Visual Studio Code
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "cmd+e",
"command": "workbench.action.quickOpen"
},
{
"key": "shift+cmd+e",
"command": "workbench.action.gotoSymbol"
},
@janjongboom
janjongboom / codefest.md
Created March 27, 2016 02:51
Building IoT devices for fun & profit - Codefest 2016

Codefest

  • Jan Jongboom, Developer Evangelist IoT for ARM. Used to be a web dev for the longest time, worked as Core OS engineer on Firefox OS, Google Developer Expert for Web. Switched to embedded'ish. Still like to explore things that are on the boundary of physical devices and web.
  • As developers we're very focused on whatever is happening on the device. Optimizing performance, getting data out of sensors, all very nice.
  • Very limited world view. The world is so much bigger than what your phone can see. We want to interact with the physical world.
  • Internet of Things: building smart devices that can help us get more meaningful information out of the real world. Not talking about the smart fridge here. Some really good ideas. Here's some that I worked on in an office building:
  • If toilet doors are smart, they can count the number of times the toilet is used, can send cleaning staff more efficiently around the building. Not cleaning toilets that are never used.
  • If a meeting room is smart, it can let
@janjongboom
janjongboom / eddystone-and-normal-ble-package.cpp
Created January 11, 2016 16:06
Broadcasting both Eddystone and a normal BLE package on mbed
#include "mbed-drivers/mbed.h"
#include "minar/minar.h"
#include "core-util/FunctionPointer.h"
#include "ble/BLE.h"
#include "eddystone/EddystoneService.h"
using namespace mbed::util;
// Eddystone URL
static const char defaultUrl[] = "https://control.me";
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Web Bluetooth demo</title>
</head>
<body>
<button id="go">Go Bluetooth</button>
<script>
document.querySelector('#go').onclick = (e) => {
@janjongboom
janjongboom / find.js
Created January 4, 2016 19:49
Find by filename Cloud9 plugin
define(function(require, exports, module) {
main.consumes = ["Plugin", "find"];
main.provides = ["fif"];
return main;
function main(options, imports, register) {
var Plugin = imports.Plugin;
var find = imports.find;
var plugin = new Plugin('Yolo', main.consumes);
@janjongboom
janjongboom / server.js
Created October 15, 2015 12:01
aws-iot-with-nodejs
"use strict";
var mqtt = require('mqtt');
var fs = require('fs');
var Path = require('path');
var express = require('express');
var app = express();
var http = require('http').Server(app);
var io = require('socket.io')(http);
var co = require('co');