Skip to content

Instantly share code, notes, and snippets.

View stoffera's full-sized avatar

Kristoffer Andersen stoffera

  • Phase One
  • Copenhagen
View GitHub Profile
@stoffera
stoffera / Sketch.ino
Created October 2, 2019 20:07
OpenMono Display BMP using Arduino
#include <mono.h>
#include <io/file_system.h>
#include <stdio.h>
mono::io::FileSystem* fs; // create an instance of the FS I/O
mono::media::BMPImage* img; // create a bmp image representation
mono::ui::ImageView* bmpView; // create a UI view to display the image
void setup() {
// put your setup code here, to run once:
@stoffera
stoffera / AppController.cpp
Created October 2, 2019 19:57
Display BMP on OpenMono
#include "app_controller.h"
AppController::AppController() :
fs("sd"),
img("/sd/mono/mockups/ToDo.bmp"),
bmpView(&img)
{
}
void AppController::monoWakeFromReset()
@stoffera
stoffera / .gitconfig
Created May 14, 2019 18:41
Git config
[color]
branch = auto
diff = auto
interactive = auto
status = auto
grep = auto
ui = auto
[alias]
ci = commit
@stoffera
stoffera / app_controller.cpp
Last active June 9, 2017 13:26
Mono: Swipe between Pages (Scenes) App
#include "app_controller.h"
#include <Fonts/FreeSerif24pt7b.h>
#include <Fonts/FreeSans9pt7b.h>
using namespace mono::geo;
AppController::AppController() :
helloLabel(Rect(0,110-35,176,70), "Slide Left\nor right"),
scnOne(Rect(10,10,156,20), "Scene One"),
scnTwo(Rect(10,10,156,20), "Scene Two")
@stoffera
stoffera / psoc_battery_voltage.cpp
Created March 29, 2017 19:17
Mono Battery Voltage Sample
// This software is part of OpenMono, see http://developer.openmono.com
// and is available under the MIT license, see LICENSE.txt
#include "psoc_battery_voltage.h"
#include <mbed.h>
extern "C" {
#include <project.h>
}
@stoffera
stoffera / Makefile
Last active September 1, 2017 16:26
Mono App Makefile, to compile full framework
TARGET = mono_app
ARCH="arm-none-eabi-"
FLASH_SIZE=262144
FLASH_ROW_SIZE=256
FLASH_ARRAY_SIZE=65536
EE_ARRAY=64
EE_ROW_SIZE=16
OPTIMIZATION = -O0
BUILD_DIR=build
FRAMEWORK_PATH=../../mono_framework/src