Most viewed recipes tagged "arduino"http://code.activestate.com/recipes/tags/arduino/views/2011-07-31T16:14:48-07:00ActiveState Code Recipescsc prototype to arduino board with python API. part I (C) 2010-12-26T12:14:33-08:00cheeng shu chinhttp://code.activestate.com/recipes/users/163970/http://code.activestate.com/recipes/577520-csc-prototype-to-arduino-board-with-python-api-par/ <p style="color: grey"> C recipe 577520 by <a href="/recipes/users/163970/">cheeng shu chin</a> (<a href="/recipes/tags/api/">api</a>, <a href="/recipes/tags/arduino/">arduino</a>, <a href="/recipes/tags/c/">c</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/serial/">serial</a>). Revision 2. </p> <p>Few day ago, i'm try out arduino UNO robotic board. found it not that easy to use (C &lt;--> Python). I wrote a arduino UNO prototype to serial API, which can interface to any programming Language. as long as the programming Language can interface to virtual serial port and using serial API, this recipe can be use... Requirement:</p> <p>Upload this recipes to arduino uno with my prototype code (name "csc.pde" as below)</p> <p>Base concept:</p> <ol> <li>wait from serial reply "?" and ready for read</li> <li>pass function name as string to arduino uno</li> <li>pass all argument as string to arduino uno</li> <li>read result as string from arduino uno</li> </ol> <p>Can easy extend it to support:</p> <ol> <li>python API(open source and i like most) in part II</li> <li>other arduino board</li> <li>Bluetooth with serial interface</li> <li>any PC can control the arduino board easily via your prefer Language.</li> <li>interrupt </li> </ol> <p>Future add-on:</p> <ol> <li>Json string passing to arduino</li> <li>Json Reply from arduino</li> <li>thread base design</li> <li>Interrupt direct call</li> </ol> <p>Please study it and extend it and share among open source members especially in python... :)</p> <p>Next <a href="http://code.activestate.com/recipes/577521-csc-prototype-to-arduino-board-with-python-api-par/">Part II</a></p> Kids Level Analogue Data Logger, (Transient Recorder), Program. (Python) 2011-07-31T16:14:48-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577796-kids-level-analogue-data-logger-transient-recorder/ <p style="color: grey"> Python recipe 577796 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/analogue/">analogue</a>, <a href="/recipes/tags/anim/">anim</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/arduino/">arduino</a>, <a href="/recipes/tags/data/">data</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/display/">display</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/logger/">logger</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/program/">program</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>). Revision 2. </p> <p>This code is kids level Analogue Data-Logger(/Transient-Recorder), using the Arduino series of dev' boards.</p> <p>It is no where near completion and is a second feeder/feeler upload only.</p> <p>It is designed to work from Classic Text Mode Python from Versions 1.4.0 to 2.7.2 on a Classic AMIGA, WinUAE, Linux and Windows, (32 bit), to Vista. Not tested on Python for Windows 7, (32 bit), nor Mac OSX flavours as I don't have these OSes.</p> <p>Linux versions run from a default root terminal for the time being.</p> <p>The Arduino dev' board IS catered for in the code for the above platforms just thoroughly read the code for more information. It defaults to a DEMO mode so you can see it working...</p> <p>The test code for the Arduino Diecimila Dev Board is here:-</p> <p><a href="http://code.activestate.com/recipes/577625-arduino-diecimila-board-access-inside-winuae-demo/" rel="nofollow">http://code.activestate.com/recipes/577625-arduino-diecimila-board-access-inside-winuae-demo/</a></p> <p>Enjoy finding simple solutions to often very difficult problems... ;o)</p> <p>Bazza, G0LCU...</p> Arduino Diecimila Board Access Inside WinUAE DEMO. (Python) 2011-03-26T14:30:31-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577625-arduino-diecimila-board-access-inside-winuae-demo/ <p style="color: grey"> Python recipe 577625 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/access/">access</a>, <a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/arduino/">arduino</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/winuae/">winuae</a>). Revision 2. </p> <p>This is one of a few Arduino Python snippets to come your way. This one is DEDICATED entirely to the classic stock AMIGA A1200HD emulation inside WinUAE. With a small hardware modification it WILL work on a genuine stock AMIGA A1200HD also see inside the code for more information.</p> <p>It only requires an ancient version of SATNDARD Python 1.4.x as an absolute minimum, and yes I know it is ancient, but hey, the classic AMIGA is still capable of running Python to version 2.0.x; other AMIGA variants can run much newer versions.</p> <p>Original copyright, (C)2008, B.Walker, G0LCU. NOW issued as entirely Public Domain...</p> <p>Certain assumptions have been made and are inside the code.</p> <p>Also in the code box is the very basic Test.pde file to program the Arduino Diecimila Board with so that this works.</p> <p>There will be Linux and Windows versions coming that require only STANDARD Python also - NO pySerial is required AT ALL.</p> <p>Sorry but you will need to split the two pieces of code below manually...</p> <p>Enjoy finding simple solutions to often very difficult problems...</p> csc prototype to arduino board with python API. part II (Python) 2010-12-26T12:20:48-08:00cheeng shu chinhttp://code.activestate.com/recipes/users/163970/http://code.activestate.com/recipes/577521-csc-prototype-to-arduino-board-with-python-api-par/ <p style="color: grey"> Python recipe 577521 by <a href="/recipes/users/163970/">cheeng shu chin</a> (<a href="/recipes/tags/api/">api</a>, <a href="/recipes/tags/arduino/">arduino</a>, <a href="/recipes/tags/c/">c</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/serial/">serial</a>). Revision 2. </p> <p>This is the Python API for my arduino uno board. this is base on what i posted in <a href="http://code.activestate.com/recipes/577520-csc-prototype-to-arduino-board-with-python-api-par/?in=user-163970">Part I</a> .. I didn't spend time to comments it... I'll do it once free soon. Please study it and extend it and share among open source members especially in python... :)</p> <p>The file name is "cscarduino.py"</p> <p>if you facing "Pyserial Invalid Handle" issue in your 64bit windows 7 server, Please refer to this:</p> <ol> <li><a href="http://permalink.gmane.org/gmane.comp.python.tutor/67030">link1</a></li> <li><a href="http://www.mail-archive.com/tutor@python.org/msg46974.html">link2</a></li> </ol> Arduino Diecimila Board Access Inside A Linux Bash Shell. (Text) 2011-03-30T18:08:11-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577627-arduino-diecimila-board-access-inside-a-linux-bash/ <p style="color: grey"> Text recipe 577627 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/access/">access</a>, <a href="/recipes/tags/arduino/">arduino</a>, <a href="/recipes/tags/bash/">bash</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/shell/">shell</a>, <a href="/recipes/tags/text/">text</a>). </p> <p>The "code" in this recipe is a step by step "root" shell command line procedure for testing whether a(n) USB Arduino Dev Board is working or not. To get more recognisable characters displayed it is best to use a potentiometer wired as one end to +5V, the other end to Gnd and thw wiper to ANALOG IN 0. This has been tested on various Linux Distros and kept as simple as possible so that anyone can understand it.</p> <p>The required ?.pde file for the Arduino Board can be found here:-</p> <p><a href="http://code.activestate.com/recipes/577625-arduino-diecimila-board-access-inside-winuae-demo/?in=lang-python" rel="nofollow">http://code.activestate.com/recipes/577625-arduino-diecimila-board-access-inside-winuae-demo/?in=lang-python</a></p> <p>It is issued entirely as Public Domain by B.Walker, G0LCU, 30-03-2011, and you may do with it as you please.</p> <p>Similar assumptions are made as in the URL above.</p> <p>Enjoy finding simple solutions to often very difficult problems... ;o)</p> Arduino Diecimila Board Access Inside Windows 32 Bit DEMO. (Python) 2011-04-10T11:02:37-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577648-arduino-diecimila-board-access-inside-windows-32-b/ <p style="color: grey"> Python recipe 577648 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/access/">access</a>, <a href="/recipes/tags/arduino/">arduino</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/windows/">windows</a>). </p> <p>Arduino-Windows2x.py</p> <p>Finally the Windows 32 bit version of the other recipes of similar design. (The AMIGA/WinUAE and Linux versions are already on this site.)</p> <p>To get more recognisable characters displayed it is best to use a potentiometer wired as one end to +5V, the other end to Gnd and the wiper to ANALOG IN 0. This has been tested on various Linux Distros and kept as simple as possible so that anyone can understand it.</p> <p>The required ?.pde file for the Arduino Board can be found here:-</p> <p><a href="http://code.activestate.com/recipes/577625-arduino-diecimila-board-access-inside-winuae-demo/?in=lang-python" rel="nofollow">http://code.activestate.com/recipes/577625-arduino-diecimila-board-access-inside-winuae-demo/?in=lang-python</a></p> <p>Similar assumptions are made as in the URL above.</p> <p>Enjoy finding simple solutions to often very difficult problems... ;o)</p> <p>Bazza, G0LCU.</p> Arduino Diecimila Board Access Inside Linux DEMO. (Python) 2011-04-03T22:04:02-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577631-arduino-diecimila-board-access-inside-linux-demo/ <p style="color: grey"> Python recipe 577631 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/access/">access</a>, <a href="/recipes/tags/arduino/">arduino</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/linux/">linux</a>). </p> <p>Arduino-Linux2x.py</p> <p>This is a simple Python example of accessing a(n) Arduino Diecimila Board using Standard Python 2.x.x.</p> <p>This code requires NO PySerial to work, just standard Linux(/Unix?) commands and a Standard Python install.</p> <p>The only prerequisite is that a root terminal is needed to start Python in.</p> <p>This code is released as Public Domain and you can do with it as you please.</p> <p>To get more values displayed it is best to use a potentiometer wired as one end to +5V, the other end to Gnd and the wiper to ANALOG IN 0. This has been tested on various Linux Distros and kept as simple as possible so that anyone can understand it.</p> <p>The required ?.pde file for the Arduino Board can be found here:-</p> <p><a href="http://code.activestate.com/recipes/577625-arduino-diecimila-board-access-inside-winuae-demo/?in=lang-python" rel="nofollow">http://code.activestate.com/recipes/577625-arduino-diecimila-board-access-inside-winuae-demo/?in=lang-python</a></p> <p>Similar assumptions are made as in the URL above.</p> <p>Enjoy finding simple solutions to often very difficult problems... ;o)</p>