Skip to content

Instantly share code, notes, and snippets.

//
// GMFHeadlineList.h
// GMF
//
// Created by Vincent Demay on 28/09/11.
// Copyright (c) 2011 Goojet. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "GMFLinkSeparator.h"
@vdemay
vdemay / OAuth.php
Created December 27, 2011 13:13
Scoop.it OAuth
<?php
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
#include <asf.h>
static void config_led(void)
{
struct port_config pin_conf;
port_get_config_defaults(&pin_conf);
//BUTTON
pin_conf.direction = PORT_PIN_DIR_INPUT;
pin_conf.input_pull = PORT_PIN_PULL_UP;
@vdemay
vdemay / gist:0e98b2519aa1e99b90b4
Created November 17, 2015 11:51
set up temperature resolution on DS18B20
ds.search(addr); // address on 1wire bus
if (addr[0] == DS18B20) // check we are really using a DS18B20
{
ds.reset(); // rest 1-Wire
ds.select(addr); // select DS18B20
ds.write(0x4E); // write on scratchPad
ds.write(0x00); // User byte 0 - Unused
ds.write(0x00); // User byte 1 - Unused
ds.search(addr); // address on 1wire bus
if (addr[0] == DS18B20) // check we are really using a DS18B20
{
ds.reset(); // rest 1-Wire
ds.select(addr); // select DS18B20
ds.write(0x4E); // write on scratchPad
ds.write(0x00); // User byte 0 - Unused
ds.write(0x00); // User byte 1 - Unused
@vdemay
vdemay / gist:fd04589eddbc2fc8716e
Created December 1, 2015 09:59
set up temperature resolution on DS18B20 and store it
ds.search(addr); // address on 1wire bus
if (addr[0] == DS18B20) // check we are really using a DS18B20
{
ds.reset(); // rest 1-Wire
ds.select(addr); // select DS18B20
ds.write(0x4E); // write on scratchPad
ds.write(0x00); // User byte 0 - Unused
ds.write(0x00); // User byte 1 - Unused