Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - swangy

Pages: [1]
1
Support / RFduino_pinWakeCallback BUG
« on: February 20, 2017, 02:44:00 PM »
so i have one BUTTON_PIN interrupt that sits LOW and goes HIGH when active
and a second ALARM_PIN interrupt that sits HIGH and goes LOW when active

using the simple code  below, BOTH functions fire when i active only the BUTTON_PIN interrupt... can anyone else confirm this bug or clarify what i'm doing wrong?  thanks!

Code: [Select]

#include <RFduinoBLE.h>

#define BUTTON_PIN 3
#define ALARM_PIN 2

void setup() {

  Serial.begin(9600);
 
  pinMode(BUTTON_PIN,INPUT); 
  pinMode(ALARM_PIN,INPUT); 

  RFduinoBLE.begin();
  RFduino_pinWakeCallback(BUTTON_PIN, HIGH, onButtonPush);   
  RFduino_pinWakeCallback(ALARM_PIN, LOW, onAlarm);   
}

void loop() {
   RFduinoBLE_ULPDelay(INFINITE);
}


int onButtonPush(uint32_t ulPin) {   
  Serial.print("button pushed pin "); 
  Serial.println(ulPin);
   
  RFduino_resetPinWake(BUTTON_PIN);   // resetting the pin puts BLE back to sleep   
  return 1;
}


int onAlarm(uint32_t ulPin) {
  Serial.print(" alarm fired pin ");
  Serial.println(ulPin);

  RFduino_resetPinWake(ALARM_PIN);   // resetting the pin puts BLE back to sleep
 
  return 1;
}


2
Support / Re: anyone work with Real time clock RTC PFC8563?
« on: August 17, 2016, 01:53:49 PM »
thanks but i was trying to use the PCF since it's so much cheaper compared to the DS chips...

found this post that i got to work here:
http://tronixstuff.com/2013/08/13/tutorial-arduino-and-pcf8563-real-time-clock-ic/
will see if i cant convert it to a class, my C is quite rusty

4
so.. anyone else come across this?  simple setup with a pushbutton on pin 3 with a pullup resistor holding the pin HIGH.  the callback function is triggered on active low

when i connect with the bluetooth app and send it *anything* the rfduino just crashes and locks up...   the serial port just starts typing out "BLE Received Buffer data"  but never makes it past the first few characters.. and stops responding until i reset the device..

if i flip the button so that it's resting LOW and swap the code to RFduino_pinWakeCallback(BUTTON_PIN, HIGH.. it works without crashing.   wtf?

any ideas?

Code: [Select]
#include <RFduinoBLE.h>
#include <Lazarus.h>
#define BUTTON_PIN 3

Lazarus Lazarus;

void setup()
{
  Serial.begin(9600);

  RFduinoBLE.begin();
  RFduino_pinWakeCallback(BUTTON_PIN, LOW, onInterrupt);  //callback function for alarm interrupt!
}

void loop()
{
  RFduino_ULPDelay(INFINITE);
  Serial.println("loop");
}


void RFduinoBLE_onReceive(char *data, int len) {
    Serial.println("BLE Received Buffer data");
    Serial.println(data);
    if (len>=1){
      Serial.println("onreceive triggered");
    }
   
    Lazarus.ariseLazarus();
}

int onInterrupt(uint32_t ulPin) {
  Serial.print("** wake ** ");
   
  RFduino_resetPinWake(0);   // resetting the pin puts BLE back to sleep
}

5
Support / anyone work with Real time clock RTC PFC8563?
« on: August 12, 2016, 01:32:13 PM »
trying to get the rfduino working with this library on a real time clock chip PFC8563?

https://github.com/elpaso/Rtc_Pcf8563

seems to compile ok in the arduino IDE but locks up and no error output!  any help appreciated!

thanks

Pages: [1]