Go Down

Topic: [Solved] Sending Serial Data between Esplora and Uno (Read 2227 times) previous topic - next topic

chummer1010

No luck. I tried this with and without a resistor.
#include <signature.h>

runaway_pancake

Definitely have that resistor, a 1K, in there to keep the Esplora from "powering" the Uno when the Uno is unpowered.
I get Uno 'L' to turn on with an Esplora UP - but it won't turn off.
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

chummer1010

The LED won't turn on at all for me. Completely unresponsive..
#include <signature.h>

runaway_pancake

It turns off after about 20 sec, but the Esplora is not transmitting that whole time.
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

runaway_pancake

Maybe one Esplora button push sends more than one 'U' and the Uno buffer is getting stuffed.
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

chummer1010

Maybe one Esplora button push sends more than one 'U' and the Uno buffer is getting stuffed.

This could be! When I tested if the buttons were being read in reply 9, the letter would be printed countless times from a quick tap of the button.

How could I solve this? Perhaps a small delay() just for testing purposes right now?
#include <signature.h>

runaway_pancake

#21
Jul 03, 2016, 03:18 am Last Edit: Jul 03, 2016, 03:24 am by Runaway Pancake Reason: forgot the semi-colon
HA!
That's it!

If I change the Esplora code thus:
Code: [Select]

  if (Esplora.readButton(SWITCH_UP)==LOW)
  {
    //confirmation();
    Dataline.println("U");
    delay(5000);  //  "debounce"
  }


effecting a crude "debounce" (by bludgeon)
then the Uno behaves as expected.
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

runaway_pancake

The superior method would be to run the Esplora buttons inside the "state machine" paradigm.
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

runaway_pancake

#23
Jul 03, 2016, 03:22 am Last Edit: Jul 03, 2016, 03:23 am by Runaway Pancake
Just now, I increased the series resistor to 20k and it's still good (better).
Definitely required.

> > > I know that you're doing this as a test, proof of concept, till you get your XBee together.
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

chummer1010

#24
Jul 03, 2016, 03:25 am Last Edit: Jul 03, 2016, 03:26 am by chummer1010
It still doesn't work for me... WTH?

edit: let me try what you said in post 22 and 23
#include <signature.h>

runaway_pancake

#25
Jul 03, 2016, 03:33 am Last Edit: Jul 03, 2016, 03:36 am by Runaway Pancake Reason: add INOs
Use 'chummerremote', for the Esplora, and 'chummerrx', for the Uno - the sketches that I posted.
(The picture attached shows that I'm working this with you, not that you doubt me,)

> > > Adding my .INOs
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

runaway_pancake

In chummerrx (for the Uno), I changed the Dataline pins to 15,16 (A1 and A2) - using A1 was more convenient for me.
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

chummer1010

I really appreciate your help, I'm just baffled that I can't manage to get this to work.. I tried everything in post 25 with no success..
#include <signature.h>

runaway_pancake

? ? ?
Attaching a wiring diagram.
Confirm the serial out from the Esplora (as previously described), no connections to anything but the LED/resistor.
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

chummer1010

#29
Jul 03, 2016, 04:02 am Last Edit: Jul 03, 2016, 04:03 am by chummer1010
My setup looks just like the diagram. I'll go as far as taking a video of me uploading both codes and me pressing the buttons. This is probably a dumb mistake I'm not seeing that I'm wasting your time with.
#include <signature.h>

Go Up