johngrantuk / piupdue

Program an Arduino Due from a Raspberry PI
MIT License
25 stars 5 forks source link

Arduino Due Programming Port #2

Open Synclife-David opened 8 years ago

Synclife-David commented 8 years ago

I am keen to us this code in one of my projects but so far have had no luck in getting the due programming port to be recognised by the Pi. If I use the other usb port on the due (the native usb port I believe) the script works fine. However using the programming port, the due is never recognised.

Is there a way of making this script work with the programming port (as that is the one I have to use for my project)?

Or perhaps it already works and there is a configurable I need to set, or else I am doing something wrong?

Any help would be appreciated.

johngrantuk commented 8 years ago

Hi, I managed to reprogram using both the native and the programming port so it should be possible. Have you tried running the command - "ls /dev/tty*" on the PI with the Due disconnected and connected to see if it gets listed?

Synclife-David commented 8 years ago

OK, I'll give it another go this evening.

I can see the arduino get listed on the Pi, with either port. However when using your script it wasn't recognising the due if I used the programming port, whether I let it auto select a port or if I pointed it at the correct port from the listing on the Pi.

Thanks for getting back to me so quickly, as I said i'll give it another go this evening and let you know how I get on, if you can think of anything else to try in the mean time let me know.

Synclife-David commented 8 years ago

Unfortunately I've had no luck, I can see the arduino appear on the port list as ttyACM0 however I can't seem to get piupdue to recognise it. if I let the port select automatically I get:

"Couldn't find a connected Device to upload to."

If I specify -p ttyACM0 I get:

"Problem with selected Port. Double check it is correct.

I did remember one thing that could be relevant and I would like to check with you; when installing "pip install pyupdue" doesn't work it comes back saying it found no packages by that name. However "pip install piupdue" does work so I that is what I am using, is this correct?

johngrantuk commented 8 years ago

Hi, Sorry for the delay in response, I've been travelling.

To be honest I'm not sure why it's not automatically finding the port, it's been a long time since I've used or looked at the code and I don't currently have a set-up to look into it in more detail. For the -p it may be worth including the full path like: -p /dev/ttyACM0

Yeah, piupdue should be correct.

I'm sorry I can't be of further assistance. If I get time to set-up to test I'll let you know but this potentially won;t be anytime soon.