Skip to content

Instantly share code, notes, and snippets.

@jlesech
jlesech / assert.ino
Created July 11, 2012 11:55
How to use assertions with Arduino.
#define __ASSERT_USE_STDERR
#include <assert.h>
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;
// the setup routine runs once when you press reset:
void setup() {
@jlesech
jlesech / pyTWI.py
Created July 30, 2012 17:25
Python script which allow to compute TWI configuration register values (TWBR and TWPS) for an ATmega328P.
#!/usr/bin/env python
# encoding: utf-8
"""
Copyright (C) 2012 Julien Le Sech - www.idreammicro.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@jlesech
jlesech / Main.cs
Created March 15, 2014 13:33
Mono-Mongo/Default serialization
using System;
using MongoDB.Driver;
namespace Race
{
class MainClass
{
public static void Main (string[] args)
{
@jlesech
jlesech / Main.cs
Created March 15, 2014 13:40
Mono-Mongo/Serialization with attributes
using System;
using MongoDB.Driver;
namespace Race
{
class MainClass
{
public static void Main (string[] args)
{
@jlesech
jlesech / Main.cs
Created March 15, 2014 13:41
Mono-Mongo/Serialization with ClassMap
using System;
using MongoDB.Bson.Serialization;
using MongoDB.Driver;
namespace Race
{
class MainClass
{
public static void Main (string[] args)