Presentation is loading. Please wait.

Presentation is loading. Please wait.

Python for intel Galileo GEN2 TYWu. Software Download/Setup "Bigger" Linux Image Download the Arduino IDE for Galileo –https://communities.intel.com/docs/DOC-22226.

Similar presentations


Presentation on theme: "Python for intel Galileo GEN2 TYWu. Software Download/Setup "Bigger" Linux Image Download the Arduino IDE for Galileo –https://communities.intel.com/docs/DOC-22226."— Presentation transcript:

1 Python for intel Galileo GEN2 TYWu

2 Software Download/Setup "Bigger" Linux Image Download the Arduino IDE for Galileo –https://communities.intel.com/docs/DOC-22226

3 Software Download/Setup Unzip SDCard.1.0.4.tar –image-full-galileo folder is generated

4 Software Download/Setup Copy all files/folder under image-full-galileo into your micro SD card Your SD directory structure should look like:

5 Running "Bigger" Linux Image (Option 1) Unplug the USB connector of Galileo Remove the Galileo power Plug in the µSD card. Then power it back up. Plug in the USB connector The first boot may take a little longer than average.

6 Running "Bigger" Linux Image (Option 2) Unplug the USB connector of Galileo Remove the Galileo power Plug in the µSD card. Then power it back up. Plug in the RS232-USB connector The first boot may take a little longer than average. You can use the terminal to verify that the bigger image is working. Try running Python, for example.

7 Running "Bigger" Linux Image RS232 to USB –Connect (RS232  Galileo) Black Wire  GND White Wire  TXO Green Wire  RXI

8 Running "Bigger" Linux Image Install Driver –Download the File http://www.prolific.com.tw/UserFiles/files/PL2303_Pr olific_DriverInstaller_v1_10_0_20140925.zip –Unzip –Install

9 Running "Bigger" Linux Image Install Tera Term –http://en.sourceforge.jp/projects/ttssh2/releas es/http://en.sourceforge.jp/projects/ttssh2/releas es/ –Download teraterm-4.80.exeteraterm-4.80.exe –Execute teraterm-4.80.exe for installation

10 Running "Bigger" Linux Image Open Tera Term –Select Serial Select COMxx: Prolific … –Setup  Serial Port  Change Baud rate to 115200 –Setup  Font

11 Running "Bigger" Linux Image In the Tera Term –Entry “Enter” –Enter “root” as login name

12 Python The first program helloworld.py #!/usr/bin/python # Hello world python program print "Hello World!"; Editor: vi How to execute it? –chmod 755 helloworld.py –./ helloworld.py

13 Python The second program blink.py

14 Python Install wiring-x86 wiring-x86 –In PC Download wiring-x86-master –https://github.com/emutex/wiring-x86https://github.com/emutex/wiring-x86 Unzip Rename the folder name to wiring-x86 Copy the wiring-x8 folder into the home directory of your micro SD card

15 Python Install wiring-x86 wiring-x86 –In Galileo Install wiring-x86 in Galileowiring-x86 Change Directory –/media/mmcblk0p1/wiring-x86 Entry –python setup.py install

16 Python program blink.py –Sorce http://www.emutexlabs.com/project/209- introduction-to-wiring-x86-for-intel-edison-and- galileo-gen2

17 Python program blink.py #!/usr/bin/env python import time from wiringx86 import GPIOGalileoGen2 as GPIO gpio = GPIO(debug=False) pin = 13 state = gpio.HIGH # Set pin 13 to be used as an output GPIO pin. print 'Setting up pin %d' % pin gpio.pinMode(pin, gpio.OUTPUT) print 'Blinking pin %d now...' % pin

18 Python try: while(True): # Write a state to the pin. ON or OFF. gpio.digitalWrite(pin, state) # Toggle the state. state = gpio.LOW if state == gpio.HIGH else gpio.HIGH # Sleep for a while. time.sleep(0.5) # When you get tired of seeing the LED blinking kill the loop with Ctrl-C. except KeyboardInterrupt: # Leave the LED turned off. print '\nCleaning up...' gpio.digitalWrite(pin, gpio.LOW) # Do a general cleanup. Calling this function is not mandatory. gpio.cleanup()

19 References https://learn.sparkfun.com/tutorials/galileo- getting-started- guide?_ga=1.175151777.2095379488.1416564 981https://learn.sparkfun.com/tutorials/galileo- getting-started- guide?_ga=1.175151777.2095379488.1416564 981 http://www.hksilicon.com/kb/articles/335724/x86 Arduino-Intel-Galileohttp://www.hksilicon.com/kb/articles/335724/x86 Arduino-Intel-Galileo http://wiring- x86.readthedocs.org/getting_started.htmlhttp://wiring- x86.readthedocs.org/getting_started.html http://www.emutexlabs.com/project/209- introduction-to-wiring-x86-for-intel-edison-and- galileo-gen2http://www.emutexlabs.com/project/209- introduction-to-wiring-x86-for-intel-edison-and- galileo-gen2


Download ppt "Python for intel Galileo GEN2 TYWu. Software Download/Setup "Bigger" Linux Image Download the Arduino IDE for Galileo –https://communities.intel.com/docs/DOC-22226."

Similar presentations


Ads by Google