- Wed Apr 17, 2019 3:28 am
#81848
Yes. GPIO needs to be 3.3V compatible. Options are
Use 3.3V sensors. Many are now available in 3.3V
Use resistor dividers for inputs.
Use level shifters or mosfet/bipolar drivers for outputs
GPIO work well with MOSFETS (I use them in preference to bipolar), but they need to be low threshold devices which turn on well with 3.3V drive. I tend to use AO3400 / AO3401 (n/p). These turn on really well, can handle decent currents with low Rds resistance and are very cheap.
Using Arduino does consume quite a bit of flash but once there the app code does not grow very fast on top of that. Maximum program size is 1MB. Typical fairly complex sketch with a few libraries will run around 400K assuming you don't have huge amounts of data tables etc. Modules normally have 4MB flash which you can split between Program and SPIFFS. Typical splits will be 1M program 3 M SPiffs or 2M program 2M Spiffs. Latter one is useful if your program goes above 500K and you want to do OTA (over the air) reprogramming as program memory must be able to accommodate 2 copies for OTA.
Standard GPIO is 9. You can steal 2 more by re-using the pins normally used for serial. Beyond that you are looking at port expanders using i2c. If some of your sensors use i2c then they can share the pins.
In a small enclosure then using the base module ESP-12F could also be an option. You can use the NodeMCU for easy development but then deploy on the ESP-12 for the rocket. There is no difference in the code. The Node just makes it easier to plug into a USB port for development. If you use OTA then firmware in an ESP-12 can be updated easily.
If you are using Arduino already then porting should be pretty straightforward as many libraries are compatible or available in ESP8266 form.
The other main concern is whether you are using special hardware functions on the other MCU like analogue inputs or specific timer hardware capabilities.