-
• #2
check the pinout and try I2C1
-
• #4
Hi Mabe,
Thank you so much for your time!
Yeah, I ran I2C1 too. See here that I just did 15 minutes ago before began my level 5 search in Google :P
print(I2C.find(D20)); I2C1.setup({ sda: D20, SCL: D19 }); I2C1.setup();
I get error like this:
Uncaught Error: Unknown option "SCL" at line 1 col 34 I2C1.setup({ sda: D20, SCL: D19 });
also when I wrote to robot to see if it will at least move the right wheel by doing this:
I2C1.writeTo(0x08,1)
Seems no luck. :(
-
• #5
use scl not SCL
-
• #6
That seems it move forward, but it returns the undefined.
I2C1.setup( { sda: D20, scl: D19 } ); =undefined
See here full snippet:
>I2C1.setup( { sda: D20, scl: D19 } ); =undefined >I2C1.setup(); ERROR: SDA and SCL pins must be valid, got 255 and 255 =undefined >I2C1.writeTo(0x10,10) =undefined >I2C1.writeTo(0x10,1) =undefined >I2C1.writeTo(0x10,1); =undefined >
As you may tell that I'm very new to this. This feels like I'm trying to push a wooden triangle in the circle hole without knowing what those are.
I followed the tutorial and it worked but when it comes to me trying to move the motor, it didn't work. Any advice?
I truly appreciate your time!
-
• #7
but it returns the undefined.
https://www.espruino.com/FAQ#when-i-type-a-command-why-does-espruino-print-undefined-
As for "I2C1.setup(); ERROR: SDA and SCL pins must be valid, got 255 and 255" why are you calling setup again (in wrong way)? you already set it up correctly in line above.
Hi everyone,
I'm very new with Espruino and Javascript. I am learning Javascript from w3_school
Microbit...on other hand...it seems that everything is explained on Microbit
As this is concise and clear tutorial however, I noticed that there is no information anything about write digital, read digital or move the motor using smart_cutebot
I tried I2C and it says I2C.writeTo() is not found.
I've been trying new stuff on this microbit and I feel like I'm nowhere near to the start one.
So I come here to seek for your advice, or suggestion.