-
Mhmmm... yeah tried that in various combinations but nothing worked so far. I also tried LoopbackA.setConsole(). And I also tried using D1 and D3 instead of D2 and D0. Those are the serial port pins, but they also didnt work....
I'm kinda out of ideas and it feels like I've tried everything I can think of. Maybe I'll just do it in C....
Anyways, thank you a lot for your help. Tell me if you have another idea though, I'd love to try it out. It would still be great if I can swap it one day to Espruino, thanks a lot for Espruino :)
-
-
Just tried to set them to output, but nothing changed... It's so frustrating. Like, if it's working with C-Code, the wiring should be ok no? Feels like I'm missing a crucial detail, but can't find it. Basically, all I should have to do is setup the I2C via I2C1.setup({scl:D2, sda:D0}) and then via I2C.find(I2C1) I should be able to find the MCP or at least get something back, other than "undefined".
EDIT: Just swapped the MCP to make sure, I wasn't using a faulty device... But not working either...
Is there something I forget, what I need to setup the ESP properly? Similar things to setting the frequency as an example?
-
-
Thanks a lot for your answers guys, but nothing worked yet.
Since it's an ESP8266 ESP-01 it should be GPIO. In the reference it says, that GPIOx maps to Dx, so I think that using D0 and D2 is alright. I also tried it with new Pin(0) and (2) but that didn't work either (and is deprecated).
I also tried deactivating the debug output, but no change either. Plus I've read a few times, that it "should" be deactivated in newer builds by default.I once again tried my C-Code, because I feared that I made a mistake soldering the 10k resistors, but it's still working. So somethings wrong with my code, even though it's only 3 lines of code.
-
-
Hello Forum,
I'm having trouble getting the MCP23017 to work with my ESP-01 running Espruino v87.
I'm using D2 for data and D0 for clock. This is the code I'm using to set up the connection:
I2C1.setup({scl:D2, sda:D0}); mcp = require("MCP23017").connect(I2C1, null, 0x20);
If I try to send commands to the MCP, e.g. "mcp.A0.mode("output")" I get the "I2CWrite: No ACK" error. I searched the forum and google to find a solution. I tried to use Nodemcu.D2 e.g. instead of D2, changed the frequency to 80MHz of the ESP, but nothing seems to work.
The wiring should be fine too, I have some C-Code doing some things with the MCP and that one worked, at least i could turn the ports of the MCP on and off. I've also added the 10K resistors on both pins, even though it was working without too, but that didn't help either...
The only thing I didn't try yet is connecting the reset pin. Everything's already soldered up and it's kinda difficult to change that now. But I tried removing the MCP and putting it back on, it's not directly soldered...
The address should be fine too, used it in the C-Code as well and "I2C.find(I2C1)" gives me Undefined...
Do you have any suggestions what I'm doing wrong here?
-
ahhh ok thanks a lot. Didn't try that of course -.- :D
Anyways, it seems to work great, even though I'm still having problems with wifi.connect for example, the callback doesn't seem to be called when there was an error while connecting. But apart from that it works really nice, great stuff you did here, thanks a lot for Espruino :) -
-
Well, i just used the standard JS-Script you get when you start the IDE. Even though I can't connect to it via IDE, I actually can connect with putty for example and type in commands...
And I can even connect via WiFi. Well I guess that should work too :)
I have some things about it the ESP now, but the flashing and saving stuff is still a riddle to me.. When I submit my real script to it, then it's actually written to the flash and available after reboots of the ESP right? But I can also instantiate variables and create functions the command line. Is there a way to save them too? I've read about wifi.save(), which seems to do sth like that. But is the initial script overwritten then?
Thanks
-
-
Hey,
I'm sorry for bothering you again, but I still can't get it to work properly. When the system is newly flashed, I can use the Web IDE to play around with it. But as soon as I've flashed one single JS script and then reset the ESP (disconnecting from power and powering on again) I cannot reconnect to it anymore.
I only get
Connected > Disconnected echo(0);
I'm using v86 for the ESP and need to reflash it every time to gain access to it again...
Thank you,
Timo
-
Hey guys,
thanks a lot. Obviously I used the wrong image. I followed the instructions of the youtuber called "ACROBOTIC" and it might be outdated or I understood something wrong. It actually said ESP8266 for the files, but I didn't use the combined one.
Anyways, I now flashed as described in the post of Gordon here: http://forum.espruino.com/conversations/279176/?offset=25 and I can get it working.
Thanks,
Timo
-
Dear forum,
I've done a few things with the ESP8266 and Arduino IDE so far, but I'm far away from being an expert :D Especially all the booting and flashing stuff is a riddle to me
And I thought, I might try Espruino, even though I'm pretty confused where and how the JS code is saved on the ESP without being newly flashed...
But apparently, I'm far from getting it to work, because I cannot connect to my ESP after flashing.
What I did:
I tried with ESP-01 and ESP-12E. First, I erased the flash of both, then I flashed it as described here: http://www.espruino.com/ESP8266_Flashing. After that, it says, I should be able to connect to via screen (ran on Ubuntu with sudo screen actually) to the ESP. I tried "sudo screen /dev/ttyUSB0 115200" and also with baud rates 57600 and 9600.
I started out with the ESP-12E which I've never used before, but switched to the ESP-01, which I used few times already, so that I could make sure being in the correct mode.
But the results are the same: On the console in screen I only see gibberish when I restart the ESP. It's kinda as if the baud is wrong or as if it's in boot mode again (what I can exclude with the ESP-01 though). And neither I can type in anything...PS: I tried flashing both sizes, 4M and 32M
I'm sorry if this is a very basic problem, but I really tried to find an answer but yeah... no success...
Thanks in advance
TimoEDIT:
OK, played a bit with the baud rates and suddenly got this message on baud 74880...
Someone who can explain to me what I'm doing wrong here? :Dets Jan 8 2013,rst cause:2, boot mode:(3,7) 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 user1 @ 1000 error magic! backup boot failed. user code done
Ok thank you, will try that :)