sounds familiar with tons of recent MIDI controller i built here.
OK let's try to do some rough explanation
-------------------------------------------------------------------------------------------------------------------------
1.i want it sends midi only when the pot is rotated, sending all the values untill i stop to rotate!
what i suggest, is to store every POT valu in an array variable or different variable for each pot. You'll read ALL pot in a continuous loop then compare the result you have with the according variable or Array Index. Sure you'll have to insert a error percentage as the AD result may vary a little bit.
Once you have a different value you send it on the MIDI line.
-------------------------------------------------------------------------------------------------------------------------
2. i want to limit the range of the pot with the calibrate button,when i first press the button i set the min value to 0, then i rotate the pot to set another value corresponding to 127 pressing the button.
Perfect situation to introduce some POWER-UP check up. To make things clear figure the following. When you power up your system, you check if one (or more) specific push button are press, if so, you jump to the calibration routine
In the calibration routine, a LCD or XYZ LED will prompt for a start point on POTx, you place the pot to the according position then you press on a button. Once it's done same thing apply to the end point. Same for all POTs. Once it's done, it's up to you what you'll do as calibration confirmation.
Calibration must be store in a external EEPROM (or internal if available). When you boot your system, it just read the calibation and store them in some variables.
Hope this help
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks