Community
cancel
Showing results for 
Search instead for 
Did you mean: 
ARami7
New Contributor I
1,975 Views

Open python program from telnet?

So this young man was able to run python programs from putty through WLAN, i want to do the same, so far i have all the physical connections necessary + sd card, what image did he use to run python programs?

here's the video to see what i am talking about: https://www.youtube.com/watch?v=hp-k9QFfYgQ Controlling Servo Motor with Intel Galileo Gen 2 through WLAN - YouTube

12 Replies
idata
Community Manager
108 Views

Hey Adan - Can you connect via telnet? When you run the command python what happens?

I use the eglibc image here:

http://downloadmirror.intel.com/25384/eng/iot-devkit-201510010757-mmcblkp0-galileo.direct.xz http://downloadmirror.intel.com/25384/eng/iot-devkit-201510010757-mmcblkp0-galileo.direct.xz

With that I connect via SSH and run the command python to invoke python.

Cheers,

-Joe

FTinetti
Honored Contributor I
108 Views

Hi AdanChristo,

You can use the one suggested by joe-iot or the one at http://www.intel.com/content/www/us/en/support/boards-and-kits/intel-galileo-boards/000006416.html SD Card Setup and Sketch Persistent for Boards and Kits (aka uclibc based) which is simpler to use, i think.

Fernando.

idata
Community Manager
108 Views

The only reason I didn't suggest the SD Card Image image is that it is no longer supported and wireless is a bit trickier. This page https://software.intel.com/en-us/iot/hardware/galileo/downloads IoT - Intel® Galileo Board Download | Intel® Developer Zone says : "The uClibc image is no longer supported, but offered here for your convenience." Although what that means is up to interpretation.

However everything else beyond wireless seems to be easier (as I sit here waiting for net-snmp to compile on the eglibc image...)

-Joe

ARami7
New Contributor I
108 Views

i use putty to ssh through wifi --> galileo gen 2, it's awesome and it works, i am having trouble in running this arduino code in python version:

# include

Servo myservo; // create servo object to control a servo

int pos = 0; // variable to store the servo position

void setup()

{

myservo.attach(9); // attaches the servo on pin 9 to the servo object

for(pos = 0; pos < 45; pos += 1) // goes from 0 degrees to 180 degrees

{ // in steps of 1 degree

myservo.write(pos); // tell servo to go to position in variable 'pos'

delay(15); // waits 15ms for the servo to reach the position

}

for(pos = 45; pos>=1; pos-=1) // goes from 180 degrees to 0 degrees

{

myservo.write(pos); // tell servo to go to position in variable 'pos'

delay(15); // waits 15ms for the servo to reach the position

}

}

void loop()

{

}

so my question is: where is the library support/documentation into running this in python?

FTinetti
Honored Contributor I
108 Views

joe-iot wrote:

The only reason I didn't suggest the SD Card Image image is that it is no longer supported and wireless is a bit trickier. This page https://software.intel.com/en-us/iot/hardware/galileo/downloads IoT - Intel® Galileo Board Download | Intel® Developer Zone says : "The uClibc image is no longer supported, but offered here for your convenience." Although what that means is up to interpretation.

However everything else beyond wireless seems to be easier (as I sit here waiting for net-snmp to compile on the eglibc image...)

-Joe

Hmmm... I didn't know about this... but it seems to be a little bit... "messy", it's the kind of documentation that makes me to think there are (documentation) inconsistencies. Elaborating:

a) The URL you pointed to, https://software.intel.com/en-us/iot/hardware/galileo/downloads IoT - Intel® Galileo Board Download | Intel® Developer Zone, present two alternatives for the same purpose, even when they are very different. File sizes and the way of storing those images in the SD card strongly suggests (at least to me) they are oriented to different purposes. I don't have any more details, though.

b) I've been looking for information about Linux images, and I found

which adds some information, but I'm not able to "process" it...

c) I've worked mostly with the uclibc image because I wanted to have sketch persistency, and the link to which I pointed to before, http://www.intel.com/content/www/us/en/support/boards-and-kits/intel-galileo-boards/000006416.html SD Card Setup and Sketch Persistent for Boards and Kits, was the only one I found, with no warning about "deprecation". I'll take a look to the "no deprecated" image and see if it works all the same.

Fernando.

idata
Community Manager
108 Views

I think if you look on the forum you'll see quite a few people can't figure it out either. I don't know the answer. I am plowing on with the EGLIBC image just because.

-Joe

ARami7
New Contributor I
108 Views

yea i put the yocto image into my sd card, everything is running except that where can i find python code that runs a servo motor?

idata
Community Manager
108 Views

Hey Adan - That makes way more sense! Here is an example:

https://github.com/jackpien/hello_intel_galileo/blob/master/turn_servo_with_pot.py hello_intel_galileo/turn_servo_with_pot.py at master · jackpien/hello_intel_galileo · GitHub

And a little more info from Jameco which references the code above: http://www.jameco.com/Jameco/workshop/JamecoBuilds/intel-galileo.html Intel Galileo: Hello Python

-Joe

ARami7
New Contributor I
108 Views

wow this is great! i really appreciate this and currently implementing as we speak, got a minute for another question? when i ssh i can type: cd /media/mmcblk0p1 --> in this directory i can type: 'python' 'testCodeinPython.py' and this code runs, can i do this for regular arduino sketches? maybe i dont have to re-invent the wheel and just run sketch files from arduino IDE but i dont know how...

FTinetti
Honored Contributor I
108 Views

AdanChristo wrote:

wow this is great! i really appreciate this and currently implementing as we speak, got a minute for another question? when i ssh i can type: cd /media/mmcblk0p1 --> in this directory i can type: 'python' 'testCodeinPython.py' and this code runs, can i do this for regular arduino sketches? maybe i dont have to re-invent the wheel and just run sketch files from arduino IDE but i dont know how...

Maybe the best (and I think suggested) way is to use the Arduino IDE, which "solves" everything automatically.

Also, from an Arduino sketch you can execute python scripts (and any other executable code, actually) using the system( ) function. If you need some help on this, please describe what you need to do.

Edit: I've not tried this in egclib image, though, maybe joe-iot has experience on this.

Fernando.

Carlos_M_Intel
Employee
108 Views

Hi guys,

Adan, for this you will need to start working with the .elf files of the sketches you have uploaded into the board, also you need to work with the clloader service. I saw you opened a new thread with this question: , lets continue this topic in that thread.

Regards,

Charlie

ARami7
New Contributor I
108 Views

deal, help me with that thread

Reply