Last active
August 29, 2015 14:23
-
-
Save kumekay/3bbd265bf465670d6c1b to your computer and use it in GitHub Desktop.
Galileo sketches
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
#include <Wire.h> | |
#include <Adafruit_BMP085.h> | |
// | |
Adafruit_BMP085 bmp; | |
void setup() { | |
Serial.begin(9600); | |
if (!bmp.begin()) { | |
Serial.println("Could not find BMP085 sensor"); | |
while (1) {} | |
} | |
} | |
void loop() { | |
Serial.print("Temperature = "); | |
Serial.print(bmp.readTemperature()); | |
Serial.println(" *C"); | |
Serial.print("Pressure = "); | |
Serial.print(bmp.readPressure()); | |
Serial.println(" Pa"); | |
delay(5000); | |
} | |
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
void setup() | |
{ | |
// Click Start > Control Panel. | |
// Click Programs and Features. | |
// Click Turn Windows features on or off. | |
// In the Windows Features dialog box, check the Telnet Client check box. | |
// Click OK. The system installs the appropriate files. This will take a few seconds to a minute. | |
// put your setup code here, to run once: | |
system("telnetd -l /bin/sh"); //Start the telnet server on Galileo | |
system("ifup -a"); | |
Serial.begin(9600); | |
//It’ll not continue until you send an ‘a’ through the serial monitor | |
while(Serial.read()!='a'){ | |
Serial.println("hello"); | |
delay(1000); | |
} | |
system("ifconfig > /dev/ttyGS0"); | |
} | |
void loop(){ | |
} |
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
void setup() | |
{ | |
// put your setup code here, to run once: | |
system("telnetd -l /bin/sh"); //Start the telnet server on Galileo | |
system("ifconfig eth0 192.168.2.5 netmask 255.255.255.0 up"); | |
} | |
void loop(){} |
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
void setup() { | |
Serial.begin(9600); | |
//It’ll not continue until you send an ‘a’ through the serial monitor | |
while(Serial.read()!='a'){ | |
Serial.println("hello"); | |
delay(1000); | |
} | |
//Display ifconfig result to serial monitor | |
system("ifconfig > /dev/ttyGS0"); | |
} | |
void loop() { | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Linux: https://software.intel.com/en-us/iot/hardware/galileo/downloads