Pages: [1]   Go Down
Author Topic: all-purpose notification system?  (Read 1218 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I would like to make a simple 'extendable' project.  It would be a board with several LEDs, a lcd, perhaps a button and maybe a keypad.  Basically the idea is to make something that I can use to notify me independent of my computer.  The possibilities are things like:

* An LED blinks to remind me to move my car and if I hit a button then it wont remind me again for another 24 hours (maybe some sort of snooze)
* An LED reminds my father when to take his pills (maybe with a more sophisticated 'alarm' than the above)
* An LED which blinks everytime someone visits my website
* An LCD which displays a current twitter feed.

So I'd like to do all of the above but the key to this project is that it is extendable.  Also I want this little command center to be multifunctional.  Different lights blinking, text on LCD, etc.  If something comes up and I have a great idea, I want to have those extra LEDs or LCD or whatever to easily upload  and have it work.  

1) Is this possible?  Am I going about this the wrong way?
2) Are there other ways to notify that besides an LCD/LED system?  Can someone help me brainstorm how else I would use a notification system like this?
3) Has something like this been done before?  Is there a guide anywhere?
4) I think communicating with the computer is necessary.  Do I go ethernet or usb?

Any suggestions  you can give would be a great help.

Thanks!!!
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 221
Posts: 13848
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
1) Is this possible?  Am I going about this the wrong way?
Definitely possible, check the adafruit logshield - http://www.ladyada.net/make/logshield/ -

it has a Real Time Clock and an SD card.

On the SD card you should have a file which codes the times, the actions and the text for the LCD.

ANd the Arduino reads this file and does a countdown to the next event on the list.

I would propose using a text file with the following structure: { Date; Time; action; text }


*; 08:00; on 5; wake up!
*; 09:00; blink 12; take the red pill
*; 18:00; blink 7; take the blue pill
*; 22:00; on 12; go to sleep
0101; 00:00; blink all; happy newyear
1504; 09:10; flowers for wife


In pseudocode the [simplified] code looks like:

Code:
void loop()
{
  t = getRTCtime();
  if (EventExist(t) == true)
  {
    lcd.println(getEventText(t));
  }
  action = getEventAction(t);
  while (not keypressed())
  {
    do( action);
  }
}

You can extend it by adding lines to the file on the SD card. Once a year you need to check date/time of the RTC.

Get the idea?
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To me, this is crying out to be implemented as a smartphone app. It seems bizarre to me to implement it on yet another piece of hardware that has to be carried about with you in addition to your phone, wallet, keys and whatever else you already need.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@ robtillaart  -  I don't really need any logging function (though I might in the future).  So I was thinking of just hard-coding the events into the code rather than a text file. 

@ PeterH - So here's why I don't want a smartphone app:  1) This will not be carried around with me, this will reside at my workstation where I am at most of the time.  2) A smartphone app is rigid.  Say I develop an app for a pill-reminder system (I'm sure there out there), ok now I want to change it to a website traffic display, I have to recode an entire app and ui just to do this? Setting aside the fact that a website traffic monitor is not feasible with a smartphone app, with a general purpose notification system, you just reload some new code to the arduino and it does what you want.  3) A smartphone app is a one-hit-wonder.  Yes I can find an app that reminds when to take a pill, an alarm when to move my car, etc.  But can it do them all?  I have to now run several apps/alarms just to get a twitter feed, a website traffic monitor, a pill-reminder for something the arduino can do all at once.  4) It would be VISUAL.  This is a big one for me.  I just want to shift my eyes right and see a heads-up of important info.  I don't want to open 3 things on the computer that will be covered over with other windows,  I don't want my phone to vibrate every 10 minutes and then have to check to see what of the 10 things it is notifying me about.  I just want a visual command center that I can see across the room and have a proper assessment of what's going on.  Think of it as blink(1) on steroids:

http://www.kickstarter.com/projects/thingm/blink1-the-usb-rgb-led

A phone app may work for some people, but it really wouldn't work for my needs.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 221
Posts: 13848
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I don't really need any logging function (though I might in the future).  So I was thinking of just hard-coding the events into the code rather than a text file. 

The idea was to use the logging disk not for logging but its disk as carrier for a file with times and actions.
This way you can update the clock without creating a new executable - anybody could update the textfile on a PC.

By using the disk for events you can in theory have an action for every second of the day (86400 sec/day) thereby
extending the capabilities of the Arduino beyond its internal memory smiley

Furthermore by placing the times/actions and text on an external memory you have more flash memory free for functional code to implement different actions!




Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes this might be useful for some, but I'm not sure it fits my needs.  I need half-a-dozen complex triggered events that occur on a regular basis not varied times of similar events (in the sense that all parameters can be read from the text file).  I *think* it would be sufficient for me to just hard-code what I need to do for these varied events (flash led 1 at 9pm; flash led 2 when someone visits your site; display twitter feed (or whatever) when polled.  But I will certainly keep your suggestion in mind as it makes it much more extendable.
Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A phone app may work for some people, but it really wouldn't work for my needs.

Your reply seems to be based on lots of assumptions about how the hypothetical smart phone app would behave. I would argue that it's easier to modify the behaviour and appearance of a smartphone app than an Arduino, since the appearance and behaviour of the app are both defined purely in software, whereas the Arduino is a combination of firmware and hardware. Just in case you're not clear about this, I'm proposing that you write an app that does what you want. Make it as pretty and/or flexible as you want. If you just want it to display some coloured dots on the screen pretending to be LEDs, that's all it needs to do. (Personally, I suspect you can do MUCH better than that.)
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I see what you're saying but it just doesn't fit my needs. 1) I think it's just as easy to modify and upload arduino code than to dig into the android api (for example) but the main reason is that 2) The hardware is a feature not a bug.  So say I code some android app, ok great, now I got some lights. Do I let the screen timeout? Then I lose the power of at-a-glance notification.  Better make sure it's always plugged in because I want the display on constantly.  Ok, now I have to make a call, oops, I didn't put it back on the 'notification' app.  And EVEN IF this was logistically ideal (it's not) high-rate polling of webserver traffic or network health, or weather, etc. with a smartphone app would be absolutely the worst way to do this sort of monitoring (if it's even possible)

I do see what you're saying, and a simple smartphone app may work for some people for some tasks, but not for what I want.  I need it to be permanent, always-on, independent, stand-alone, at-a-glance, and perpetually attached to the computer.  Every single one of these requirements are exactly opposite of what a smartphone app excels at.
Logged

London
Offline Offline
Edison Member
*
Karma: 48
Posts: 1474
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I need half-a-dozen complex triggered events that occur on a regular basis

How are visits to your website 'regular events'?
I cannot think of anything more random.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How are visits to your website 'regular events'?
I cannot think of anything more random.
Well I definitely could, but that's besides the point.  The visits need not be regular, but the polling would be.  There are *MANY* ways one could do this, but one possibility is to poll for visits every N minutes/seconds (a regular interval).  If the granularity of the polling is sufficient you'll see more or less real-time traffic info.  But there's no need to do it this way there are *MANY* other ways, the point is that notification of random info can definitely be displayed properly by regular triggers.
Logged

Pages: [1]   Go Up
Jump to: