Pages: [1]   Go Down
Author Topic: Serial Monitor interupt  (Read 435 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am currently playing with an i2c accelerometer/gyro (MPU6050) to build a balancing robot.

Rather than keep changing variables in the code and then recompiling and uploading I would like some form of interrupt so that when a command is sent via the serial monitor it changes a variable.

I'm not even sure that an interrupt is what I need to be honest.

So for example, the basic program structure is something like this
void loop() {
 //update sensors

 //calculate motor speed

 //run motors


There are different sensitivity settings for the MPU6050.  I want to be change the sensitivity of the accelerometer or gyro using the serial monitor.

Can anybody help or suggest a better way.


Pages: [1]   Go Up
Jump to: