Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Olfactory notifications          Carles Pina, carles@pina.cat, June 2012
Traditional senses and notificationsHearing
Traditional senses and notificationsHearing          The oldest church bell in the world [...]           dated to 1211-121...
Traditional senses and notificationsHearingSightSmell  todayTouch     (or a vibrator!)Taste
Previous researchWasabi fire alarm scoops Ig Nobel prize for Japanese scientists   Friday 30 September 2011http://www.guar...
More sensesBalance and accelerationTemperatureKinesthetic sensePainOther internal senseshttp://en.wikipedia.org/wiki/Sense
Some time ago...Use smell to notificate about... new emails
How it could be doneArduino?Something to warm up a scent?Fan?What else?
Olly the robot
http://ollyfactory.com/
Not OllyOlly is too bigToo niceNeeds a 3D printerI bought:
Problem2 £ deviceIts dumb. Cannot be controlled  (you can connect in the wrong way!)I had to do something to switch on/off...
Power off USB portHardware limitation on common controllers: not possible (some USB hubs could do...)You can switch off th...
I had the USB relay2 years ago I bought and didnt use a USB relayI “adapted” a USB cable (red cable is +5V)Connected the U...
Demo
IMAP checkerIMAPClient Python moduleIDLE support:  Waits updates from the server, keeps an open TCP   connectionIf some em...
IMAP  (mail server)IMAPClient.py                         USB                          ports   controls relay              ...
check-mail.py (1/3)from imapclient import IMAPClientimport smellWHITELIST = [friend1@gmail.com,  friend2@gmail.com]HOST = ...
check-mail.py (2/3)def check_wait_imap():    server = IMAPClient(HOST,  use_uid=True, ssl=ssl)    server.login(USERNAME, P...
check-mail.py (3/3) while True:            server.idle()
smell.pyimport osimport timeusb_dev =  "/dev/ttyUSB0"
Demo
Questions?                       ?          Information (slides, code, etc.):http://pintant.cat/2012/06/02/olfactory-notif...
Upcoming SlideShare
Loading in …5
×

Olfactory notifications

2,816 views

Published on

How to setup a system (a bit hacky :-) ) to switch a USB relay when there are new mails in order to have olfactory notifications.

Published in: Technology, Health & Medicine
  • Be the first to comment

  • Be the first to like this

Olfactory notifications

  1. 1. Olfactory notifications Carles Pina, carles@pina.cat, June 2012
  2. 2. Traditional senses and notificationsHearing
  3. 3. Traditional senses and notificationsHearing The oldest church bell in the world [...] dated to 1211-1216 http://en.wikipedia.org/wiki/Church_bell
  4. 4. Traditional senses and notificationsHearingSightSmell todayTouch (or a vibrator!)Taste
  5. 5. Previous researchWasabi fire alarm scoops Ig Nobel prize for Japanese scientists Friday 30 September 2011http://www.guardian.co.uk/science/2011/sep/30/wasabi-fire-alarm-ig-nobel-prize
  6. 6. More sensesBalance and accelerationTemperatureKinesthetic sensePainOther internal senseshttp://en.wikipedia.org/wiki/Sense
  7. 7. Some time ago...Use smell to notificate about... new emails
  8. 8. How it could be doneArduino?Something to warm up a scent?Fan?What else?
  9. 9. Olly the robot
  10. 10. http://ollyfactory.com/
  11. 11. Not OllyOlly is too bigToo niceNeeds a 3D printerI bought:
  12. 12. Problem2 £ deviceIts dumb. Cannot be controlled (you can connect in the wrong way!)I had to do something to switch on/off the device or the USB portWhat it does? Just gets hot
  13. 13. Power off USB portHardware limitation on common controllers: not possible (some USB hubs could do...)You can switch off the port, not power off (USB memory sticks stops blinking, but still has 5 V)See: http://marc.info/?l=linux-usb&m=127162615232234&w=2
  14. 14. I had the USB relay2 years ago I bought and didnt use a USB relayI “adapted” a USB cable (red cable is +5V)Connected the USB relé and switch on and off using a small script:stty -F /dev/ttyUSB0 9600On: echo -e xffx01x01 > /dev/ttyUSB0Off: echo -e xffx01x00 > /dev/ttyUSB0
  15. 15. Demo
  16. 16. IMAP checkerIMAPClient Python moduleIDLE support: Waits updates from the server, keeps an open TCP connectionIf some email is in the whitelist: smelling email!! :-)
  17. 17. IMAP (mail server)IMAPClient.py USB ports controls relay (on/off) USB relaycheck-mail.py smell.py +5V
  18. 18. check-mail.py (1/3)from imapclient import IMAPClientimport smellWHITELIST = [friend1@gmail.com,  friend2@gmail.com]HOST = pinux.infoUSERNAME = carlesPASSWORD = my_password
  19. 19. check-mail.py (2/3)def check_wait_imap():    server = IMAPClient(HOST,  use_uid=True, ssl=ssl)    server.login(USERNAME, PASSWORD)    select_info =  server.select_folder(INBOX)    print %d messages in INBOX %  select_info[EXISTS]
  20. 20. check-mail.py (3/3) while True:            server.idle()
  21. 21. smell.pyimport osimport timeusb_dev =  "/dev/ttyUSB0"
  22. 22. Demo
  23. 23. Questions? ? Information (slides, code, etc.):http://pintant.cat/2012/06/02/olfactory-notifications/

×