What is a Smart Pen??
Smart Pen is a smarter way to know the meanings of the words (and calculations) that we are not so familiar of. If you Know to write(the word) - Then write the word to know the meaning.
To say it in a line : Dictionary + Pen + Calculator = Smart Pen.
How it works ?? A technical Approach.
An Optical sensor along with the Contact Sensor(Grove IR sensor) is placed in the nib position of the pen - that takes picture of about 1000-1500 pictures/second. By acquiring sequential surface images using digital signal processing principles the direction of movement of the nib is found out using ADNS 5020 sensor package.
The output of the sensor is delivered as signals for distinct motions in the BeagleBone
i.e., the motion is detected and delivered as a 8 bit data in X and Y axes. The signal is used to find the coordinates of the points that the pen has moved for each letter.
The coordinates of each letter is noted and uploaded in the Beaglebone's memory.
// x is the array of input instantaneous signal values - the change in position;
// sumarr is the array of input integrated signal values - the position w.r.t origin;
// count is to count the no of values;
// contact is the value from the contact sensor connected
if (contact>0)
int x[],sumarr[],count;
for(i=0;i<100;i++)
{
cin>>x[i];
// The instantaneous motion data signal is stored in the array
sum+=x[i];
// The value is added iteratively to get the final position and stored in sumarr
sumarr[i]=sum;
count++;
}
Each letter's coordinate is stored in the Library before hand.
The letter written now is compared with the library and the letter is recognized by Matrix matching(character recognition) of the
int x[100],occ[100],lib[100][100],sumarr[100],count,sum=0,i=0,j,k;
\\ The sumarr is a array of all positions where the pen has written i.e the co-ordintes where the letter written by the user ;
\\ The lib is a array of all letters(and numbers) and position of its co-ordinates i.e the co-ordinate points where the letter is present ;
for(i=0;i<100;i++)
occ[i]=0;
for(i=0;i<100;i++)
{
for(j=0;j<100;j++) //row
for(k=0;k<100;k++) //column
{
if((lib[j][k] - sumarr[i])==0)
occ[j]++;
}
}
// Comparing each letter with all the letters present in the library and returning the most suitable character and the number of occurrence is stored in occ array
int max = 0;
for(i=0;i<3;i++)
if(occ[i]>occ[max])
max = i;
cout<<max+1;
}
When the Enable button is pressed(only after all the letters is written) - the word is set to search.
enum max{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z};
if (contact==0)
{ word[i]=max; i++}
The letters are so framed into a word and the word is searched in the dictionary in the BeagleBone and the meaning corresponding to the word is printed to the LCD display(connected to the board) or in the pen can be connected to any other device TV - Smartphone - its own display - Projector with IoT.
Hardware:
Beaglebone
LCD Screen
Grove IR Distance interrupter
Comments