Chromium OS is cool. Chromium OS with crouton is cooler. Chromium OS with Docker is even cooler. This is specifically a guide for the Chromebook Pixel 2 (2015), but I can't think of any reason it wouldn't work with other devices.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned long getNtpTime() { | |
unsigned long timeFromNTP; | |
const unsigned long seventy_years = 2208988800UL; | |
ether.ntpRequest(ntpServer, ntpMyPort); | |
Serial.println("NTP request sent"); | |
while(true) { | |
word length = ether.packetReceive(); | |
ether.packetLoop(length); | |
if(length > 0 && ether.ntpProcessAnswer(&timeFromNTP,ntpMyPort)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simple demo for feeding some random data to Pachube. | |
// Based on pachube.pde 2011-07-08 <[email protected]> http://opensource.org/licenses/mit-license.php | |
// Created by <[email protected]> | |
// This has been tested with EtherCard rev 7752 | |
// Get it from http://jeelabs.net/projects/11/wiki/EtherCard | |
#include <EtherCard.h> | |
// change these settings to match your own setup | |
#define FEED "33735" |