darkmode

EpochTV
easyEDA

github.com
bvbc

github.com
EpochTV
EpochTV
Bluetooth
PlumPot
epochtv

Namecheap.com

Stats Box - on


robotic.icu: Using the esp8266 on Raspberry pi
Posted in: News | by developer27 | 2018 Nov 28
esp8266 cp2102
I recently bought a esp8266 on ebay with the hopes of opening new frontiers in the relm of WiFi controlled devices. 

The problem came when I tried to upload code from the computers I had access to at the time. 

I had a hodge podge of computers and operating systems, from: Android, Mac os 10.4.11, Windows 8 on a laptop with broken screen, and a Raspberry pi on VNC half the time and a 5 foot screen that I could use after church on Sundays. 

The only computer that could use the esp8266 right out of the box was the windows 8 unit, but it died on me after the second upload, due to other reasons. 

The 2 computers that I use most of the time were the Android and pi. Neither of which liked the ch340g uart (USB to serial chip) on the breakout board. The Android refused the USB connection and the pi froze every time I tried to upload the sketch. (The pi freeze up occurs due to processor going to 100% duty during compile.)

The pi had to be rebooted every time I tried to upload a sketch. I had no trouble uploading to an Arduino with an FTDI chip, so that ch340g was prime suspect number one! 

Since then, I bought a Arduino NANO with FTDI, and it worked like a charm! So, my next move was seeing if I could get a esp8266 with a different uart. The only other version was the cp2102 uart. 

At first I couldn't get it to work on the pi either. But within a week or so, I had a few successful uploads at home, but not when I was out Sunday! I was extremely puzzled why I could upload at home, but not away... 

Then it dawned on me what I was doing different. At home I had everything connected to the pi through a USB hub. Then maybe a few days later, I tried connecting the ch340g esp8266 to the USB hub and it worked too! I was amazed that it finally worked! 

I'm still having trouble with a few freeze ups now and then during uploads, but I am able to get it to work with the USB hubs that I have. 

Using the terminal on the pi, enter this command: lsusb
That's LSUSB in lowercase. 

Look for what is different when the hub is plugged in. The uart in the USB hubs I have are made by Texas Instruments. 

I hope this helps! 

ps: if you are looking for a breadboard friendly version of the esp8266, get the one with the cp2102 uart. It is 0.2 inches narrower than the ch340g version. I also like the cp2102 version because it has a 2nd LED.
News

All Rights Reserved. All Images and Programming are Copyright 2024 by Robotic.icu. Site Map