Adventures in Minecraft by David Whale
Author:David Whale
Language: eng
Format: epub, pdf
ISBN: 9781118946855
Publisher: Wiley
Published: 2014-11-01T09:59:13+00:00
Finding the Serial Port Number
The Arduino you have just connected to your computer appears to the computer as a device called a serial port. I won’t go into the details of what that means in this book, but you do need to make sure that the anyio package selects the correct port before it will work as a GPIO extender.
I have written a little utility to do this for you, and it is included in the anyio package. Figure 5-5 shows a sample session using this utility, so you can see what it should normally look like.
To make sure the correct port is selected:
Open IDLE and click File⇒Open to browse for an existing Python program.
Inside the MyAdventures folder, open the file called findPort.py and it will load into the Python editor window.
Run the program by choosing Run⇒Run Module from the menu. You will get some onscreen instructions.
Unplug the USB lead from the Arduino end, then press Enter to start the scan. This step removes the USB lead from your computer so that the program can scan all available ports in your computer and build a list of any ports except the new one you are adding.
Next you will be asked to plug in the device so that the program can scan all available ports in your computer again, and use that to detect which new device has been added. Plug in your USB lead again, wait a couple of seconds, then press Enter again.
If this has been successful, you should get a message indicating the port name or number that has been found, and you should be asked if you want to remember this. Type a Y then press Enter. The findPort.py program (shown in Figure 5-5) then creates a file called findport.cache that remembers the port number of your Arduino. When you use any of the GPIO functions later it will be able to find the Arduino port correctly.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Pale Blue Dot by Carl Sagan(4589)
Pocahontas by Joseph Bruchac(4011)
Cracking the GRE Premium Edition with 6 Practice Tests, 2015 (Graduate School Test Preparation) by Princeton Review(4008)
Unfiltered by Lily Collins(3893)
The Emotionary: A Dictionary of Words That Don't Exist for Feelings That Do by Eden Sher(3199)
The Daily Stoic by Holiday Ryan & Hanselman Stephen(3083)
Factfulness_Ten Reasons We're Wrong About the World_and Why Things Are Better Than You Think by Hans Rosling(3033)
The President Has Been Shot!": The Assassination of John F. Kennedy by Swanson James L(2956)
Sapiens and Homo Deus by Yuval Noah Harari(2823)
Rogue Trader by Leeson Nick(2814)
The 48 laws of power by Robert Greene & Joost Elffers(2762)
The Rape Of Nanking by Iris Chang(2628)
Almost Adulting by Arden Rose(2569)
Gettysburg by Iain C. Martin(2558)
500 Must-Know AP Microeconomics/Macroeconomics Questions(2466)
The Plant Paradox by Dr. Steven R. Gundry M.D(2404)
In the Woods by Tana French(2372)
The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution by Walter Isaacson(2360)
Make by Mike Westerfield(2190)
