Problem with module MPU6050 #6198
Replies: 1 comment
-
Posted at 2019-11-16 by Robin Sat 2019.11.16 Hi @ptitonio,
Which module did you have success with? I just checked the sample script: and it appears there is no binding of the pins for I2C to the MPU6050 using the connect() function. Is all the code actually provided in #1? Also, the pin labeling L#1 scl,sda needs another look as the pin numbers are different between devices:
Formatting help suggestion: It appears the reason for the block within the three backticks is not displaying correctly, is that this line 'TypeError: Cannot read property 'length'' needs to start on the next line following the backticks. Both opening and closing backtick group needs to be on its own line. Posted at 2019-11-16 by Ptitonio Thank you Robin for your response. Good test with the HR-SR04 module : Bad test with MPU6050 module : I did tests on PICO and ESPRUINOWIFI with the same problem. Posted at 2019-11-16 by Ptitonio screenshots... Attachments: Posted at 2019-11-16 by Robin Has or try Another idea to wrap the code snippet in a try/catch code block to see if errors are occurring that are bubbling up and not caught. Take a peek at the WebIDE console output: *(the end of the listing)* WebIDE >> Settings >> Console It's possible, but a bit unlikely that upgrading to 2v04 might resolve. *(not there yet)* Was it noticed that the modules require different operational voltages? SCL SDA swapped? Solid grounding between the Espruino device and the module? Posted at 2019-11-17 by AkosLukacs Turn off minification. The error on the first screenshot points to Posted at 2019-11-18 by Ptitonio Here's the dump()
I put the minification off (the second red error message disappears). Attachments: Posted at 2019-11-18 by Ptitonio Hi AkosLukacs, Turn off minification only deletes the message :
I have Web Ide 0.72.1 I have also a Espruino IDE Native version 0.69.0 for my MDBT42Q Bluetooth Module. There are some issues with Web Ide 0.72.1 Posted at 2019-11-18 by AkosLukacs Ah, ok, another problem is that the MPU6050 is rather big, there is another recent thread, and Oh, and update the Native Ide, might help. Posted at 2019-11-18 by Ptitonio I installed Espruino IDE Native version 0.72.1 and it works well with the MPU6050 module. Posted at 2019-11-19 by Robin Mon 2019.11.18 Glad you got it working! A bit of confusion in #8, so the Pico is working with Native 0.69.0 then? Was it the uploading of modules as functions? (ref Gordon's comment link in #9) ... or, ... upgrading to IDE Native version 0.72.1? (as indicated in #10)
What specifically is observed with 'some issues'? Posted at 2019-11-19 by Ptitonio Yes Pico (and EspruinoWifi) works when I use IDE Native 0.69.0 (and 0.72.1) to transfert code.
No I didn't use the option "Module uploaded as functions". The code is uploaded in RAM . When I was doing tests with different IDE, I noticed some strange things. I'm going to synthesize all this in a new post. Posted at 2019-11-19 by Ptitonio Here is the result of my tests with 2 IDEs: WEB IDE 0.72.1 and Espruino Native IDE 0.72.1
We see:
It's strange the modules do not have the same size. Posted at 2019-11-19 by Ptitonio Screenshoots ... Attachments: Posted at 2019-11-21 by @gfwilliams In your IDE's settings (the one with the error), is If so the minified modules should already be loaded by default. The length of 31561 you're seeing would only be happening if the IDE was loading the unminified file. Is it possible you changed that setting, or have your own local copy of the module? Also, when you mention Posted at 2019-11-21 by Ptitonio Gordon ! We are a genie ! Thanks a lot PS: WEB IDE = Chrome Web store IDE |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2019-11-16 by Ptitonio
Hello ,
when I save this code on my Pico or EspruiniWiFi :
the console return :
I tried other module successfully.
Is the MPU6050 module a problem?
Am I missing something?
Thank you for your help
Beta Was this translation helpful? Give feedback.
All reactions