Skip to content

Instantly share code, notes, and snippets.

View bblanchon's full-sized avatar
🌟
No more counting dollars we’ll be counting stars

Benoît Blanchon bblanchon

🌟
No more counting dollars we’ll be counting stars
View GitHub Profile
@bblanchon
bblanchon / ConvertCsFilesToCrlf.sh
Created February 26, 2014 13:02
Convert all *.cs files to DOS line ending (CR/LF)
find -name *.cs -exec dos2unix -A {} ;
@bblanchon
bblanchon / Openweathermap.ino
Last active August 29, 2015 13:56
Test ArduinoJsonParser with openweathermap.org
char* json = "{\"coord\":{\"lon\":-0.13,\"lat\":51.51},\"sys\":{\"message\":0.0045,\"country\":\"GB\",\"sunrise\":1393397445,\"sunset\":1393436151},\"weather\":[{\"id\":802,\"main\":\"Clouds\",\"description\":\"scattered clouds\",\"icon\":\"03d\"}],\"base\":\"cmc stations\",\"main\":{\"temp\":283.27,\"pressure\":1014,\"humidity\":61,\"temp_min\":280.93,\"temp_max\":286.48},\"wind\":{\"speed\":5.7,\"deg\":270},\"clouds\":{\"all\":40},\"dt\":1393414204,\"id\":2643743,\"name\":\"London\",\"cod\":200}";
JsonParser<80> parser;
JsonHashTable root = parser.parseHashTable(json);
Serial.print("City = ");
Serial.println(root.getString("name"));
Serial.print("Weather = ");