Author Topic: SimbleeOff  (Read 263 times)

Wayne

  • RFduino Jr. Member
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
SimbleeOff
« on: August 22, 2017, 09:18:04 AM »
Ok, I'm trying to achieve something that maybe I can not.

What I have found out that the use of SimbleeOff() does not really require the Simblee_pinWakeCallback() to work.
Providing you have Simblee_pinWake setup, the SystemOff() still functions.  I have tested this and it works just fine.

I'm using the old if(digitalRead(button)) with a normal callback function.
In the callback function I send my bluetooth stuff and when the button goes LOW, reset the pinWake and do the SystemOff() (My test is Normal LOW and HIGH is active.

I have no SystemOff() in the loop..  Only in the voids. 
In the loop I have the if statements to test the digital inputs as stated above.

Now I need to test 2 buttons at once and perform 2 BT signals.
One of the buttons is ,, well let me explain the buttons I have
buttonA is Save  This send just a simple character lets say S
buttonB is Mode and this lets say is M
buttonC is High Level X-Ray and just say its H
And buttonD is X-ray and lets just say X

These buttons can function as a singular item  Press Save, sends S, Press Mode and Mode and sends M and the others the same, HLF (HLX) send H and likewise X-Ray sends X.
This all works and it works well.  When the buttons are release, the current draw goes to 400na...4ma 

One feature that is needed is to do a Save while doing an X-ray.  So while X-ray is press, pressing the Save will need to send S along with X.
Likewise, if doing the High Level one, pressing Save I need to send the S as well as H.

I'm working currently with the H and S part and I see I can have the S sent, but it is not every time.

The 400na is the plus I do not want to loose it.
I can if requested post the complete program if needed. or parts.

Like I said its a WIP for me with my very limited knowledge of programming (just enough to get in trouble).

Wayne

  • RFduino Jr. Member
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: SimbleeOff
« Reply #1 on: August 25, 2017, 12:53:25 PM »
Ok, I had Aaron's help and found that I have a digitalRead on a pin checking LOW condition in the HIGH test. If the button went LOW, it will most likely miss the LOW test routine.
In other words, I had to place the check in the loop where it will get caught.

Everything is working.  Also solved the button issues.  If the button is depress (HIGH), no other button will try to take control.  No blanking out or anything.

Project has moved to Release Candidate and in a demo for next week.

And now another project doing the same.. This time it will be easier except need to add an accelerometer to detect if the foot switch is upside down or right side up.