Skip to content

Instantly share code, notes, and snippets.

View Linuxhombre's full-sized avatar

LinuxHombre Linuxhombre

View GitHub Profile
/*
* --------------------------------------------------------------------------------------------------------------------
* Example sketch/program showing how to read data from a PICC to serial.
* --------------------------------------------------------------------------------------------------------------------
* This is a MFRC522 library example; for further details and other examples see: https://github.com/miguelbalboa/rfid
*
* Example sketch/program showing how to read data from a PICC (that is: a RFID Tag or Card) using a MFRC522 based RFID
* Reader on the Arduino SPI interface.
*
* When the Arduino and the MFRC522 module are connected (see the pin layout below), load this sketch into Arduino IDE
@ydn
ydn / node-weather.js
Last active November 19, 2022 15:36
Weather API
var YQL = require('yql');
var query = new YQL('select * from weather.forecast where (location = 94089)');
query.exec(function(err, data) {
var location = data.query.results.channel.location;
var condition = data.query.results.channel.item.condition;
console.log('The current weather in ' + location.city + ', ' + location.region + ' is ' + condition.temp + ' degrees.');
});
@benjjo
benjjo / shiftOutDisplay
Last active July 1, 2019 18:09
Shiftbit registers can be a little tricky to setup so I designed this simple Hello World code for doing just that. This example uses a 74HC595 Shift Register in conjunction with a common anode seven segment display. This code is designed to shift the "HIGH" value on the Shift Bit Register from Q0-Q7. This is achieved by sending the values 1,2,4,…
/*
********************************************************************
Name : shiftOutDisplay, Test code
Author : Benjo Charlie
Date : 13 Sept, 2013
Version : 1.0
Notes : Shiftbit registers can be a little tricky to setup so I
: designed this simple Hello World code for doing just that.
: This example uses a 74HC595 Shift Bit Register in conjunction
: with a common anode seven segment display.
@jaywilliams
jaywilliams / csv_to_array.php
Created April 30, 2010 23:18
Convert a comma separated file into an associated array.
<?php
/**
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
*
* Example:
*
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array