Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : New toy - Lolin V3 Node MCU with ESP8266 BASIC
Page 1 of 2 | |||||
Author | Message | ||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6760 |
A rather nice little combination. I'm still exploring it. These boards are remarkably cheap for a wi-fi enabled board. This is the version with the CH340 and cost £1.40 before tax etc. Something I hadn't thought of - the pin spacing is 1.1" so it's not much good on a single standard breadboard as the pins are in the outer holes! However, I can live with that for the moment. Worth bearing in mind though, it isn't pin compatible with the official version. Once the wi-fi is set up everything is done from a web browser. There is a variables dump page, a file manager, editor and a "real-time" debugger where you can watch your code running (much slower than actual speed, but you have some control over it and you don't really want to see full speed operation!). It's not a Pico beater by any means, but the combination of wi-fi and a few GPIO pins (including 1 ADC and 4 PWM) makes me think it might be useful for little jobs. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6760 |
Don't be fooled by these things! They have nowhere near the amount of *usable* GPIO that you think. This is using a ESP-12E based node MCU. These are £1.41 +VAT on AE, so bear that silly price in mind. :) For comparison the Pico W is about £5 +VAT, so you can get 3.5 node MCUs for the same price. :) I'm implementing my aquarium controller on the node mcu, and building it on breadboard as I go along because the GPIO can be confusing. I2C is always bitbanged, as is PWM. One SPI port is available, the other is also used to connect to the flash. Two pins on that *look* usable but you are warned that it might be a bad idea to try. One pin can only be a digital on/off input, nothing else. Four pins are high at boot - if you drive relays from them they will click. Two pins will cause boot to fail if they are low at boot time. One pin can only be an output One pin can only be an input Through careful arrangement, and changing the RGB LED on the panel for a WS I think I've managed more or less the same functionality. The temperature sensor has to be analogue though (The one ADC pin can't be used as anything else). That's 9 digital and one analogue. The Pico is so much nicer in many ways. If I'd only had the wi-fi on the Pico W working as reliably as this does I'd have been fine. Using it for web-based control was a nightmare - and so much more difficult and complicated to do than on this. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 194 |
Look at the ESPEasy project for these modules ESP8266 & ESP32 . It is very easy to make a network of home automation and telemetry nodes. https://github.com/letscontrolit/ESPEasy https://espeasy.readthedocs.io/en/latest/ letscontrolit.com/forum/ |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6760 |
I was just looking for something to give me a cheap way round the expensive aquarium controllers. The node MCU looked ok, and cheap enough to play with. That project started with a Pico W but it proved to be too unreliable. At the moment it has no wi-fi because it has a cheap Chinese Pico clone in it! Thanks for the links. I have a ESP32 of some sort in a drawer (I have had it working!) so I'll have a look at ESPEasy at some point. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9084 |
You should find the latest versions of the webmite firmware are now completely reliable (if the Basic code is correct). I've had Geoff's watering controller software which used to crash a couple of times a day now running for over 2 weeks with no failures Edited 2024-10-13 19:29 by matherp |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6760 |
Thanks, Peter. I'll give it another try. No guarantees about my programming though. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Quazee137 Guru Joined: 07/08/2016 Location: United StatesPosts: 567 |
Mixtel90 If your driving a 4 relay module that uses opt-couplers give this a try use cap as a delay I have use power modules that had an enable that used RC delay to power the 4 relays. I have a board layout and code. When I can get the computer its on I'll post. Quazee137 |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6760 |
Thanks. :) That project is on the back burner again at the moment. I'm tweaking PCBs again. :) I'd probably try the Webmite again rather than create yet another PCB for the node MCU. The one thing is, though, that I really should look at the way I'm driving the tank lighting. I have some low Vgs mosfets coming so I'm intending to try those. I'm using a ULN2003A at the moment and it's not as good as I'd like. Too much volt drop. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4213 |
Hi Mick, Not sure you what you are using on the nodeMCU, but today I tried AnnexRDS again, and it works nice. Had some problems finding out how it worked. Biggest problem was to integrate it into my home network. The guest account was not encrypted, no password, and Annex refused to work nicely with my browser on that account (it got an IP address correctly). When I used the WPA2 encrytped normal account is was fine. I tried the build in editor, and each time I would go to the output window it would resize back to default (I made the window bigger, and choose a different font). The editor is nice, but I am spoiled with better now adays. Nice that you can simply copy to PC and back. Annoying that you have to stop RUN in the editor before you can start RUN in the output window (took some time before I figured that out). But now I know... Anyway, for your fish tank controller AnnexRDS may work. I think the biggest hurdle is not AnnexRDS or basic, but the html stuff. And that is near identical in both cases. Although under water the approach between Annex and WebMite is different. In WebMite you run a basic program and the html is not in the driver seat. From what I saw in Annex (code examples) the basic is executed slave to the html. I hope I have that right, but it does not matter really. As long as it works. Volhout Edited 2024-10-20 00:25 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
When you resize the windows in Annex (after clicking in the log pane and then clicking Ctrl+Shift+F2), when you have things sized as you like, you can click Ctrl+Shift+F3 to save the configuration. (Not sure about font changes, though.) This is my preferred layout: You can write a program in Annex which is "procedural" (like MMBasic), but you get its full power by using its "event-driven" features (which are sort of as if things happen in several SETTICK events). After your initial setup, you issue a WAIT (which is like an endless empty DO: LOOP). Then code is run when external things happen, like OnHtmlChange, OnHtmlReload, OnEspNowMsg, OnUDP, Timer0, Timer1, OnSerial, onSerial2, OnMQTT. So if your program is driven by external events, all of your code executes as a result of some event having been triggered (which can be a timer event, so you can do certain things on a regular basis). ~ Edited 2024-10-20 01:18 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
hhtg1968 Senior Member Joined: 25/05/2023 Location: GermanyPosts: 123 |
@ Peter: Which is the latest version? On Geoff´s site you can download 5.08.00. Or is there a newer version in this forum? |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9084 |
6.00.00RC9 from the thread of the same name |
||||
atmega8 Guru Joined: 19/11/2013 Location: GermanyPosts: 722 |
If your driving a 4 relay module that uses opt-couplers give this a try use cap as a delay I have use power modules that had an enable that used RC delay to power the 4 relays. I have a board layout and code. When I can get the computer its on I'll post. Quazee137 But you will also have this delay when powering off And it may kill the led?! Edited 2024-10-20 19:37 by atmega8 |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6760 |
I'm probably not going to bother with the node MCU, although the relay problem doesn't occur. There are two outputs that can be used that don't have the problem and I can use one for the CO2 solenoid and the other for the spare relay output (originally designated for the air pump). Turn on flashes on the others merely flash the tank lights momentarily which, although it may startle the fish, causes no issues. It's rarely going to happen anyway. When I get back to it I'll put the Webmite back and try that again. In the meantime I'm considering a little PCB that will plug into the ULN socket, with these little mosfets on it. The loss of the internal flywheel diodes is unimportant in this instance. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4213 |
When you resize the windows in Annex (after clicking in the log pane and then clicking Ctrl+Shift+F2), when you have things sized as you like, you can click Ctrl+Shift+F3 to save the configuration. (Not sure about font changes, though.) This is my preferred layout: You can write a program in Annex which is "procedural" (like MMBasic), but you get its full power by using its "event-driven" features (which are sort of as if things happen in several SETTICK events). After your initial setup, you issue a WAIT (which is like an endless empty DO: LOOP). Then code is run when external things happen, like OnHtmlChange, OnHtmlReload, OnEspNowMsg, OnUDP, Timer0, Timer1, OnSerial, onSerial2, OnMQTT. So if your program is driven by external events, all of your code executes as a result of some event having been triggered (which can be a timer event, so you can do certain things on a regular basis). ~ Hi Lizby, I tried your suggestion (Ctrl_Shft_F2 and F3) while focus(mouse click) in log plane. For me it does not work. Running on Node-MCU (ESP8266-12). Or is this browser dependent ? Annex 1.50 Tried Opera and Brave browsers. Volhout Edited 2024-11-04 05:41 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
Ctrl_Shft_F2 and F3 work for me in Brave to reposition and save the panes in the editor window with an ESP32 (under Windows). I am usually using Chrome. Opera does not connect to the device for me at all. I doubt this works on the ESP8266. There has been no new development there for several years (except for a few minor tweaks). The editor resizing is within the past year, if I recollect correctly. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
JanVolk Senior Member Joined: 28/01/2023 Location: NetherlandsPosts: 143 |
Harm, The screen Lizby shows is for an ESP32, ESP32-C3, ESP32-S2, ESP32-S3 with Version 1.53.4 and higher, the Ctrl+Shift has been added and the latest version is 1.70.1. This is in the (?) help. These keys are always active - CTRL+SHIFT+F1 - Set vertical layout - CTRL+SHIFT+F2 - Set horizontal layout - CTRL+SHIFT+F3 - Save layout - CTRL+SHIFT+F4 - Load layout - CTRL+SHIFT+F5 - Reset layout There is a "visual" flash of the screen when these keys are used. Updated keyboard shortcuts for Editor (?) The ESP8266 or ESP01 has less RAM memory, which is why cicciocb stopped at version 1.50, which will probably be the last version. This version does not include all the nice things like saving the editor screen and dark mode and sub and basic programs etc. The ESP32-C3 is the successor to the ESP8266 and the ESP32-C3 super mini is very cheap on AliExpress, but there is also an ESP32-S3 super mini. In the editor there is a row of buttons and a blue question mark (?) containing the options. Unfortunately, with version 1.50, these Ctrl+Shift commands are not in the help and you have to adjust them each time in the editor. The online flash only works in Chrome. Jan. |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4213 |
Hoi Jan, Thanks for the fast answer. I was planning on using the NodeMCU for a mall project. But the development of that project would be tedious in this editor (constant scrolling, especially since basic only allows 1 command per line). Unless there is some configuration I can change to set the vertical edit screen to 30 lines or so. I'll find another solution (Buy an ESP32, or use WebMite). Volhout PicomiteVGA PETSCII ROBOTS |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
I'd certainly recommend buying an ESP32 (or 4 for free shipping), especially the ESP32 C3SuperMini : I did by one batch which didn't include the PSRAM, which made it unusable, but have bought several times from the seller linked above (Tenstar) and they've been good. (Note: in most cases with Annex Basic on the ESP32, you can have more than one command on a line. There are exceptions, but I haven't pinned them down. For commands entered in the "Immediate" pane, only one command per line is allowed, so you cannot perform DO or FOR structures there.) ~ Edited 2024-11-04 22:08 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6760 |
I'd suggest you check just how many of the GPIO pins are usable for your project before buying. The ESP boards tend to have pins reserved or that can only be used in one direction. Nowhere near as GPIO-friendly as a Pico. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Page 1 of 2 |
Print this page |