I'm still experimenting with servos and controlling them with a mouse I have already made a program that gets cursors position and "translates" the numbers to ones arduino can use to set the servo's angle.
That doesn't explain why you need to use Firmata. You can send serial data directly to the Arduino, and write your own sketch to read, parse, and use that data.
If you must use Firmata, use the ServoFirmata sketch on the Arduino, and the sendAnalog function to send the servo position to the servo pin.
Is there any other way to send a simple number that ranges from 0 to 179 to the arduino in visual basic?
You can use the MSCOMM control to talk to the serial port. Once you can do that, you can send it anything you want.
Then, you write a sketch for the Arduino that reads the serial data, stores it in a character array (NULL terminated, of course), and then parses the data when the end-of-packet marker you wrote is received.
1.In visual basic I should send the number in "Parts" eg if i have a number 99 it would firts send a 0 then 9 and then 9 which should translate in 48 57 57.
those three numbers I would temporarly store in EEPROM.
Then I would use if statments to convert from ASCII to numbers and then store the three again in EEPROM
Again I would "grab" the numbers from EEPROM and "assemble" the numbers back to 99.
NOTE1: I don't know if there are already any implemented functions that let me bypess the process above...
There is no reason to store the data in EEPROM. That's what variables are for.
If you have 99 in "Parts" (whatever that is), or any number that will not exceed 255, you could send the value as a byte, rather than as a string.
Then, the Arduino needs to do nothing more than read the number.
If the number could exceed 255, then sending it as a string is the next easiest thing to do. The problem with that is that you don't know what characters in the string go together to form a number. You need to add start and end of packet markers, around the number, like <582>.
Then, the Arduino can read serial data, ignoring it until it sees a start of packet marker (<). It then reads everything, in a loop. If the character read is not a >, then it gets stored in an array. If it IS a >, then, break out of the loop and process the string.
Search the forum for "started && ended" for an example of how to read serial data with start and end markers, and store the data between them.
Once you have the characters that represent a number, with a NULL terminator, you can use atoi to convert the string to an integer.