Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
wiki:tutoriels:intel_galileo_arduino [2016/12/17 19:16] royce |
wiki:tutoriels:intel_galileo_arduino [2020/10/05 14:39] (Version actuelle) |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | **Introduction** - Most users of the RPi, Beagle Bone, or any other Arduino platform are probably familiar with the ARM microcontrollers used on these respective platforms. The Intel Galileo is unique in that is uses a x86 family microprocessor. ARM and x86 differ at a fundament level: the size of their instruction set. ARM is a RISC (Reduced Instruction Set Computing, a smaller, simpler instruction set) architecture and x86 processors are CISC (Complex Instruction Set Computing, a more complex, and powerful set). Something that takes an x86 one clock cycle, might take an ARM processor three. | + | |
+ | Most users of the RPi, Beagle Bone, or any other Arduino platform are probably familiar with the ARM microcontrollers used on these respective platforms. The Intel Galileo is unique in that is uses a x86 family microprocessor. ARM and x86 differ at a fundament level: the size of their instruction set. ARM is a RISC (Reduced Instruction Set Computing, a smaller, simpler instruction set) architecture and x86 processors are CISC (Complex Instruction Set Computing, a more complex, and powerful set). Something that takes an x86 one clock cycle, might take an ARM processor three. | ||
However, because the Quark X1000 was develloped in partnership with Arduino, it is entirely possible to download the Arduino IDE directly onto the Galileo. This will allow, in essence, to have a fully operational arduino uno R3 directly integrated onto the board. It will even be compatible with all R3 libraries and all arduino 3.3V/5V shields! | However, because the Quark X1000 was develloped in partnership with Arduino, it is entirely possible to download the Arduino IDE directly onto the Galileo. This will allow, in essence, to have a fully operational arduino uno R3 directly integrated onto the board. It will even be compatible with all R3 libraries and all arduino 3.3V/5V shields! | ||
- | **Download & Install (PC)** | + | |
+ | **__<fs large> | ||
+ | |||
+ | **//For Windows//** | ||
The Arduino IDE (1.6.0 /V1.8) can be downloaded [[http:// | The Arduino IDE (1.6.0 /V1.8) can be downloaded [[http:// | ||
- | The .ZIP file should be unpacked directly onto the " | + | The .ZIP file should be unpacked directly onto the "C:/Galileo/" with a name that includes NO SPACES! |
You can then open the Arduino.exe to run | You can then open the Arduino.exe to run | ||
- | **Download & Install (Linux)** | + | |
The Arduino IDE (1.6.0 /V1.8) can be downloaded [[http:// | The Arduino IDE (1.6.0 /V1.8) can be downloaded [[http:// | ||
Ligne 20: | Ligne 24: | ||
Once installed, run the arduino file in the extracted directory. From a terminal, you can enter ./arduino to run it. | Once installed, run the arduino file in the extracted directory. From a terminal, you can enter ./arduino to run it. | ||
- | **Update Driver** | + | |
To start, plug in the " | To start, plug in the " | ||
- | **NOTE**//Do not plug the USB cable into your PC until you have first plugged the power supply into the card (and the wall obviously) | + | |
- | *// | + | |
+ | |||
+ | You must visit [[https:// | ||
+ | *Unzip this file into: C:/ | ||
+ | |||
+ | ***NOTE** Do not plug the USB cable into your PC until you have first plugged the power supply into the card (and the wall obviously) | ||
+ | | ||
+ | **// | ||
* Goto the window' | * Goto the window' | ||
- | * | + | * Select " |
+ | * Right click, and " | ||
+ | * Select " | ||
+ | * Search within the folder C:/ | ||
+ | * After a few loading bars, you will be asked to verify the update. Select yes. | ||
+ | {{ : | ||
+ | * The " | ||
+ | |||
+ | * After updating the driver, right click the " | ||
+ | * Open proprietes | ||
+ | * Select the COM parameters tab | ||
+ | * Select " | ||
+ | * Change Port number. Make sure the number is under 10 | ||
+ | * **Note** This is only a precautionary measure as there are reported bugs when the COM# is superior than 10. | ||
+ | |||
+ | |||
+ | **//For Linux//** | ||
+ | * Open terminal | ||
+ | * type " ls/ | ||
+ | * Restart the udev: sudo service udev restart | ||
+ | * Note the COM# | ||
+ | |||
+ | **__<fs large> | ||
+ | |||
+ | Now that the COM# is known and the latest driver has been installed we must update the firmware witin the Galielo Gen2. | ||
+ | |||
+ | {{ : | ||
+ | *Open " | ||
+ | *Make sure at this point that your PC battery is not near empty | ||
+ | *Chose the proper COM# for your device under " | ||
+ | *Update Firmware | ||
+ | {{ : | ||
+ | * You will be prompted to confirm an external power for the Galileo | ||
+ | * OK | ||
+ | {{ : | ||
+ | *You will be asked to confirm the update | ||
+ | *Yes | ||
+ | {{ : | ||
+ | ***DO NOT UNPLUG YOUR GALILEO OR TOUCH ANY BUTTONS** | ||
+ | ***DO NOT SHUT OF YOUR PC** | ||
+ | *The update takes about 3-5 minutes | ||
+ | *When finished you will be prompted concerni | ||
+ | |||
+ | **__<fs large> Section Conclusion</ | ||
+ | |||
+ | The Intel Galileo Gen 2 has now been properly installed onto your PC/MAC and the drivers are installed. Also, we are now sure of the current firmware installed onto the galileo which should allow us to more efficently select development tools that exist. | ||
+ | |||
+ | The Arduino IDE for the Galileo is now installed onto your PC. We are also now sure of the COM# of your device and that the driver is fully updated. This will the most basic means of programming Intel' | ||
+ | |||
+ | **__<fs large> Arduino example</ | ||
+ | |||
+ | **//Board Setup//** | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | *Upon running the Arduino IDE select the " | ||
+ | * Select " | ||
+ | * Select " | ||
+ | |||
+ | The board will no be properly in sync with the Arduino IDE and we can start to program in the Arduino IDE. I would advise any user that is not already familiar with Arduino to visit their [[https:// | ||
+ | |||
+ | However, know that there exist a number website that already have a lot of basic " | ||
+ | *[[http:// | ||
+ | *[[https:// | ||
+ | Also, there are a number of websites that have well documented projects that will have snippets of code already attached | ||
+ | *[[http:// | ||
+ | *[[http:// | ||
+ | |||
+ | |||
+ | {{ : | ||
+ | Lastly, remember that the Arduino IDE has an EXTENSIVE list of prewritten scripts that will help the new user (and the experienced alike) to directly start using their Arduino! In the above photo I have highlighted the " | ||
+ | |||
+ | **//The Blink LED 13 test//** | ||
+ | |||
+ | With the Arduino IDE open and configured to the proper COM#/ | ||
+ | {{ : | ||
+ | *Goto " | ||
+ | * Scroll to Examples/ | ||
+ | * Select " | ||
+ | |||
+ | {{ : | ||
+ | * The " | ||
+ | * Let's take a closer look at this code | ||
+ | * **// | ||
+ | * Line 18 we have "void setup() {" | ||
+ | * In the future everything that falls between the " | ||
+ | * Line 20 " pinMode(13, | ||
+ | * Within the void setup, this means that all signals at pin13 on the galileo will be outgoing. This could be a signal to open a transistor, a signal to a DC motor, a feed back from a sensor, or be used to blink a led | ||
+ | * Line 21 " | ||
+ | * End of the setup. All setup instructions MUST be found before this | ||
+ | * Line 24 void loop() { | ||
+ | * Anything found after this command (in the most basic uses) will be the main function of your code. Here is where we will tell the Galileo what to do with our various pins found on the card. Remember we have already defined which pins will be used and how. So now we.. | ||
+ | * Line 25 digitalWrite(13, | ||
+ | * We will " | ||
+ | * Line 26 delay(1000); | ||
+ | * We delay 1000 miliseconds or 1 second | ||
+ | * Line 27 digitalWrite(1000); | ||
+ | * Now we write a new message to pin 13 telling it to be " | ||
+ | * Line 28 delay(1000); | ||
+ | * same as line 26 | ||
+ | * Line 29 " | ||
+ | * This marks the end of the Block "void loop()" | ||
+ | |||
+ | {{ : | ||
+ | * We now select the " | ||
+ | * The downloading process may take a few seconds. **// | ||
+ | * The " | ||
+ | |||
+ | That's it. You will notice that on your Galileo board there is now a green LED blinking next to the "USB host" port. This led is hardwired directly to the pin 13. We could easily place a small led (with a 100ohm resistance in series) with another pin#. We would simply need to change the lines: | ||
+ | *20 | ||
+ | *25 | ||
+ | *27 | ||
+ | |||
+ | |||
+ | **__<fs large> | ||
+ | |||
+ | This is the most basic means of using the Intel Galileo. We have now been introduced to the Arduino side of the board. However, to use only this would be a poor use of this board as the Uno is capable of this type of project and is quicker. The next sections of this tutorial will now explain how we can install Linux onto the Galileo Gen 2. | ||
+ | |||
+ | The interest of installing Linux is that we will have the means to use: | ||
+ | |||
+ | ***WiFi drivers** – The Galileo supports all Intel-chipset WiFi cards with these drivers. Plug them in, and they should be recognized immediately. | ||
+ | ***Python** – Python is our favorite when it comes to scripting languages. With Python you can easily post to Twitter, check for unread emails, and perform all sorts of other nifty tricks. | ||
+ | ***Node.js** – Node.js is a popular JavaScript-based scripting language. A good alternative to Python, if you’re more comfortable with JS. | ||
+ | ***SSH** – Secure Shell (SSH) is an incredibly useful network tool that allows you to log into and control a device remotely. With SSH running on your network-connected Galileo, you can skip both of the terminal methods described on the last page, and remotely control the board from any device on the network. | ||
+ | ***openCV** – OpenCV is an open-source computer vision application. You can plug a USB webcam into the Galileo’s USB host port, and use OpenCV to track and recognize objects. | ||
+ | ***ALSA** – Advanced Linux Sound Architectures (ALSA) can equip your Galileo (and an attached sound card) with the ability to play and record MIDI files. | ||
+ | ***V4L2** – Video4Linux2 is a video record and play utility for Linux. You’ll need a USB webcam attached to your Galileo to make use of this. | ||
+ | |||
+ | [[http:// | ||
+ | [[http:// | ||