This article will help you in writing the code for your Arduino, using which you can apply the sequence of the alphabet that can be easily read by blind people. This language is called Braille language. Here, there will be six dots, which will be touched and felt by the blind. For all the 26 alphabet letters in English, we have 26 different pattern types. These patterns can be formed with the help of just six pins in Arduino. Before we get into this, let me explain a bit more about this language.
- Solenoid Actuator – X6 nos
- Jumping wires
- Relay – X6 nos
- Arduino
Writing code
We are going to use the pin numbers 2,3,4,7,12,13. Each pin will be connected to the positive end of the solenoid actuator. The code which we are going to write now is based on the conceptual pattern of Braille language. Here, we will be using six pins and one ground pin. For every different pattern, we will be using a different format of the coding. Have a look at the image below to learn about the patterns of the language. Look at the pattern of the letter A. To make the pattern work out, you need to make pin 2 high and the rest of the pins, namely 3,4,7,12, and 13, LOW. I have shown the image of the pattern, naming and pin numbers for the pattern.
Have a look at the code given below. Just copy and paste the code in Arduino IDE to get the same output for the Braille concept. In the code given below, I have written only for three alphabets. You just alter the code for the rest of the alphabets and numbers.
- char data;
- void setup() {
- pinMode(2, OUTPUT);
- pinMode(3, OUTPUT);
- pinMode(4, OUTPUT);
- pinMode(7, OUTPUT);
- pinMode(12, OUTPUT);
- pinMode(13, OUTPUT);
- Serial.begin(9600);
- }
- void loop() {
- data = Serial.read(); {
-
- digitalWrite(2, HIGH);
- analogWrite(3, -255);
- digitalWrite(4, LOW);
- digitalWrite(7, LOW);
- digitalWrite(12, LOW);
- digitalWrite(13, LOW);
- delay(1000);
- digitalWrite(2, LOW);
- analogWrite(3, -255);
- digitalWrite(4, LOW);
- digitalWrite(7, LOW);
- digitalWrite(12, LOW);
- digitalWrite(13, LOW);
-
- digitalWrite(2, HIGH);
- analogWrite(3, 255);
- digitalWrite(4, LOW);
- digitalWrite(7, LOW);
- digitalWrite(12, LOW);
- digitalWrite(13, LOW);
- delay(1000);
- digitalWrite(2, LOW);
- analogWrite(3, -255);
- digitalWrite(4, LOW);
- digitalWrite(7, LOW);
- digitalWrite(12, LOW);
- digitalWrite(13, LOW);
-
- digitalWrite(2, HIGH);
- analogWrite(3, -255);
- digitalWrite(4, LOW);
- digitalWrite(7, HIGH);
- digitalWrite(12, LOW);
- digitalWrite(13, LOW);
- delay(1000);
- digitalWrite(2, LOW);
- analogWrite(3, -255);
- digitalWrite(4, LOW);
- digitalWrite(7, LOW);
- digitalWrite(12, LOW);
- digitalWrite(13, LOW);
-
- }
- }
Connecting the Arduino
Now, it is time to connect your Arduino with the Solenoid Actuator with the help of the breadboard along with the relay. I will simply explain the concept of connecting Solenoid Actuator to Raspberry Pi without the relay. It is a must to connect the relay with Solenoid Actuator to get an efficient output. Connect the pins, as shown in the images given below.
Execution
Once you finish the connection, connect the device to the power supply and the program will start executing. Since we have written the code of the alphabets in the sequence with a small delay, the alphabets will be executed at an interval of 1 second until the letter Z. Hope this will help you in creating an IOT based Braille language app. Comment below, if you find any difficulties in executing this.
Thanks for reading.