gioblu / PJON

PJON (Padded Jittering Operative Network) is an experimental, arduino-compatible, multi-master, multi-media network protocol.
Other
2.73k stars 239 forks source link

ARM Cortex-M3 support? #385

Open canDry opened 3 years ago

canDry commented 3 years ago

I'm trying to get PJON working on an arduino DUE (ARM Cortex-M3).

Although there's no errors in compilation the network test never connects with ans ESP32 receiver (it works successfully when the sender is an arduino uno on pin 12). I've tried various pins (12, 25, 52) with no luck.

Is there support for this board?

Cheers!

gioblu commented 3 years ago

Ciao @canDry :) Take a look here: https://github.com/gioblu/PJON/blob/master/src/strategies/SoftwareBitBang/Timing.h#L207 This is the timing configuration of ESP32, we do not have a dedicated setup for Arduino DUE, although if you already see even few successful exchanges that means a slight tweak will likely yield optimal performance.

Please see: https://github.com/gioblu/PJON/wiki/SoftwareBitBang-troubleshooting

canDry commented 3 years ago

Take a look here: https://github.com/gioblu/PJON/blob/master/src/strategies/SoftwareBitBang/Timing.h#L207

Thanks for the quick response Gio!

Was hoping perhaps someone will see this - and has the timing worked out - but never bothered w/ a pull request. 😎

gioblu commented 3 years ago

Ciao @canDry it is probably the time for me to buy an Arduino DUE, I will let you know how my tests go.

canDry commented 3 years ago

I have a cheap DSO-138 oscilloscope.... do you think that would be sufficient for me to diagnose/tune the timing?

Regardless, if you actually purchase a DUE to solve this issue and you fall into the relatively-poor open-source-developer camp send me a copy of the bill and I'll reimburse you via paypal. :)

Cheers!

gioblu commented 3 years ago

@canDry I don't think you need an oscilloscope to find the right timing it you already get some packets through. Try changing SWBB_READ_DELAY on due side and see if results are better, it may be just that setting a slightly higher or lower SWBB_READ_DELAY, in the worst case SWBB_BIT_WIDTH should be tuned too, and in that case an oscilloscope may help, probably the DSO-138 is more than enough.

gioblu commented 3 years ago

Ah @canDry about the DUE purchase, don't be preoccupied it is some time I had in mind to test that MCU, and that is not a huge expense, just too many things on the list :)

gioblu commented 3 years ago

@canDry I bought also the chinese ebay clone for less then 15 dollars, curious to know if behaves the same. Do you have the real or the clone?

canDry commented 3 years ago

@canDry real or the clone?

Mine is from Sainsmart - so a clone.

If I get some time this weekend, I'll try playing with the #define SWBB_READ_DELAY +/- to see if I can get the DUE talking to the ESP32.

Thanks again for your prompt and very helpful response (as usual!).

gioblu commented 3 years ago

Ciao @canDry I finally have my Due and some time to try! I will let you know in the next days.

fletchjp commented 2 years ago

Is there any progress on this? I have connected two DUEs using SoftwareBitBang and get no connection. I cannot see anything in the Timing.h file which relates to a DUE. I don't know enough to know what to add.