-->
Page 1 of 1

NodeMCU + MPU6050

PostPosted: Wed Oct 19, 2016 12:49 pm
by Nicklars
Hi,

I want to use two MPU6050 as movement sensors to analyse movements of a human.

Originally I wanted to use a normal ESP8266 + MPU6050 + Arduino Uno. It all worked out quite well, but I want to make the whole setup a bit smaller because I want to place one sensor on each wrist, and that would be an Arduino Uno on each wrist.

So I want to read Sensor Data from a MPU6050, transfer it to a NodeMCU and send it to my PC.

Before I order the NodeMCU and start working I want to ask some things:

Is there something special I should consider before I buy the NodeMCU?
I was considering this one:
http://www.ebay.at/itm/201566780411?_tr ... EBIDX%3AIT

I know that I can use Arduino IDE to programm the NodeMCU, but is it convenient? Is it easier with Lua? Is there a better way to do it than Lua and Arduino?

Right now my MPU6050 SCA and SCL are going into the Arduino Uno Pin A4 and A5. The NodeMCU only has one analog Input, how do I overcome this problem?

Thanks,

Niklas

Re: NodeMCU + MPU6050

PostPosted: Thu Oct 20, 2016 9:37 am
by martinayotte
Personally, I would stick with ArduinoESP framework ...

For ADC inputs, you can add 4 channels I2C 18 bits ADC such as MCP3424, or 8 channels SPI 12 bits such MCP3208.

Re: NodeMCU + MPU6050

PostPosted: Tue Nov 15, 2016 3:48 am
by FreddyVictor
Nicklars wrote:Hi,
Right now my MPU6050 SCA and SCL are going into the Arduino Uno Pin A4 and A5. The NodeMCU only has one analog Input, how do I overcome this problem?


I'm a bit confused by this so thought I should clarify for you !

MPU6050 is a digital device using i2c (SDA & SCL lines)
The Arduino pins A0->A5 can be configured as either analog or digital pins - the A4 & A5 pins have the i2c module.
On ESP8266, I believe SDA is on IO2 (D4) and SCL is on IO14 (D5) - no need for any ADC pins!

Re: NodeMCU + MPU6050

PostPosted: Tue Mar 17, 2020 4:49 am
by charu
hey can you please provide source code for it.I want to do the same program