Page 1 of 2

Python on the Red Pitaya board

Posted: Thu Jun 25, 2015 4:30 pm
by Pierre C
Hi,

I have successfully cross-compiled Python for the Red Pitaya board and I wrote a small library that can be used to access directly the register of the board. This library can run on the Red Pitaya board or a remote computer.

An object oriented interface to the different applications (scope, PID, analog mixed signals, ...) is provided. This interface is implemented using Python properties and can quickly be extended to your own application.

It is important to notice that Python runs on the board : one can run an ipython shell through SSH and directly interact with the board or one can run scripts. Using libraries (such as numpy), one can easily perform data analysis on the board before sending data through the network.

More details can be found on https://github.com/clade/RedPitaya/tree/master/python

Pierre

Re: Python on the Red Pitaya board

Posted: Mon Jul 20, 2015 8:28 am
by geggor
Dear Pierre,

thank you very much for this work! This makes writing custom control programs running on the RP much easier for me.
Do you have plans for the future of your project? I am dreaming of an IPython notebook server running on the RP.

thanks
Gregor

Re: Python on the Red Pitaya board

Posted: Tue Jul 21, 2015 2:36 pm
by Pierre C
Hi Gregor,

I don't have any plans for the future of this project. If you want to run the notebook you need to install a bunch of python package. If youwant the pylab mode, then you need also to cross-install matplotlib. This probly tricky.

Pierre

Re: Python on the Red Pitaya board

Posted: Wed Jul 22, 2015 8:56 am
by pavel
Hi Gregor,

You can try to boot your Red Pitaya board using the Debian based SD card image:

http://pavel-demin.github.io/red-pitaya ... ecosystem/

and then you can install any of the Python related packages provided by the Debian distribution:

https://packages.debian.org/jessie/python/

Cheers,

Pavel

Re: Python on the Red Pitaya board

Posted: Wed Jul 22, 2015 8:04 pm
by geggor
Dear Pavel,

thank you for providing a Debian image for the RedPitaya, this is a very complete and powerful environment, I will give it try - after downloading and writing to the SD card has finished ...

Gregor

Re: Python on the Red Pitaya board

Posted: Fri Aug 28, 2015 1:39 pm
by newkew
Dear all,
I'm a beginner in REDPITAYA and Python
I used redpitaya+python distribution with succes. It s a perfect tool for my application. I tested it with eclipse on windows PC, now I would like to export py scripts directly on redpitaya board. But ...
How could I install other python package on repitaya board ?
I tried to install pip on REDPITAYA with get-pip.py without succes
I tried to install debian distribution with SD image supplied by Pavel http://pavel-demin.github.io/red-pitaya ... ecosystem/ but I never succeed in connecting REDPITAYA !

regards
Kewin

Re: Python on the Red Pitaya board

Posted: Fri Aug 28, 2015 4:45 pm
by pavel
Dear Kewin,

May be I could help you to solve your problem with the Debian based SD card image. Could you please tell me how you copy the image to a SD card? Is there anything that appears on the serial console when Red Pitaya boots with this image?

Best regards,

Pavel

Re: Python on the Red Pitaya board

Posted: Sat Aug 29, 2015 10:04 pm
by newkew
Pavel,
I writed image with Win32DiskImager
I tried to connect redpitaya with putty like i did it before

Kewin

Re: Python on the Red Pitaya board

Posted: Sat Aug 29, 2015 11:36 pm
by pavel
Kewin,

It's possible that Red Pitaya gets different IP addresses when it boots from the original SD image and from the Debian based one.

Have you tried to connect to the serial console as described at the following link?
http://wiki.redpitaya.com/index.php?tit ... connection

This way, you'll see if the Debian based system boots and if it boots you'll be able to find the IP address using the ifconfig command.

Pavel

Re: Python on the Red Pitaya board

Posted: Mon Aug 31, 2015 4:55 am
by smwright
I'm having similar difficulties. Watching the pitaya boot from the serial port with my original (working) SD image, and then typing ifconfig, the pitaya reports:
init addr: 192.168.1.100 Bcast: 192.168.1.255 Mask 255.255.255.0

When I watch Pavel's image boot, then type ifconfig after logging into root, the pitaya reports nothing. The corresponding line with the internet address is simply not there.

During boot it does say "Failed to start LSB: DHCP server. " New at this, no idea if that is important.

Steve