-
-
Now I understand - I used to send it this way and it complained:
>analogRead(A0) Uncaught ReferenceError: "A0" is not defined at line 1 col 12 analogRead(A0) ^
.... All I had to do was send it like this
analogRead();
to get it work!NOTE: On the WeMos website they mention that max on the analog read is 3.2v... we sill see.
Thank you all!
-
Some background Info:
I am using Espruino as an "external interface" to LabVIEW so I can control hardware away from my setup. I send and capture messages over TCP/IP and utilize its elements to either display and/or do something else.
Over the computer I can discard anything from return string dump, utilize the information I need, and move on with the tasks. Nevertheless, I was really wondering how useful is the displaying of such type information is.
And, if I am missing the whole point, please forgive me, I would love to take advantage of it.
Still, regardless of how many messages are read or written: Aren't all I2C messages 1 Byte (Uint8) long by standard?
Thank you all.
-
Hopefully this is the proper place the following question:
with the following code:
I2C1.setup({sda:D4,scl:D5}); //var result; function m(){ var PAYLOAD = []; var data = []; for (var i = 0; i < 2; i++){ I2C1.writeTo(0x40,(i)); data = I2C1.readFrom(0x40,0x02); PAYLOAD.push(data); } //result = PAYLOAD; return PAYLOAD; }
I get the following output:
_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v86.tve_master_247bc37 Copyright 2016 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 4MB:512/512, manuf 0xe0 chip 0x4016 >echo(0); =undefined > =undefined >m(); =[ new Uint8Array([113, 39]), new Uint8Array(2) ] >
My question(s):
1.- What is the purpose of displaying
new Uint8Array([113, 39]),
instead of[113, 39]
? -
TI INA3221: "INA3221 Triple-Channel, High-Side Measurement, Shunt and Bus Voltage Monitor"
a.- (Dev Kit by SwitchDoc Labs : http://store.switchdoc.com/ina3221-breakout-board-3-channel-current-voltage-monitor-grove-headers-compare-to-ina219-grove-headers/ )b.- I2C works with:
I2C1.setup({sda:D4,scl:D5});
c.- Physical Pinouts are SCL/D1 and SDA/D2 (3 places on the board)
d.- PullUps @ 4k1 Ohms
E.- Work In Progress
-
-
-
@Frida, or anyone
That did it! I don't have a Logic Analyzer, but from your knowledge:
1.-What do you think the data rate will be? Is fixed to a specific value or it fluctuates? those questions matter as I would like to size the pull-up resistors accordingly.
2.- Do you by any chance know about AnalogWrite pin value or how to find it? I tried it to just put values starting at "A0" and kept on going (who knows how many iterations) without any luck.
Thank you!
-
This is what I get every time I try to setup the I2C, it just dumps this data and resets:
>I2C1.setup({sda:D4, scl:D5, bitrate:100000}); ets Jan 8 2013,rst cause:2, boot mode:(3,6) load 0x40100000, len 1396, room 16 tail 4 chksum 0x89 load 0x3ffe8000, len 776, room 4 tail 4 chksum 0xe8 load 0x3ffe8308, len 540, room 4 tail 8 chksum 0xc0 csum 0xc0 2nd boot version : 1.4(b1) SPI Speed : 80MHz SPI Mode : QIO SPI Flash Size & Map: 32Mbit(512KB+512KB) jump to run user2 @ 81000 ã4ýXÑ128=0x80000 ãìgäsón|ä$l`ãsll _____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v86.tve_master_247bc37 Copyright 2016 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 4MB:512/512, manuf 0xe0 chip 0x4016
-
NOTE: Please allow me to direct this post somewhere else within the ESP 8622 Forum if it is not appropriate for this "Conversation" trail.
I am setting up Espruino @tve 1v86 version on the WeMos R1 D2 module. I have been able to pin (by trial and error) which pins do what Here is the list as an attached picture.
The only things (so far) I have found not running are:
1.- AnalogRead(A0?)
2.- I2C set for SDA:D04 and CLK:D05I found a post explaining what to update (".c" and ".h") for the I2C to work, but I really don't know how to build ESPRUINO yet.... on the AnalogRead I really don't know where to start.
Any help that can be provided will be highly appreciated.
-
Hi all,
I am having the same issue with the I2C as described on the first post. I am currently using firmware 1v85 and 1v86 (from @tve github) and found that the fixes on both the ".h" and ".c" files seemed not implemented.
I would appreciated just direction on what to do to get me going, as I would like to implement I2C to the Wemos R1 D2 board.
@MaBe
Excellent! Great approach!
@Gordon
Thank you for the explanation, it does make sense.