Intel Galileo: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 98: | Line 98: | ||
sketch.elf |
sketch.elf |
||
/sketch # |
/sketch # |
||
<pre> |
</pre> |
||
==Projects @ AIR== |
==Projects @ AIR== |
Revision as of 14:40, 23 January 2014
Arduino-compatible board build on a x86 SoC by Intel.
http://arduino.cc/en/ArduinoCertified/IntelGalileo
Premiers sketches
- Blink OK
- AnalogReadSerial OK
- MonsterMotoShield KO
Notes de mise en route
"Quick Start Guide", Section 11
If you want to use WiFi, you must follow these steps. The WiFi driver is not present in the Linux image in SPI flash because it is too large. The Linux SD image also includes ALSA, V4L2, python, SSH, node.js, and openCV.
Linux Python script from Arduino sketch
/* This example uses Linux system calls to create a python script which writes number 0-9 to a file, log.txt, one number per second. Then execute the python script in the background, and regularly read the contents of the logfile in the sketch while the python script is updating it. */ char output[3]; void setup() { Serial.begin(115200); system("echo '#!/usr/bin/python' > myScript.py"); system("echo 'import time' >> myScript.py"); system("echo 'for i in range(10):' >> myScript.py"); system("echo ' with open(\"log.txt\", \"w\") as fh:' >> myScript.py"); system("echo ' fh.write(\"{0}\".format(i))' >> myScript.py"); system("echo ' time.sleep(1)' >> myScript.py"); system("chmod a+x myScript.py"); system("./myScript.py &"); } void loop() { FILE *fp; fp = fopen("log.txt", "r"); fgets(output, 2, fp); fclose(fp); Serial.println(output); delay(1000); }
Accès via Telnet
// How to – Use Galileo Linux using an Ethernet cable and a home network Router(DHCP server) // https://communities.intel.com/message/208564 void setup() { system("telnetd -l /bin/sh"); } void loop() { system("ifconfig eth0 > /dev/ttyGS0"); sleep(20); }
$ telnet 192.168.1.2 Trying 192.168.1.2... Connected to new-host-3.home. Escape character is '^]'. Poky 9.0 (Yocto Project 1.4 Reference Distro) 1.4.1 clanton / # ls bin dev home lib mnt proc sbin sys usr boot etc init media opt root sketch tmp var / # uname -a Linux clanton 3.8.7-yocto-standard #1 Mon Sep 16 14:59:19 IST 2013 i586 GNU/Linux / # cd sketch/ /sketch # ls sketch.elf /sketch #
Projects @ AIR
Boitiers
- Sur Thingiverse (découpe laser, impression 3D).
Books
- “Getting Started with Intel Galileo” by Matt Richardson (coming soon ! Jan 22, 2014)