Pius Onyema Ndukwu
Published © MIT

The HandyPager

A pager that is always on you.

BeginnerFull instructions provided4 hours285

Things used in this project

Hardware components

Blues Notecarrier A
Blues Notecarrier A
×1
Blues Swan
Blues Swan
×1
Blues Notecard (Cellular)
Blues Notecard (Cellular)
×1
A pair of gloves
×1
Lipo battery
×1
jst connector
×1
Double sided Vero board
×1
Pushbutton switch 12mm
SparkFun Pushbutton switch 12mm
×1
Wires
×1

Software apps and online services

PlatformIO IDE
PlatformIO IDE
SMS Messaging API
Twilio SMS Messaging API
VS Code
Microsoft VS Code
Blues Notehub.io
Blues Notehub.io
Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
Hot glue gun (generic)
Hot glue gun (generic)

Story

Read more

Schematics

HandyPager Schematics Diagram

Schematics for HandyPager

HandyPager Schematic Diagram.

Code

main.cpp

Arduino
#include <Arduino.h>
#include <Notecard.h>
//#include <EEPROM.h>

#define DEBUG 0

#if DEBUG == 0
#define debug(x) Serial.print(x)
#define debugln(x) Serial.println(x)
#define debugln2Param(x, y) Serial.println(x, y)


#else
#define debug(x)
#define debugln(x)
#endif

//#define usbSerial Serial
#define productUID "com.gmail.onyemandukwu:handypager"
Notecard notecard;

J *req=nullptr;
char *toNumber; // number to send message to

// the setup function runs once when you press reset or power the board
void setup()
{
  delay(2500);
Serial.begin(115200);
  pinMode(LED_BUILTIN,OUTPUT);
  pinMode(11,INPUT);
  digitalWrite(LED_BUILTIN,1);

notecard.begin();
notecard.setDebugOutputStream(Serial);

req = notecard.newRequest("hub.set");
JAddStringToObject(req, "product", productUID);
JAddStringToObject(req, "mode", "continuous");
notecard.sendRequest(req);

delay(2000);

req = notecard.newRequest("note.get");
if(req !=NULL ){
JAddStringToObject(req, "file", "mydata.dbs");
JAddBoolToObject(req, "sync", true);
J* rsp=notecard.requestAndResponse(req);
debugln(JConvertToJSONString(rsp));
J *body= JGetObject(rsp,"body");
toNumber = JGetString(body,"phone_number");
debugln(toNumber);
}


// set up auxgpio: make aux1 input and turns off  all other  auxgpio
req = NoteNewRequest("card.aux");
JAddStringToObject(req, "mode", "gpio");

J *pins = JAddArrayToObject(req, "usage");
JAddItemToArray(pins, JCreateString("input-pullup"));   // AUX1
JAddItemToArray(pins, JCreateString("off"));   // AUX2
JAddItemToArray(pins, JCreateString("off"));  // AUX3
JAddItemToArray(pins, JCreateString("off")); // AUX4
NoteRequest(req);


// sending message
 debugln("starting request");
  req = notecard.newRequest("note.add");
  
  if (req != NULL)
  {
    JAddStringToObject(req, "file", "msg.qo");
    JAddBoolToObject(req, "sync", true);
    J *body = JAddObjectToObject(req, "body");
    if (body)
    {
      JAddStringToObject(body, "To",toNumber);
  //get number from eeprom
   }
    }
    notecard.sendRequest(req);
    delay(1000);
debugln("message sent");
  //when done go back to sleep
  // the arm command set the ATTN pin on the notecarrier low,
  // I have connected the ATTN pin to the EN pin of SWAN
  // so when the ATTN pin is LOW swan will go to sleep
debugln("going back to sleep");
digitalWrite(LED_BUILTIN,1);
req = NoteNewRequest("card.attn");
JAddStringToObject(req, "mode", "arm,auxgpio");
NoteRequest(req);
}

// the loop function runs over and over again forever
void loop()
{
  //Serial.println("now in loop");
 // Serial.println(digitalRead(11));
//   digitalWrite(LED_BUILTIN, digitalRead(11));
// if(digitalRead(PAIGER_BUTTON)){
//   Serial.println("starting request");
//   req = notecard.newRequest("note.add");
  
//   if (req != NULL)
//   {
//     JAddStringToObject(req, "file", "msg.qo");
//     JAddBoolToObject(req, "sync", true);
//     J *body = JAddObjectToObject(req, "body");
//   //   if (body)
//   //   {
//   //     JAddStringToObject(body, "To","+2349056149453" );
//   // get number from eeprom
//   //  }
//     }
//     notecard.sendRequest(req);
//     delay(1000);
//   }
}

HandyPager

HandyPager is a cellular-based pager, resembling a glove, created to assist individuals with muscle dystrophy, a condition that restricts their mobility. This innovative solution ensures that their pager is conveniently accessible on their hand, and easily activated by a button within fingertip reach. It uses text messages to notify the caregiver when assistance is needed

Credits

Pius Onyema Ndukwu

Pius Onyema Ndukwu

10 projects • 9 followers
I am a student and I have been developing hardware since 2017. My hardware journey started when I stumbled upon a youtube video on Arduino.

Comments