Python for intel Galileo GEN2 TYWu
Software Download/Setup "Bigger" Linux Image Download the Arduino IDE for Galileo –
Software Download/Setup Unzip SDCard tar –image-full-galileo folder is generated
Software Download/Setup Copy all files/folder under image-full-galileo into your micro SD card Your SD directory structure should look like:
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.
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.
Running "Bigger" Linux Image RS232 to USB –Connect (RS232 Galileo) Black Wire GND White Wire TXO Green Wire RXI
Running "Bigger" Linux Image Install Driver –Download the File olific_DriverInstaller_v1_10_0_ zip –Unzip –Install
Running "Bigger" Linux Image Install Tera Term – es/ es/ –Download teraterm-4.80.exeteraterm-4.80.exe –Execute teraterm-4.80.exe for installation
Running "Bigger" Linux Image Open Tera Term –Select Serial Select COMxx: Prolific … –Setup Serial Port Change Baud rate to –Setup Font
Running "Bigger" Linux Image In the Tera Term –Entry “Enter” –Enter “root” as login name
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
Python The second program blink.py
Python Install wiring-x86 wiring-x86 –In PC Download wiring-x86-master – Unzip Rename the folder name to wiring-x86 Copy the wiring-x8 folder into the home directory of your micro SD card
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
Python program blink.py –Sorce introduction-to-wiring-x86-for-intel-edison-and- galileo-gen2
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
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()
References getting-started- guide?_ga= https://learn.sparkfun.com/tutorials/galileo- getting-started- guide?_ga= Arduino-Intel-Galileohttp:// Arduino-Intel-Galileo x86.readthedocs.org/getting_started.htmlhttp://wiring- x86.readthedocs.org/getting_started.html introduction-to-wiring-x86-for-intel-edison-and- galileo-gen2http:// introduction-to-wiring-x86-for-intel-edison-and- galileo-gen2