Go Down

Topic: Serial Monitor interupt (Read 879 times) previous topic - next topic


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
Code: [Select]

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.


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131