In previous post we learned how to install MicroPython to ESP8266. In this we go trough the process with ESP32. So lets install Micropython to ESP32.
You probably know what ESP8266 is and also have heard about Python high level programming language. But did you know there is a special lean and efficient implementation of Python3 that runs on freaking microcontrollers. I know right this is amazing. Now its not full fledged Python3 with all the bells and whistles but its enough to comfortably use Python on MCU-s. Now MicroPython runs within 256k of code space and 16k of RAM. And in this tutorial I will show you how to setup your ESP8266 to run MicroPython.
Every cool project needs display. So today we going to look how to set up 2.4 TFT LCD display on arduino. Full sketch and library downloads included.
ADXL345 will give your projects ability to sense the static acceleration of gravity in tilt-sensing applications plus dynamic acceleration resulting from motion or shock. High resolution of 4mg/LSB gives ability yo measure inclination changes less than 1.0 degrees. Lets look the main Features:
Arduino has ADC ( Analog digital converter) and PWM (Pulse with modulation) but if you need true Analog out, you are out of luck. But all is not lost. We can add the analog capability to Arduino with MCP4725 12-Bit Digital to Analog converter. This nifty chip has also on board EEPROM so you can save your last value in case of power failure. This chip has also 3.4Mbps Fast Mode I2C (Unfortunately Arduino does not support that speed), with Arduino you can update the output at around 200KHz. So lets jump in…
So why Nginx and MariaDB ?
Nginx will replace our Apache server. But why ? Short answer is performance. Bit longer answer is that Nginx is Asynchronous server which means it can perform several actions at the same time, without waiting previous to end. Nginx responds faster and consumes less RAM then Apache and this is my main reason for switching to Nginx. There are of course differences. Nginx doesn’t support .htaccess files and sometimes the are differences how Nginx handles PHP.
And MariaDB is drop in replacement to MySQL. MySQL was brought by oracle some time ago and since then the MySQL has problems with including community in development process and distrust from community for having competing products, open source MySQL and proprietary OracleDB. So the original developer of MySQL created a new projects MariaDB and it is fully open source, has strong community and is being actively developed.
Most of the currently available solutions for sending a simple email with arduino are bit complicated for my taste. Like knowing your SMTP server ip and the converting your password and username to bas64 like whaaat no way, ain’t nobody got time for that.
So here is a solution, BUT there are couple of small BUT-s you have to have access to some kind of web hosting solution. (There are plenty of free hosting solutions out there, like googling + registration = 3 min. I tested 😉 ). And the hosting solution has to have smtp enabled on php or supported (I didn’t find any that didn’t work). And I will show you how to check that.
We will use: Arduino Uno and WizNet W5100 ethernet shield.
Recently I was in front of a pickle. Like many of us I wished a log about my system drive reads and writes or IO operations.
For Linux there are some good tools for overall and in depth monitoring of your system (like iotop, vnstat, etc…) but I wanted something small and simple.
So I decided to write my own. (Full code @ the end of the post)
© 2018 JakeMakes