Skip to content

Instantly share code, notes, and snippets.

@kumekay
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kumekay/3bbd265bf465670d6c1b to your computer and use it in GitHub Desktop.
Save kumekay/3bbd265bf465670d6c1b to your computer and use it in GitHub Desktop.
Galileo sketches
#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);
}
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(){
}
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(){}
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() {
}
@kumekay
Copy link
Author

kumekay commented Jun 22, 2015

@kumekay
Copy link
Author

kumekay commented Jun 23, 2015

@kumekay
Copy link
Author

kumekay commented Jun 23, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment