Posts

Showing posts from February, 2020

ESP8266 connection to MQTT server (Attempting MQTT connection...failed, rc=-2)

Recently I had a problem when trying to program NodeMCU with Arduino. I flashed arduino with basically default pubsubclient test program. After programming NodeMCU connected successfully to Wifi, then tried to connect MQTT server and failed: WiFi connected Attempting MQTT connection...connected ............Attempting MQTT connection...connected ............Attempting MQTT connection...failed, rc=-2 try again in 5 seconds I researched and tested many Arduino scripts. All failed with the same error -2. I logged into the MQTT server and watched logs. The NodeMCU didn't even connect to the MQTT server. I was clueless. Luckily I bought a few NodeMCUs from different sellers. Opened up another NodeMCU and hooked it up. Flashed the exact same code to it and it connected and worked like charm. Then I tried to flash the first problematic NodeMCU with Arduino and exactly the same error -2. I had also a ESP12E that had the -2 error before. Flashed it with the same code, still error -2.

Making PCBs with 3D printer

Image
I always wanted to make PCBs at home. I have tried most of the processes from the internet to make PCB-s (by hand with marker, with printer and glossy paper, ....). Recently I got 3D printer and thought that the precision should be enough to make simple PCBs with it. So I searched from internet and found this page: http://www.lamja.com/?p=635 I had some old rod from an old printer from scrap. Next I designed a rod holder that would fit the printer. The printer is modified Ender 3 and has new cooling. So the rod holder had to be designed from scratch. I found some usable size spring that I made a bit bigger. I tried the process with marker and it worked but the result was not very good. So I had a idea to use nail polish and scrape that off with the rod. I used some random old nail polish. This resulted much better PCB board than the marker. Other parts of the process are the same as the link above. I had some trouble to get the *.svg file to FlatCam, because FlatCam