KerJoe / MPU6050-Cemuhook-gyro

Gyroscope for Cemuhook based on ESP8266 microcontroller and MPU6050 accelerometer and gyroscope IC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question regarding coding

LegendaryBoyA12 opened this issue · comments

Hello! I managed to find your work after looking over the web for a while, and I'd thought nobody had thought of this yet. I'm completely new to arduino and coding, and was working on a small project for a controller. I see this is using the MPU6050 for gyro controls. Does it need to use the wifi ESP8266 module? I have my gyro unit set up with an arduino nano, and was was hoping I could send the data from the just usb out. Is this something that can be done?

Hi! I decided to use ESP8266 WIFI because it is the easiest way to communicate to Cemuhook (which uses UDP which is transported over the internet). While it is possible to send gyro data over serial, it would require writing a script on a pc converting COM to UDP. Also, to clarify, ESP8266 is the master and is not connected to any other micrcontroller.

Thank you for the explanation, I really appreciate it. Since it sounds a lot easier to use your method, I've decided to purchase and use the ESP8266 for the gyro controls. Just in case, is there any special wiring I should do to connect them properly?

No, the sda and scl pins of mpu6050 can be directly connected to any generic IO pin of esp8266 (by default gpio4 is sda and gpio5 is scl). These pins should be ok: GPIO5,4,0,2,14,12,13. You also should pull down GPIO15 and pull up GPIO2, GPIO0 (During programming GPIO0 is set to 0) and sda, scl.