Nanpy 0.8 - Use your Arduino board with Python

Andrea Stagi stagi.andrea at gmail.com
Tue Feb 19 12:57:58 CET 2013


Hi,

Nanpy is growing faster, 0.8 is out!! It contains a lot of bugfixing
and EEPROM support :)

A lot of people is writing me about the project, send their
experience, examples, bugfixing, ideas and I've also found two cool
projects made using nanpy on Instructables.com

- http://www.instructables.com/id/Arduino-Raspberry-Pi-Internet-Radio/
- http://www.instructables.com/id/Flight-Simulator-with-Arduino-and-Python/

Amazing! I'm really happy, thank you guys :)

We also have a repository with some projects made using Nanpy:
https://github.com/nanpy/eggsamples ... if you have a project made
with Nanpy and it's open source please let us know!! :)

Enjoy Nanpy and discover its simplicity expecially using it with a
RaspberryPi.. in the last MagPi issue I explain how to accomplish
that: http://www.themagpi.com/

Remember that Nanpy is now an organization on Github! Join us and/or
donate if you like it!

https://github.com/nanpy

WHAT IS NANPY
--------------------
Nanpy is a pure Python library that allows you communicating with an
Arduino board connected via USB. Classes and methods used are really
similar to the Arduino framework's ones, but simpler and with some
additional features, so people who haven't worked with an Arduino can
be easily introduced to his world.. The main purpose of Nanpy is
making developers' life easier, giving them something simple and fast
to use to create prototypes and scripts interacting with Arduino,
saving time and making them concentrate on the problem.
There are a lot of projects able to do something similar, using Python
or other languages, but  Nanpy can do more! Nanpy is easily extensible
and can theoretically use every library Arduino supports, allowing you
to create how many objects you want and without worrying about
deallocation. Also, you can use Nanpy in parallel and concurrence
programs. Nanpy is under heavy development but is growing fast and
just supports the main methods of OneWire, Lcd, Tone,
DallasTemperature, Stepper and Servo libraries. Just a word of
warning: Raspberry Pi may not provide enough power to drive an
Arduino, so you might need external power.

UNDER THE WOOD
------------------------
With Nanpy you can write your Arduino programs using Python,
communicating via serial port without sending hard-to-remember codesor
limiting you to use only one object: when you create an object in
Python it will be automatically created into your Arduino at runtime..

For example if you write something like

    Arduino.pinMode(13, Arduino.OUTPUT)

    Arduino.digitalWrite(13, Arduino.HIGH)

or

    tone = Tone(13)

or

    lcd = Lcd([7, 8, 9, 10, 11, 12], [16, 2])

    lcd.printString("Hello World!")

or

    ds = DallasTemperature(5)


Nanpy creates the correct object into Arduino for you.. Also, you haven't to
take care of deallocation, Nanpy deallocates objects into Arduino as
soon as the correspondent Python objects get deleted. Look at the
examples to see how simple it is..
(https://github.com/nanpy/nanpy/tree/master/examples) :)

I tried running Nanpy on a Raspberry board and it works great!!(that's
the result from one of my friends' Twitter account
https://twitter.com/andreagrandi/status/251702684380434434 :) ). Also
you can use it in other devices suppoting Python and serial
communication, with Django, for creating prototypes
faster etc.. because you use Python and you don't have to flash the
firmware every time. Last but not least, firmware part of Nanpy is
Python-indipendent, so you can write another implementation of Nanpy
in any other language, for example Java, and see an Arduino controlled
via Android (ok, in this case we should use Android USB Host API,
writing our own driver, because Android doesn't provide anything to
access device files). We will work on this in the future :)

DONATE
-----------
Do you like Nanpy? Contributions/suggestions/bug reporting/spreading
the project/beers/coffee are accepted :) if you want to donate a coffee
and be sure that we will work during the night, here's the link

https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TDTPP5JHVJK8J

Thanks for your attention!

Best regards,

=.4.S.=

-- 
Andrea Stagi (@4ndreaSt4gi) -  Software Engineer
Job profile: http://linkedin.com/in/andreastagi
Website: http://4spills.blogspot.it/
Github: http://github.com/astagi


More information about the Python-announce-list mailing list