Intel Galileo: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 111: | Line 111: | ||
/sketch # |
/sketch # |
||
</pre> |
</pre> |
||
==Accès SSH== |
|||
Par defaut, la distribution fournie n'inclut pas de serveur SSH. |
|||
Pour y remedier, Intel met a disposition une image plus complete qui entre autre, en possède un: https://communities.intel.com/docs/DOC-22226 (LINUX IMAGE FOR SD for Intel Galileo) |
|||
Une fois telechargé, voir la section 11 du document "Quick Start Guide" pour mettre cette image sur une micro-SD. |
|||
Après avoir récupérer l'adresse IP via le programme décrit dans la section précédente, un <pre>ssh root@adresse_ip</pre> suffira. |
|||
==Programming GPIO From Linux== |
==Programming GPIO From Linux== |
Revision as of 23:50, 12 February 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 / # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 98:4F:EE:00:1B:23 inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::9a4f:eeff:fe00:1b23/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1479 errors:0 dropped:1 overruns:0 frame:0 TX packets:286 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:114528 (111.8 KiB) TX bytes:16432 (16.0 KiB) Interrupt:41 Base address:0x8000 / # cd sketch/ /sketch # ls sketch.elf /sketch #
Accès SSH
Par defaut, la distribution fournie n'inclut pas de serveur SSH. Pour y remedier, Intel met a disposition une image plus complete qui entre autre, en possède un: https://communities.intel.com/docs/DOC-22226 (LINUX IMAGE FOR SD for Intel Galileo) Une fois telechargé, voir la section 11 du document "Quick Start Guide" pour mettre cette image sur une micro-SD.
Après avoir récupérer l'adresse IP via le programme décrit dans la section précédente, un
ssh root@adresse_ip
suffira.
Programming GPIO From Linux
Ajout du Wifi
TODO http://www.malinov.com/Home/sergey-s-blog/intelgalileo-addingwifi
Projects @ AIR
Boitiers
- Sur Thingiverse (découpe laser, impression 3D).
Books
- “Getting Started with Intel Galileo” by Matt Richardson (coming soon ! Jan 22, 2014)