Forget-Me-Not is a system of small devices you can use to make sure you never leave anything of yours behind again.
Just attach one of the smaller units to an item you are prone to forgetting, like your keys or your umbrella, and keep the larger unit in an item you are likely not to forget, like your bag. If they ever get separated, your bag will scream out at you to remind you to go find your keys.
The system works using XBee wireless radios. Each small unit pings the base constantly, which analyzes the incoming packet to parse out the address and signal strength of each message. If any of the units has a signal strength lower than a certain threshold, a trigger signal is sent to a hacked sound module, which plays the appropriate sound for the missing device.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | //---------------------------- // Forget-Me-Not // // by Elie Zananiri & HyeJin Yoo // based on code from Making Things Talk by Tom Igoe //---------------------------- #define SOUND1 4 #define SOUND2 5 #define SOUND3 6 #define MONITOR 13 #define THRESHOLD 79 #define MSGLENGTH 22 #define INTERVAL 30000 //---------------------------- int packet[MSGLENGTH]; int byteCounter; long lastPlayedSound1 = 0; long lastPlayedSound2 = 0; long lastPlayedSound3 = 0; int address = 0; int rssi = 0; //---------------------------- void setup() { // open the serial port Serial.begin(9600); // configure output pins pinMode(SOUND1, OUTPUT); pinMode(SOUND2, OUTPUT); pinMode(SOUND3, OUTPUT); } //---------------------------- void loop() { // check for any messages and read up to 2 packets at a time int readCount = 0; while (Serial.available() > 0 && readCount < (MSGLENGTH*2)) { handleIncoming(); readCount++; delay(5); } // flash the monitor pin to let us know all is working digitalWrite(MONITOR, HIGH); delay(50); digitalWrite(MONITOR, LOW); delay(50); } //---------------------------- void handleIncoming() { // read a byte from the port int b = Serial.read(); // if this is a start byte, it's a new packet if (b == 0x7E) { // if there is data, parse the previous packet if (packet[2] > 0) { parseData(); } // reset the byte counter byteCounter = 0; } // store the current byte into the packet packet[byteCounter] = b; byteCounter++; } //---------------------------- void parseData() { // read the address, which is a two-byte value address = packet[5] + packet[4]*256; // read the signal strength rssi = packet[6]; // get the time long now = millis(); // trigger a sound if the signal is not strong enough // and the sound has not played in a while if (address == 0x1ABC && rssi > THRESHOLD) { if (now - lastPlayedSound1 > INTERVAL) { lastPlayedSound1 = now; playSound(SOUND1); } } else if (address == 0x1CBA && rssi > THRESHOLD) { if (now - lastPlayedSound2 > INTERVAL) { lastPlayedSound2 = now; playSound(SOUND2); } } else if (address == 0x1BBB && rssi > THRESHOLD) { if (now - lastPlayedSound3 > INTERVAL) { lastPlayedSound3 = now; playSound(SOUND3); } } } //---------------------------- void playSound(int sound) { digitalWrite(sound, HIGH); delay(100); digitalWrite(sound, LOW); delay(6*1000); // enough time to play the entire sample // flush the serial buffer to ignore all backed up messages Serial.flush(); } |
The project is still a prototype at this stage and many improvements could still be made. For one, the smaller modules should be as small as possible and should be equipped with rings or clips so that they can be easily attached to objects. The base module should also be more compact and the audio circuit should be cleaned up because it currently does not sound very good.
One suggestion we got during our presentation was to try switching over to Bluetooth signals. This would allow us to use a cell phone as the base module, which is compact and already has good audio recording and playback ability. Also, using a phone would allow us to create a graphical piece of software to add more units to the system and to customize the behaviour for each one (which sample to play, how far the object should be to trigger the sound, etc.)



0 Responses to “Forget-Me-Not”