0

Im currently using WifiBee ESP V1.0 and Lilypad Arduino as well as AD8232 for ECG. We are trying to send the data to mobile phone by connecting to PubNub.`

if(Serial.available()>0){
str = Serial.readString();`
str.toCharArray(msg,100);
client.publish("sampleChannel",msg);`
memset(msg,0 sizeof msg);}

this works if we set the delay from the Lilypad Arduino (with AD8232) to 1s. however AD8232 needs to have a delay of not more than 10ms.

that data sent from Lilypad to WifiBee looks like

0-0`
123-1 etc..

left being the ECG voltage and right being a key (for message order) Is it possible to for the mobile app to connect directly to wifibee and send data? without pubnub etc.

PS> I know there is a maximum message rate (publish per second in pubnub), tried sending messages 10 at a time

1st message (0-0,123-1,232-2....)
2nd message (231-11,123-12....)

Are there any alternatives for pub/sub that can handle 10ms rate of publishing data?

TIA...

  • 1
    Your basic problem is the use of readString() which imposes a 1 second "dead zone" to identify the end of a string. Don't use it. Instead read serial properly. – Majenko Apr 25 '19 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.