{"id":1596,"date":"2020-10-15T19:09:25","date_gmt":"2020-10-15T23:09:25","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/?p=1596"},"modified":"2020-10-19T17:54:50","modified_gmt":"2020-10-19T21:54:50","slug":"braille-translator","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/?p=1596","title":{"rendered":"Braille Translator"},"content":{"rendered":"<h1>Problem<\/h1>\n<p>It can be very difficult for people with seeing difficulty to orient themselves. In fact, it is already difficult enough to locate the braille signs, which is supposed to help them. In addition, there are situations where visual clues are necessary, such as deciding which elevator goes up when two arrive at the same time. Here is a video that mentions such difficulty.<\/p>\n<p><iframe title=\"How Blind People Find Braille Signs\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/fYLdlO96uaM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<p>As a result, people with visual difficulty have to memorize routes. It is also very challenging for them to travel through a new district or locate a room in an unfamiliar building.<\/p>\n<h1>Solution<\/h1>\n<p>The key that causes this problem is the lost of visual clues. When we walk into a new building, we can look for signs for directions. When we travel through a new place, we can use google map as a guide.\u00a0 However, for people with seeing difficulty, the same clues are either impossible to get, like the road sings for example, or very inaccessible like the braille sign that hides behind a door.<\/p>\n<p>To solve this problem, I would like to translate the visual clues into braille on a device that is accessible. In other words, instead of looking for physical sign of braille, the user can read the signs in braille on a device in his or her hand. This device, however, can not only be used as a navigator but also a &#8220;seeing&#8221; tool to read the visuals in a space or environment.<\/p>\n<figure id=\"attachment_1600\" aria-describedby=\"caption-attachment-1600\" style=\"width: 840px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" class=\"wp-image-1600 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3485-1024x614.jpg\" alt=\"\" width=\"840\" height=\"504\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3485-1024x614.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3485-300x180.jpg 300w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3485-768x461.jpg 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3485-1536x921.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3485-2048x1228.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3485-1200x720.jpg 1200w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption id=\"caption-attachment-1600\" class=\"wp-caption-text\">The design of the prototype<\/figcaption><\/figure>\n<p>As shown in the figure above, the device have 12 digits for displaying letters and punctuations. Each digit is made of 6 solenoids and will display alphabet in braille. The rotary encode on the right is for flipping to the next 12 letters in the sentences. There are also a confirm button and a back button. This device can be connected to smart phone and indoor devices through Bluetooth or wi-fi.<\/p>\n<p>Suppose a person with difficulty wants to go to new place, he or she can use app on\u00a0 his or her smartphone to determine the route. The person can then use the device to navigate while walking. When there are road signs or alerts that need attention, the device will vibrate and display the message. The device will go back to the route when the alert was read and confirm button pressed. The person can also use the back button to check the last direction or instruction.<\/p>\n<p>Of course, the effectiveness of this device depends heavily on how small we can make it to be. With the current material of mini-solenoid, I can make it to have a length of 18 cm and a width of 7.2 cm. This cannot work effective as a navigation tool because it is too big and cumbersome. However, it can still be used while stationary such as in a restaurant, museum, and a room.<\/p>\n<figure id=\"attachment_1603\" aria-describedby=\"caption-attachment-1603\" style=\"width: 840px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" class=\"wp-image-1603 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3486-1024x536.jpg\" alt=\"\" width=\"840\" height=\"440\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3486-1024x536.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3486-300x157.jpg 300w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3486-768x402.jpg 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3486-1536x805.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3486-2048x1073.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3486-1200x629.jpg 1200w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption id=\"caption-attachment-1603\" class=\"wp-caption-text\">For future design<\/figcaption><\/figure>\n<p>If we have the interactive surface technology in the future, this is the design I will give to the device. It wrap around the arm of the user so that the user can hold a white cane in one hand, and read the information using another hand. No more buttons and rotary encoder are needed because everything can be displayed and interacted with through the surface.<\/p>\n<h1>Proof of Logic<\/h1>\n<figure id=\"attachment_1609\" aria-describedby=\"caption-attachment-1609\" style=\"width: 768px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" class=\"wp-image-1609 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3487-768x1024.jpg\" alt=\"\" width=\"768\" height=\"1024\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3487-768x1024.jpg 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3487-225x300.jpg 225w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3487-1152x1536.jpg 1152w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3487-1536x2048.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3487-1200x1600.jpg 1200w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3487-scaled.jpg 1920w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><figcaption id=\"caption-attachment-1609\" class=\"wp-caption-text\">The components of the demonstration<\/figcaption><\/figure>\n<p>The demo is made up of a solenoid, a Bluetooth module, 6 LED, 4 buttons, and a vibration motor. The LEDs represent the 6-dot grid of the braille. The corresponding grid is shown below.<\/p>\n<figure id=\"attachment_1610\" aria-describedby=\"caption-attachment-1610\" style=\"width: 840px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" class=\"wp-image-1610 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3488-1024x1015.jpg\" alt=\"\" width=\"840\" height=\"833\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3488-1024x1015.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3488-300x297.jpg 300w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3488-150x150.jpg 150w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3488-768x761.jpg 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3488-1536x1522.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3488-2048x2029.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/IMG_3488-1200x1189.jpg 1200w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption id=\"caption-attachment-1610\" class=\"wp-caption-text\">LED braille grid<\/figcaption><\/figure>\n<p>Because the demo-device is relatively complex, it will be explained with video of demonstration.<\/p>\n<p><iframe title=\"The function of solenoid\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/uQ7tZMhi8pk?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<p>This shows the normal function of the solenoid. In the later demonstration it does not function correctly due to the insufficient current arduino UNO supplies.<\/p>\n<p><iframe title=\"Flipping to the next or last 12 letters\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/Ozcw0GFp4i0?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<p>The two button pressed in the video represents the rotary encode that allows the user to flip to the next or previous 12 letters.<\/p>\n<p><iframe title=\"Going through the directions or instructions with confrim button\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/bdb2jFFPCGc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<p>The buttons pressed in the video are confirm button and back button, which allows the user to display the next or previous message instruction.<\/p>\n<p><iframe title=\"Alerts are send through Bluetooth\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/amce-jhvXCc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<p>Finally, in the video alerts are sent from the PC to the device through Bluetooth. The device then vibrate and display the alert with the corresponding braille letter.<\/p>\n<p>Schematic:<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-large wp-image-1637\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/shcematic_schem-1024x693.png\" alt=\"\" width=\"840\" height=\"568\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/shcematic_schem-1024x693.png 1024w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/shcematic_schem-300x203.png 300w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/shcematic_schem-768x520.png 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/shcematic_schem-1536x1040.png 1536w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/shcematic_schem-1200x812.png 1200w, https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/wp-content\/uploads\/2020\/10\/shcematic_schem.png 1644w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>Code:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\">\/\/Defining the pins\r\n#define solenoide 12\r\n#define motor 13\r\n#define rotary_up 5\r\n#define rotary_down 4\r\n#define confirm 3\r\n#define back 2\r\n#define LED1 11\r\n#define LED2 10\r\n#define LED3 9\r\n#define LED4 8\r\n#define LED5 7\r\n#define LED6 6\r\n\r\n\/\/Variables\r\n\/\/constant variables\r\nchar *INPUT_STRINGS[] = {\"information destk is at first floor\",\"elevator is to the right by ten meters\" ,\"this is room b ten\"};\r\n\r\n\/\/Message is like the route and direction\r\nint message;\r\nint message_length;\r\nString string;\r\nint start_letter;\r\n\r\n\/\/Alert is like the signs or alerts on the street or in buildings\r\nString incoming_alert; \/\/string that stores the incoming message\r\nString alert[5];\r\nint alert_index;\r\nbool has_alert;\r\nbool vibration_on;\r\n\r\n\/\/variable for interrupt, note that message is also a ISR variable\r\nconst bool isInterrupt = true;\r\nint message_number = 3;\r\n\r\n\/\/timer\r\n\/\/Clock 1 is the timer for checking the rotary encoder\r\nunsigned long clock1 = 0; \/\/ variable for timing\r\nconst int INTERVAL1 = 300; \/\/ milliseconds between updates\r\n\r\n\/\/Clock 2 is for serial printing for illustration\r\nunsigned long clock2 = 0; \/\/ variable for timing\r\nconst int INTERVAL2 = 2000; \/\/ milliseconds between updates\r\n\r\n\/\/Clock 3 is for serial printing for illustration\r\nunsigned long clock3 = 0; \/\/ variable for timing\r\nconst int INTERVAL3 = 1500; \/\/ milliseconds between updates\r\n\r\n\r\n\/\/ the interrupt method\r\n\/\/ NOTE:  we shouldn't use Serial.prinln(), delay(), and many\r\n\/\/ other functions in an interrupt method\r\nvoid ConfirmSwitchPressed()\r\n{\r\n  if (digitalRead(confirm) == LOW) {\r\n    if (has_alert == true) {\r\n      \/\/alert index also show how many alerts are in the alert array\r\n      if (alert_index == 1) {\r\n        has_alert = false;\r\n      }\r\n\r\n      for (int i; i &lt; alert_index; i++) {\r\n        alert[i] = alert[i + 1];\r\n      }\r\n\r\n      if (alert_index != 0) {\r\n        alert_index -= 1;\r\n      }\r\n\r\n      Serial.println(\"Alert read\");\r\n      return;\r\n    }\r\n\r\n\r\n    if (has_alert == false) {\r\n      message == message_number ? message = 0 : message++;\r\n      start_letter = 0;\r\n\r\n      Serial.println(\"Next Message\");\r\n    }\r\n  }\r\n}\r\n\r\nvoid BackSwitchPressed()\r\n{\r\n  if (digitalRead(back) == LOW) {\r\n\r\n    if (has_alert == false) {\r\n      message == 0 ? message = message_number : message--;\r\n      start_letter = 0;\r\n\r\n      Serial.println(\"Previous Message\");\r\n    }\r\n  }\r\n}\r\n\r\n\/\/Functions\r\n\/\/demonstration function that shows how to move solenoid\r\nvoid move_solenoid() {\r\n  digitalWrite(solenoide, HIGH);\r\n  delay(1000);\r\n  digitalWrite(solenoide, LOW);\r\n  delay(1000);\r\n}\r\n\r\n\/\/Demonstration function\r\nvoid vibrate_motor() {\r\n  digitalWrite(motor, HIGH);\r\n  delay(2000);\r\n  digitalWrite(motor, LOW);\r\n  delay(2000);\r\n}\r\n\r\n\r\nvoid show_letters() {\r\n  if (has_alert == true) {\r\n    braille(alert[0][start_letter]);\r\n  }\r\n\r\n  if (has_alert == false) {\r\n    braille(INPUT_STRINGS[message][start_letter]);\r\n  }\r\n\r\n  \/\/if there are actually 12 digits, each made of 6 solenoid\r\n  \/\/int digit;\r\n  \/\/for (i=start_letter, i&lt; start_letter +13,i++) {\r\n  \/\/     braille(digit, INPUT_STRINGS[message][start_letter + i])\r\n  \/\/     digit += 1;\r\n  \/\/    }\r\n}\r\n\r\n\/\/This function put the incoming alert into the alert array\r\nvoid insert_alert() {\r\n  \/\/-1 indicates that there is no \\ in the alert message\r\n  int null_index = incoming_alert.indexOf('.');\r\n  if (null_index != -1 and alert_index &lt; 4) {\r\n    alert[alert_index] = incoming_alert.substring(0, null_index);\r\n    alert_index += 1;\r\n    \/\/Tell the system there are alerts\r\n    has_alert = true;\r\n\r\n    \/\/Turn the vibration and its corresponding timer on\r\n    digitalWrite(motor, HIGH);\r\n    vibration_on = true;\r\n    clock3 = millis() + INTERVAL3;\r\n\r\n    \/\/Clear the string for the next incoming alert\r\n    incoming_alert = \"\";\r\n\r\n    Serial.print(\"Alert received, \");\r\n    Serial.println(\"vibration on.\");\r\n  }\r\n}\r\n\r\n\r\n\r\n\/\/In the actual desgin instead of this demo, the 6 LEDs are 6 solenoides\r\nvoid braille(char input) {\r\n  digitalWrite(LED1, LOW);\r\n  digitalWrite(LED2, LOW);\r\n  digitalWrite(LED3, LOW);\r\n  digitalWrite(LED4, LOW);\r\n  digitalWrite(LED5, LOW);\r\n  digitalWrite(LED6, LOW);\r\n  digitalWrite(solenoide, LOW);\r\n\r\n\r\n  if (input == 'a') {\r\n    digitalWrite(LED1, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n  if (input == 'b') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED2, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n  if (input == 'c') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED4, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n  if (input == 'd') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED4, HIGH);\r\n    digitalWrite(LED5, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n  if (input == 'e') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED5, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n  if (input == 'f') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED2, HIGH);\r\n    digitalWrite(LED5, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n  if (input == 'g') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED2, HIGH);\r\n    digitalWrite(LED4, HIGH);\r\n    digitalWrite(LED5, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n  if (input == 'h') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED2, HIGH);\r\n    digitalWrite(LED5, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n  if (input == 'i') {\r\n\r\n    digitalWrite(LED2, HIGH);\r\n    digitalWrite(LED4, HIGH);\r\n\r\n  }\r\n\r\n  if (input == 'j') {\r\n    digitalWrite(LED2, HIGH);\r\n    digitalWrite(LED4, HIGH);\r\n    digitalWrite(LED5, HIGH);\r\n  }\r\n\r\n  if (input == 'k') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED3, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n\r\n  }\r\n\r\n  if (input == 'l') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED2, HIGH);\r\n    digitalWrite(LED3, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n  if (input == 'm') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED3, HIGH);\r\n    digitalWrite(LED4, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n  if (input == 'n') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED5, HIGH);\r\n    digitalWrite(LED3, HIGH);\r\n    digitalWrite(LED4, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n  if (input == 'o') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED5, HIGH);\r\n    digitalWrite(LED3, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n  if (input == 'p') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED2, HIGH);\r\n    digitalWrite(LED3, HIGH);\r\n    digitalWrite(LED4, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n  if (input == 'q') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED2, HIGH);\r\n    digitalWrite(LED3, HIGH);\r\n    digitalWrite(LED4, HIGH);\r\n    digitalWrite(LED5, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n\r\n  if (input == 'r') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED2, HIGH);\r\n    digitalWrite(LED3, HIGH);\r\n    digitalWrite(LED5, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n\r\n\r\n  if (input == 's') {\r\n    digitalWrite(LED2, HIGH);\r\n    digitalWrite(LED3, HIGH);\r\n    digitalWrite(LED4, HIGH);\r\n\r\n  }\r\n\r\n\r\n  if (input == 't') {\r\n    digitalWrite(LED2, HIGH);\r\n    digitalWrite(LED3, HIGH);\r\n    digitalWrite(LED4, HIGH);\r\n    digitalWrite(LED5, HIGH);\r\n  }\r\n\r\n\r\n  if (input == 'u') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED3, HIGH);\r\n    digitalWrite(LED6, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n\r\n  if (input == 'v') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED2, HIGH);\r\n    digitalWrite(LED3, HIGH);\r\n    digitalWrite(LED6, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n\r\n  }\r\n\r\n\r\n  if (input == 'w') {\r\n\r\n    digitalWrite(LED2, HIGH);\r\n    digitalWrite(LED6, HIGH);\r\n    digitalWrite(LED4, HIGH);\r\n    digitalWrite(LED5, HIGH);\r\n  }\r\n\r\n\r\n  if (input == 'x') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED3, HIGH);\r\n    digitalWrite(LED4, HIGH);\r\n    digitalWrite(LED6, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n\r\n\r\n  if (input == 'y') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED6, HIGH);\r\n    digitalWrite(LED3, HIGH);\r\n    digitalWrite(LED4, HIGH);\r\n    digitalWrite(LED5, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n\r\n  if (input == 'z') {\r\n    digitalWrite(LED1, HIGH);\r\n    digitalWrite(LED6, HIGH);\r\n    digitalWrite(LED3, HIGH);\r\n    digitalWrite(LED5, HIGH);\r\n\r\n    digitalWrite(solenoide, HIGH);\r\n  }\r\n\r\n\r\n  if (input == ',') {\r\n    digitalWrite(LED2, HIGH);\r\n  }\r\n\r\n\r\n  if (input == '.') {\r\n    digitalWrite(LED2, HIGH);\r\n    digitalWrite(LED6, HIGH);\r\n    digitalWrite(LED5, HIGH);\r\n  }\r\n\r\n  if (input == '!') {\r\n    digitalWrite(LED2, HIGH);\r\n    digitalWrite(LED3, HIGH);\r\n    digitalWrite(LED5, HIGH);\r\n  }\r\n}\r\n\r\n\r\n\r\nvoid setup() {\r\n  \/\/ Setup the pin modes\r\n  pinMode(solenoide, OUTPUT);\r\n  pinMode(motor, OUTPUT);\r\n  pinMode(LED1, OUTPUT);\r\n  pinMode(LED2, OUTPUT);\r\n  pinMode(LED3, OUTPUT);\r\n  pinMode(LED4, OUTPUT);\r\n  pinMode(LED5, OUTPUT);\r\n  pinMode(LED6, OUTPUT);\r\n\r\n\r\n  \/\/When the buttons are pushed, digitalRead shows 0\r\n  pinMode(rotary_up, INPUT_PULLUP);\r\n  pinMode(rotary_down, INPUT_PULLUP);\r\n  pinMode(confirm, INPUT_PULLUP);\r\n  pinMode(back, INPUT_PULLUP);\r\n\r\n\r\n  \/\/Initiate the serial monitor\r\n  Serial.begin(9600);\r\n\r\n  \/\/ attach the interrupt pin to a method\r\n  if (isInterrupt) {\r\n    attachInterrupt (digitalPinToInterrupt(confirm), ConfirmSwitchPressed, FALLING);\r\n    attachInterrupt (digitalPinToInterrupt(back), BackSwitchPressed, FALLING);\r\n  }\r\n\r\n\r\n}\r\n\r\n\r\nvoid loop() {\r\n  \/\/Determining the number of messages\/alerts and the length of each message\r\n\r\n  if (has_alert == true) {\r\n    string = alert[0];\r\n    message_length = string.length();\r\n  }\r\n\r\n  if (has_alert == false) {\r\n    string = INPUT_STRINGS[message];\r\n    message_length = string.length();\r\n  }\r\n\r\n  \/\/Receiving the characters of incoming alerts\r\n  while (Serial.available()) {\r\n    \/\/while there is data available on the serial monitor\r\n    \/\/Serial.println(Serial.read());\r\n    incoming_alert += char(Serial.read()); \/\/store string from serial command\r\n  }\r\n\r\n  insert_alert();\r\n\r\n  \/\/Check if any movement has been made on the rotary encoder\r\n  if (millis() &gt;=  clock1) {\r\n\r\n    if (digitalRead(rotary_up) == LOW) {\r\n      if (start_letter + 12 &lt;= message_length) {\r\n        start_letter += 12;\r\n        Serial.println(\"Next 12 letters\");\r\n      }\r\n    }\r\n\r\n    if (digitalRead(rotary_down) == LOW) {\r\n      if (start_letter - 12 &gt;= 0)  {\r\n        start_letter -= 12;\r\n        Serial.println(\"Last 12 letters\");\r\n      }\r\n    }\r\n\r\n    clock1 = millis() + INTERVAL1 ;\r\n\r\n  }\r\n\r\n  show_letters();\r\n\r\n  \/\/For serial printing of demonstration\r\n  if (millis() &gt;=  clock2) {\r\n\r\n    if (incoming_alert != \"\") {\r\n      Serial.print(\"Incoming Alert: \");\r\n      Serial.println(incoming_alert);\r\n    }\r\n\r\n    \/\/Serial.print(\"The current message or alert: \");\r\n    Serial.println(string);\r\n\r\n    \r\n    clock2 = millis() + INTERVAL2 ;\r\n\r\n  }\r\n\r\n  \/\/For 2-second duration of the vibration motor\r\n  if (millis() &gt;=  clock3 and vibration_on == true) {\r\n    digitalWrite(motor, LOW);\r\n    vibration_on = false;\r\n    Serial.println(\"vibration off.\");\r\n  }\r\n\r\n\r\n}<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problem It can be very difficult for people with seeing difficulty to orient themselves. In fact, it is already difficult enough to locate the braille signs, which is supposed to help them. In addition, there are situations where visual clues are necessary, such as deciding which elevator goes up when two arrive at the same &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/?p=1596\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Braille Translator&#8221;<\/span><\/a><\/p>\n","protected":false},"author":24,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/posts\/1596"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1596"}],"version-history":[{"count":7,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/posts\/1596\/revisions"}],"predecessor-version":[{"id":1638,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=\/wp\/v2\/posts\/1596\/revisions\/1638"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/f2020\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}