I have been trying to figure out how to get the SerialPort to send data to the Arduino.
That has been successful, but now I have another problem. I have been working with Visual Basic to develop a controlling application that connects to the arduino but it does not communicate in the way I need it to because of how I initially set up my code, and I do not know the appropriate terminology to find out how to set it up.
Before:
Any information with /n ending is interpreted as a specific speed where the only input recognized is numbers at the moment. The numbers set the motors' PWM duty cycle and the range is from 0-1024.
Now:
What I need to do is somehow write a code where once I click a button the serial program sends a simple letter and the arduino programming can interpret say a letter (u) and interpret it as an up and increase the speed by 10 or so and (d) executes a reduction in the variable by 10 or so.
I initialize my variable at 0, and eventually the "Start" button will initialize the speed at a users pref speed.
What is the best programming setup to adjust speed via clicks and possibly a slider, rather than manually entering in numbers in a serial monitor?
Eventually certain buttons will output a very specific number but I have had problems with the buttons adjusting the number for some reason. I think also, I might have to code in /n although I think it was built into my programs. I know that it is getting the data because when I click the button the rx and tx lights come on.