Powered by Invision Power Board


Forum Rules Forum Rules (Please read before posting)
Pages:123 ( Go to first unread post ) Reply to this topicStart new topicStart Poll

> Going Nuts With Arduinos Part I, My little rant thread with pictures...
JoOngle
Posted: December 24, 2015 04:56 am
Reply to this postQuote Post


Forum Addict ++
Group Icon

Group: Moderators
Posts: 9,591
Member No.: 3,818
Joined: December 12, 2005




Ok, I'm going to spare the General section for this stuff as it might not be everyone’s flavour, besides this stuff belongs in the Digital Embedded designs section anyway, so here we go:

Ever since I discovered the Arduino Nano, I've been sort of hooked, it wasn't long ago as you know, roughly 2 months? Never tried Arduinos before and didn't have much interest in it, but OH BOY did my interest get sparked again after trying one out just for shitz'n'giggles rolleyes.gif I must have ordered 25+ Arduinos and compatible from ebay the last month, feverishly walking in circles waiting for the mailman to deliver some new ones so I can expand my projects - because stuff is happening FAST here now. The wonders of having floating numbers and easy coding available plus a gazillion sensors & external units just to play with is nothing short of addictive to say the least.

Here's something I've been throwing together the last few days:

user posted image

Some explanations to the image above, the lower breadboard with the LCD display is my DIY weather station...always wanted to make one from scratch, it's so addictive and really not rocket science, it uses a Barometric sensor, DT11 Humidity sensor and while also having an Temperature sensor I prefer the Barometrics own temp sensor as it's much more accurate. The Barometer is insanely accurate, it matched my high end commercial unit SPOT ON and got it right on the first try.

The upper breadboard has no "Arduino" on it, but it got an ESP8266-12E which is sort of an devboard on its own, it's got (AFAIK) an 80 MHz microcontroller, a complete WIFI unit with TCP/IP, it's a bit sensitive on the 3.3v feed so I had to use a special CH340/3.3v USB to Serial device (and I'm running on Linux) so messing around with Serial Ports via USB on Linux has been an experience in its own right (aka it took me a few days to understand that the hardware needs permissions not only to dialout but various rules and buses, it's actually quite easy WHEN you have the information, but if you don't know anything about it...then it can be frustrating and take days if not week to finally understand, especially those units that doesn't come with an CH340 USB to Serial unit (aka the little Digispark Kickstarter that has an entirely different way to communicate with the USB port, nevertheless I got even that unit working under Linux so it's all good). tongue.gif

The ESP8266-12E unit is marvellous, albeit it has caused me some grief here and there, especially since it's very power hungry, this isn't something you just connect to your USB port or even to the 3.3v power of the USB to Serial converter or EVEN to some Arduinos as they simply can't deliver the 300mA this unit can suck up, sometimes it can even SPIKE draw higher currents so the PSU should be capable of 3.3v 500mA at least to stop it from failing or complaining when you're asking too much of it. (Hence the homemade 3.3v regulator setup you see in the image on the breadboard), I used some schematics off the net with an LM317 Regulator since I don't have 3.3V regulators that can provide that much power (I had a bunch of TPS 76433 150mA 3.3V regulators in SMD packaging...making it painfully obvious at my age I'm getting to be blind as a freaking BAT and the fact that I actually hit the pins was pure luck...aka hit'n'miss) but even though it worked, it simply wasn't delivering enough power.

The LM317 was no walk in the park either, as the seemingly innocent and easy setup of this thing caused all kinds of technical grief I'm not gonna list in detail here, but it involved everything from changing their lousy design to what supply I had for it, and loads of caps...

Well, it was an amazing experience to see how easy it was to get online, it connected to my WAP2 router as if it was nothing to it at all, in fact much easier than ANY of my other WIFI enabled commercial units that would basically complain if you fart in the wrong wind direction, this baby just connected to it straight away, and not many seconds later I was connected to google via the serial monitor:

user posted image

Got an error message, but at least it was FROM Google and not the unit itself, so the connection works just fine. It can even act as a web server and I can log onto it as well.

One of the things that really pleases me with this stuff, is how easily reachable every task I want to do is...

...things in the past with older microcontrollers and hopelessly outdated IDEs was that whenever I wanted to do something interesting, like checking out some useful libraries on the net so I didn't have to reinvent the wheel everytime I needed a function...I always struggled for ages with silly compile issues or incompatible code, or resource issues, or MCU addressing issues...even simple things like simple math stuff became a PAIN and simply took out the AIR of the projects.

With this stuff right here, I've gotten more MCU projects off from IDEA to ACTUAL working product in less than weeks, and more than I've done with the other things for years in less than a month, this brings back the fun and WHY I like to mess around with things like this.

For example, I've been itching to make a practical ALARM system for my home, I hate those wires, so I'm going to set up a reed/magnet triggered MCU system where each door has its own MCU and doesn't even have to be in standby as the REED gives it power from the battery when the door is opened, and there's an RF 2.4 GHz tranceiver unit on it immediately communicating with the main unit, now easily interfaced with the ESP8266-12E, it's a walk in the park to set up a remote watch system so I can see how things are going on in my house, even silly little things like monitoring the power of the house (watching out for brownouts etc.) Taking pictures and sending them via HTTP etc, it seemed so complex, but it really isn't.



--------------------
If my soul was software, I could program myself and you.
PMEmail Poster
Top
kellys_eye
Posted: December 24, 2015 10:22 am
Reply to this postQuote Post


Forum Addict ++
*******

Group: Spamminator Taskforce
Posts: 11,418
Member No.: 2,735
Joined: June 21, 2005




Interesting and informative - enough so that I'd like to experiment with the stuff myself but, as usual, it would only go to my to-do list as the string of unfinished/nearly-there items has built over the last year and I need this holiday to get at least some of them finished!

Maybe next year laugh.gif

Have a great Christmas Tommy.



--------------------
May contain nuts
PMEmail PosterYahoo
Top
JoOngle
Posted: December 24, 2015 02:26 pm
Reply to this postQuote Post


Forum Addict ++
Group Icon

Group: Moderators
Posts: 9,591
Member No.: 3,818
Joined: December 12, 2005




See, that's exactly what I mean - you get me - with this stuff we can ACTUALLY FINISH projects. laugh.gif

And Merry Christmas to you too wink.gif


--------------------
If my soul was software, I could program myself and you.
PMEmail Poster
Top
Nothing40
Posted: December 24, 2015 08:39 pm
Reply to this postQuote Post


Forum Addict ++
*******

Group: Spamminator Taskforce
Posts: 3,767
Member No.: 181
Joined: October 05, 2002




Yes,the ESP modules can be rather power hungry. I usually give them their own dedicated LM1117(3.3V) or something,and a decent buffer cap on the 3.3V rail (couple hundred uF or so),after that,and I've had no problems running them from USB ports,and whatnot.

And you're right..the 3.3V output of USB/serial adapters,or the Arduino boards can't supply enough current for these. That's why I give it it's own regulator,and run it from the 5V rail.

The -12,and -07 (and any others with the metal can/power amp) draw about 100ma more than the smaller modules,because they have the RF power amp for the wifi.
The small ones can peak up to about 250ma,and the larger ones can peak at about 350ma.

I forget the exact figures,but I think I measured the small -01 modules at about 75ma,idle,with no wifi connection/clients. (IIRC,that was at the 160mhz clock speed,it only dropped a couple ma at 80Mhz.) The larger current peaks are typically when the wifi is active (transmitting.)
(Ohh,the ESP8266's wifi can be configured as a Wifi Client,Access Point,or Both.)

The DHT-11 sensors,IME,don't seem terribly accurate,and seem slow to respond (and to read from,IIRC they need a few seconds between readings)..along with not having great resolution.. But for general stuff,they're okay. I have yet to play with the DHT-22,it's supposed to be an upgraded version.
If you want a more precise temp measurement,try the Dallas DS18B20 one-wire sensors. They're pretty neat,and not too hard to use. (there are one-wire libraries for the Arduino,ESP,MSP430,etc.)


QUOTE
With this stuff right here, I've gotten more MCU projects off from IDEA to ACTUAL working product in less than weeks, and more than I've done with the other things for years in less than a month, this brings back the fun and WHY I like to mess around with things like this.


^^THIS.


I have a similar 'info station' thing that I built around an Arduino Mega 2650. It monitors the voltage and current in/out of my 12V setup,and indoor/outdoor temps (DS18B20's) and some other random stuff. It even has an ethernet interface,with it's own little webpage where I can see all the stats,and control some I/O pins via some HTTP links.
Before I figured out this Arduino stuff,there's no way I could have got that all working by myself,especially not in just a couple days.
Now when I have an idea,it's just a matter of digging up some parts,and whipping up some code using the plethora of examples out on the web,and I can have it working in mere minutes!

It can be rather addictive,and exciting!
Want to add a remote control to your old appliance or whatever? Connect some GPIO pins to the front panel buttons,and fire up a webserver/AP on the ESP8266. Instant web interface/control for...anything! Wh00t! thumbsup.gif


--------------------
"we need an e-kick-in-the-nuts button" -Colt45
PMUsers WebsiteYahoo
Top
JoOngle
Posted: December 24, 2015 11:09 pm
Reply to this postQuote Post


Forum Addict ++
Group Icon

Group: Moderators
Posts: 9,591
Member No.: 3,818
Joined: December 12, 2005




I've got a couple of MEGA 2560 R3 on its way too, plus a Shield for it with tons of breakout points.

Also picked up a couple of STM34F103C8T6 ARM minimum System (kinda like an 32 Bit Nano), fits right on the breadboard.

And will be testing ESP 12F, ESP-13 and the new mysterious ESP-14 8266 module for fun.
Even ordered a bunch of FM Stereo RDS modules, they were less than a buck each, and can
receive RDS messages from the radio...plus support a wide FM reception range too, kinda excited about making a high quality radio with this as well.

One of the 6DOF sensor I bought came with Export restrictions, it let me purchase it - but warned me of the US military for some weird reason, I have NO clue what that was all about. shock.gif wacko.gif


--------------------
If my soul was software, I could program myself and you.
PMEmail Poster
Top
JoOngle
Posted: December 25, 2015 01:51 am
Reply to this postQuote Post


Forum Addict ++
Group Icon

Group: Moderators
Posts: 9,591
Member No.: 3,818
Joined: December 12, 2005




Problem: ESP8266-12E

I'm not really aware how to install Sketches on the ESP8266...

Do I need to flash its firmware/bootloader?

I've tried to use 1.6.6 and the latest 1.6.7 with the ESP8266 board installed, but I get all kinds of failures. I've tried to ground pin 0 to GND as I'm supposed to, no workie...

I've been Googling for hours, maybe too tired, will try tomorrow.


--------------------
If my soul was software, I could program myself and you.
PMEmail Poster
Top
Nothing40
Posted: December 25, 2015 07:06 pm
Reply to this postQuote Post


Forum Addict ++
*******

Group: Spamminator Taskforce
Posts: 3,767
Member No.: 181
Joined: October 05, 2002




Is it the bare module,or did it come with a little breakout 'daughter board'?

The little breakout daughter boards usually have a pull-up resistor for the enable pin (CH_EN,I think it's called),and GPIO 0,and then a pull-down on GPIO 15.
So the breakout kind of takes care of those pins,for you.

You may need to play with GPIO 2 also. IIRC it needs to be HIGH,on boot up. I've honestly never really bothered,as it seems to be pulled-up internally?
You may need to be mindful of this,if you have peripheral circuitry connected to GPIO 2,that might hold the pin LOW during boot.
(I think I've had issues with particular Green LED's holding the pin just low enough to cause issues. Replacing the LED with a different color,with a higher Vfwd fixed it.)

GPIO 15 selects the boot flash,IIRC. HIGH=external flash/SD card, and LOW=internal flash. Internal is what you want,for now.
Not all modules have GPIO 15,or external flash connections(*),so that's a moot point,on say,the ESP8266-01 modules.

(*)I think that row of extra pins along the 'bottom' of the -12E is for connecting an external boot flash/SD card,AFAIK. -not 100% sure,haven't played with this yet. There wasn't really any documentation on those pins,the last time I looked.


Hmm,okay.. I'm using IDE 1.6.5,and the "board" file package from here:
https://learn.adafruit.com/adafruit-huzzah-...ing-arduino-ide

So,the way I usually do it,using the daughter board/breakout,is to:
-Power it up (3.3V,from a stable supply!)
-Pull GPIO 0 LOW
-Hit reset it,while holding GPIO 0 LOW.
-When it reboots,and sees GPIO 0 LOW,it will start up in 'bootloader' mode. You can then un-ground GPIO 0.
-After that it's just a matter of clicking the upload button in the IDE (after making sure you've selected the right board/chip/COM port,etc.)

This should work on all the modules -01 to -12(E),at least it has for me.
I have a little breakout I made,with a Button on the GPIO 0 pin,and another on the Reset pin,along with a Pull-up on the enable pin (CH_EN),and a 3.3V regulator. I hold the GPIO 0 button down,while hitting Reset. Boots right up into 'bootloader' mode.

I've found A LOT of conflicting information online about this,and most of it is just plain incorrect,IME. (some say you need to tie ALL the pins high,including the GPIO pins,and other crazy things. It's all baloney IME.)

I have had one issue with a module once,where it appeared to be 'dead'...I couldn't program it,or get it to respond,or anything. I re-flashed it back to the NodeMCU firmware (using 'NodeMCU Flasher' and 'NodeMCU Firmware'),and then it was working fine,with that. I then re-uploaded my sketch from the Arduino IDE,and it's been working fine since. Maybe the contents of the Flash chip got scrambled somehow. *shrug*

One thing I'll throw out there.. If you want to fiddle with re-flashing different firmware,NodeMCU and LUA code,and all of that,I'd suggest watching a series of videos from Julian Ilett on Youtube. I found the 4-5 videos he has on the ESP8266 very useful in the beginning,to get me started. (I've been mostly using them with the Arduino IDE/code though.)
Here's a link to the first vid in his series- https://youtu.be/VvIoBFLj2Xo

Another thing I'll mention.. They claim that the serial port is 3.3V only...But I've actually not had any problems with using 5V signaling on the serial pins. Working fine on 20+ modules at this point. I guess I like to live dangerously. smile.gif
(I'm not sure how tolerant the rest of the GPIO pins are of 5V levels though. -Also,be careful with the ADC pin input. IIRC,it's range is like 0-1.1V Found that out the hard way. Oops.)

Ohh,also.. Some modules have some labels on the pins reversed. IIRC GPIO 4 and GPIO 5 are swapped on the silkscreen,on some older -12 modules (they have corrected it on newer ones.) Doesn't affect bootloading,etc in any way..but if you decide to start playing with I2C,the Arduino code defaults to pins 4+5 for I2C SCl/SDA...and if the labels are backwards,you might go crazy for a short while wondering why your I2C stuff doesn't work. (That's another thing about these modules that I learned the hard way.)

These ESP8266 modules do have a few quirks,but once you get those figured out,they're actually pretty neat little things,especially for a couple of bucks.

Hopefully that will get you started in the right direction? If you have any questions,just ask. I've been fiddling with these things for fun,and for work,for several months now.
I've managed to get them mostly figured out,and all the 'usual' stuff working on them,Temp sensors,RTC,SD-card,ADC's,Wifi Stuff,Web servers,Telnet server,etc,etc..

I see in the newer Board Manager package,there are some examples of MESH networking stuff..That might be next on my "Stuff to tinker with" list. smile.gif

Happy Ho-Ho's! beer.gif


--------------------
"we need an e-kick-in-the-nuts button" -Colt45
PMUsers WebsiteYahoo
Top
JoOngle
Posted: December 28, 2015 10:51 am
Reply to this postQuote Post


Forum Addict ++
Group Icon

Group: Moderators
Posts: 9,591
Member No.: 3,818
Joined: December 12, 2005




@Nothing40,

Lots of interesting information there, thanks! smile.gif Subscribed to that Julian guy too, interesting bloke.

@All,

I've just received the MEGA 2560 today and I must say I'm pleasantly surprised. I love the many I/O ports (almost feel spoiled) but there's another thing that strikes me as these units comes in by the numbers to me now...the price point vs the recommended official models.

Reading eagerly at the original models forums - people eagerly supporting the originals (as they should I assume) but I think somewhat too eager at some time as these are all open and legally free to copy AFAIK. The Chinese are really IMHO doing a bang up job of manufacturing these units, I've yet to receive a faulty unit (knock on wood) - And I'm seriously testing them to the brink of their capacity, I ran out of I/O ports just the other day with the Big Screen connected to the UNO R3, but I couldn't find any flaws, I nearly filled up the memory - still no flaws. And the Nano is running like a dream no matter what I throw at them.

And I've not been kind on the units, they've been brushing up against metal and components all the time, and tons of "Whoopsies", and I've been touching the units loads of times without as much as even ruining ONE port so far.

They also complain about all the different ports they use for USB conversations with the Serial, some use the CH340/341, some use an Atmega168, others use the Atmega 16/U...honestly - they've all worked right out of the box on Linux for me so far (except the DigiSpark Digistump Kickstarter, which required some knowledge into permissions about native USB support, but eventually got that working too).

The only shoddy soldering I've seen, is that if some of them come pre-mounted with those breadboard pins...they do require a little re-soldering because it's probably done AFTER factory production by someone who doesn't have the proper knowledge, I realise that the Chinese are battling like mad on eBay to sell these. Lets face it...many of these Arduino resellers on eBay are mainly selling perfumes and ladies accessories rolleyes.gif and probably doesn't know the first thing about this stuff - but sell them as they are guaranteed to sell quickly.

Still doesn't justify the price difference in the various stores that sell the so called "original" models. I mean...c'mon...the Mega sells for 544 to 68$, and you can grab a PERFECTLY working version on eBay from 7 to 12$ shipping and cable included. No fancy box though.

Same with the rebranded nanos (that seems to have the name micro? originally), the "micro" sells for 20-30$ and on eBay as nano for 2$ incl. shipping. Just as pretty as the original model, works a treat no matter what I throw after them.

I think I'm going to dedicate one of the electronics shows to the various arduino clones when they all have arrived and I've done heaps of presentable projects to show off. tongue.gif


--------------------
If my soul was software, I could program myself and you.
PMEmail Poster
Top
draget
Posted: December 28, 2015 05:29 pm
Reply to this postQuote Post


Forum Addict ++
*******

Group: Cleanup Taskforce
Posts: 6,321
Member No.: 1,770
Joined: December 31, 2004




At uni there was almost no question of what MCU a student was going to use: Arduino! The lecturers tended to prefer some different things...PIC or Motorolla or various ARM, but students all went Arduino.

That said, I've seen some bad Arduino jobs where people have sailed in blinded by the pretty IDE and simplicity of it all and produced things which work but fail to use any of the actual nice hardware features of the MCU. Arduino IMO also doesn't lend itself to efficient coding. That said, Tommy, you've come from assembler on the 8051 so I'm sure your Arduino code will be very nice.

I tended to always go with PICs on little boards but using a very nice C compiler (MikroC) which made them very easy to program. Sometimes I put in an ICSP header, other times I just flip the IC out for reprogramming. A couple of header pins lets me connect a USB-TTL serial cable when needed. I think my boards were probably smaller, more reliable (less pin header connections) and a bit more flexible in general. BUT the problem comes when the next student comes to deal with it...I have to lend them a programmer and it's all a little bit of a learning curve... Arduino solves that problem.

What sort of core does this ESP chip have? Not Atmel right?
PMEmail PosterUsers Website
Top
Nothing40
Posted: December 28, 2015 08:58 pm
Reply to this postQuote Post


Forum Addict ++
*******

Group: Spamminator Taskforce
Posts: 3,767
Member No.: 181
Joined: October 05, 2002




From the Wiki :"The ESP8266 is a Wi-Fi SoC integrated with a Tensilica Xtensa LX106 core"

No idea,I've never heard of Tensilica before. tongue.gif

There's a newer "ESP32" module coming out soon,that has two cores.I think they're the same core/architecture as the old ones,just a slightly newer version,maybe slightly faster,etc. They just released some press on it last week,I haven't studied it much yet.
Ah,I guess it's Dual L108 cores. Supports faster WiFi modes,and Bluetooth LE.

http://hackaday.com/2015/12/23/the-esp32-beta-units-arrive/


All of the Chinese Arduino clones I have/have used,have been perfectly fine. Sometimes the soldering on the headers and stuff is pretty iffy,but 30 seconds with a hot iron sorts that out. The USB/Serial chips all seem to work well.
However,for some reason,my desktop PC's Do Not Like the PL2303 usb/serial chips,for whatever reason. I'll plug it in,it will seem to work for like 5-60 seconds (varies) and then it's a BSOD,memory dump,and the PC reboots itself.
This happens on both of my desktop machines.
They work perfectly fine on my laptops. *shrug*

My code probably looks horrible. I'm not a code poet. My dad once looked over some of the early code,and said it didn't look too bad,so I guess it's "okay".
I do like to comment the crap out of code,just for my own sanity,so I know WTF I'm looking at,the next time I need to fiddle something. Probably the only saving grace.

I tried to figure out PIC's a while ago,but could never really get my head around it all. The 'dumbed-down' Arduino code just 'clicked' almost as soon as I looked at it. A few hours later I had rigged up an ATmega8 dev board (Thanks Marko!),loaded the Arduino Bootloader in it,and had code running!
That was an amazing breakthrough,for a non-coder,who's never really used a uC before,like myself. (I've programmed PIC's,and recreated other's projects with them,but never scratch-built/coded anything with a uC before.)
"So easy,a caveman could do it!" biggrin.gif

"Real" Coders might hate on the Arduino'ers,but I like it. Sometimes I don't want to screw around with Fuse-bits,and yadda,yadda, I just want to 'Make It Do The Thing'..and I usually can,without much fuss. smile.gif

I started to understand the "Use a uC to blink an LED" craze..It's really easy to whip up like 5 lines of code to blink an LED..I could have it coded and running,in the amount of time it would take me to dig up a 555 chip,and a socket for it. Don't even have to warm up the soldering iron.

It's been pretty awesome for developing,and testing out ideas and stuff..It can be really quick and easy. There were a few times when I went from Idea to Working Project in like..minutes. Depending on what you want to do,the example code included in the IDE is often a pretty good start. If it's not in there,rest assured someone HAS done something similar with an Arduino before,and you can find it on Google.
Then I just tweak it/build on it/add to it from there. It literally opened up a whole new world of electronic stuff I could do..or rather,have a uC do for me. biggrin.gif


--------------------
"we need an e-kick-in-the-nuts button" -Colt45
PMUsers WebsiteYahoo
Top
JoOngle
Posted: December 28, 2015 11:03 pm
Reply to this postQuote Post


Forum Addict ++
Group Icon

Group: Moderators
Posts: 9,591
Member No.: 3,818
Joined: December 12, 2005




QUOTE (Nothing40 @ December 28, 2015 08:58 pm)
"Real" Coders might hate on the Arduino'ers,but I like it. Sometimes I don't want to screw around with Fuse-bits,and yadda,yadda, I just want to 'Make It Do The Thing'..and I usually can,without much fuss. smile.gif

See, that's one of the advantages of aging. laugh.gif biggrin.gif

As a kid I wanted to be as hardcore as possible, I remember when it was Assembly or DIE, everything else was just too simple (sort of cheating), we used to bitch about compilers slowing things down while we did things effectively etc. Yes sure - effective code, but it takes FOREVER to do something actually useful unless you're a maniac (eg. uberskilled) coder.

And that's what is so wonderful about getting older - I simply JUST DON'T CARE anymore. The only thing I care about is to DO MY JOB and GET THINGS DONE and live my life the way I want it. The other people can have all the honour in the world for the best code ever - I'll cheer'em on myself! biggrin.gif thumbsup.gif I'll just nibble on a little of their code here and there and brew my own stew.

Honestly...I've never gotten this far combining micro-controllers and my old school electronics before. This actually brought back the spirit of electronics that was long lost in me. Now I'm having a ball, and very happy that I have all those components that actually constantly come in handy now that I experiment with this stuff.


--------------------
If my soul was software, I could program myself and you.
PMEmail Poster
Top
Nothing40
Posted: December 28, 2015 11:35 pm
Reply to this postQuote Post


Forum Addict ++
*******

Group: Spamminator Taskforce
Posts: 3,767
Member No.: 181
Joined: October 05, 2002




QUOTE (JoOngle @ December 28, 2015 03:03 pm)
QUOTE (Nothing40 @ December 28, 2015 08:58 pm)
"Real" Coders might hate on the Arduino'ers,but I like it. Sometimes I don't want to screw around with Fuse-bits,and yadda,yadda, I just want to 'Make It Do The Thing'..and I usually can,without much fuss.  smile.gif

See, that's one of the advantages of aging. laugh.gif biggrin.gif

As a kid I wanted to be as hardcore as possible, I remember when it was Assembly or DIE, everything else was just too simple (sort of cheating), we used to bitch about compilers slowing things down while we did things effectively etc. Yes sure - effective code, but it takes FOREVER to do something actually useful unless you're a maniac (eg. uberskilled) coder.

And that's what is so wonderful about getting older - I simply JUST DON'T CARE anymore. The only thing I care about is to DO MY JOB and GET THINGS DONE and live my life the way I want it. The other people can have all the honour in the world for the best code ever - I'll cheer'em on myself! biggrin.gif thumbsup.gif I'll just nibble on a little of their code here and there and brew my own stew.

Honestly...I've never gotten this far combining micro-controllers and my old school electronics before. This actually brought back the spirit of electronics that was long lost in me. Now I'm having a ball, and very happy that I have all those components that actually constantly come in handy now that I experiment with this stuff.

Exactly! Couldn't have said it better myself. thumbsup.gif


Also,I just saw another video pop up in my Youtube feed from this guy,and wanted to mention him,Another good source for Arduino/ESP8266 projects/info.:
https://www.youtube.com/user/hwiguna/videos


--------------------
"we need an e-kick-in-the-nuts button" -Colt45
PMUsers WebsiteYahoo
Top
JoOngle
Posted: December 28, 2015 11:46 pm
Reply to this postQuote Post


Forum Addict ++
Group Icon

Group: Moderators
Posts: 9,591
Member No.: 3,818
Joined: December 12, 2005




QUOTE (Nothing40 @ December 28, 2015 11:35 pm)
Also,I just saw another video pop up in my Youtube feed from this guy,and wanted to mention him,Another good source for Arduino/ESP8266 projects/info.:
https://www.youtube.com/user/hwiguna/videos

Wonderful guy! biggrin.gif

I especially like his: https://www.youtube.com/watch?v=EkO8IoVGBOE
Little chat module, that's a splendid idea. 1$ display, and 2$ ESP 8266 - what a world we live in! I can imagine the kids at school would find 100 secret ways to use one of those for that kind of messaging. SnapChat go home!


--------------------
If my soul was software, I could program myself and you.
PMEmail Poster
Top
Nothing40
Posted: January 03, 2016 01:02 pm
Reply to this postQuote Post


Forum Addict ++
*******

Group: Spamminator Taskforce
Posts: 3,767
Member No.: 181
Joined: October 05, 2002




Another interesting Youtube channel for ESP8266 stuff..

This video might be useful for getting your ESP8266 -12 modules going:
https://youtu.be/4tIopaejG-s

thumbsup.gif

EDIT: About 3:15 into this video he mentions that GPIO0 is actually labeled GPIO6 on his module. Maybe this is the issue you are having,JoOngle? It appears to be another silkscreen labeling issue!

EDIT2: His "CaptiveIntraWeb" aka 'Wifi Throwie" project is kind of interesting. That's what I used to learn the LUA stuff a bit. I hackified it a fair amount,and added some extra features. I never did figure out the DNS part,but I see he's posted a video about. Maybe I'll tinker with that again sometime soon. smile.gif


--------------------
"we need an e-kick-in-the-nuts button" -Colt45
PMUsers WebsiteYahoo
Top
JoOngle
Posted: January 04, 2016 07:19 am
Reply to this postQuote Post


Forum Addict ++
Group Icon

Group: Moderators
Posts: 9,591
Member No.: 3,818
Joined: December 12, 2005




Hi Pat!
Again thanks for trying to help.

I've googled endlessly about this, and it turns out I'm not alone about these woes, the videos says nothing about this so I might want to include this info in an video of mine if I get around to making them when I get by fibre cable connection here in Sweden. smile.gif

Finally got it to work after a heap of experimentation, it's all about connecting that IO0 during powerup of the unit, then release AND re-powerup the unit to get things going. And it turns out that the latest version of Arduino Sketch works just fine with ESP8266-12E, no need to revert to an older version as a lot of people seem to think. The latest AFAIK. is 1.6.7.

Right now I'm messing around with using it as a standalone web server for various purposes, works like a dream.

biggrin.gif

*Edit*

Turns out that after the FIRST programming with the Arduino Sketch IDE (first accepted upload) the ESP8266-12E now have no need for the IO0 removed, all that's needed to reprogram or reupload a sketch is just to turn the power off/on again - and just upload.



--------------------
If my soul was software, I could program myself and you.
PMEmail Poster
Top
JoOngle
Posted: January 04, 2016 02:37 pm
Reply to this postQuote Post


Forum Addict ++
Group Icon

Group: Moderators
Posts: 9,591
Member No.: 3,818
Joined: December 12, 2005




Yes...I'm ordering tons of the ESP-12E.

Guys and gals thinking of getting a MCU Arduino unit, 2 bucks a piece, you can't do better than with these. These are PEACHES! thumbsup.gif



--------------------
If my soul was software, I could program myself and you.
PMEmail Poster
Top
Nothing40
Posted: January 05, 2016 04:36 am
Reply to this postQuote Post


Forum Addict ++
*******

Group: Spamminator Taskforce
Posts: 3,767
Member No.: 181
Joined: October 05, 2002




QUOTE (JoOngle @ January 03, 2016 11:19 pm)
Hi Pat!
Again thanks for trying to help.

I've googled endlessly about this, and it turns out I'm not alone about these woes, the videos says nothing about this so I might want to include this info in an video of mine if I get around to making them when I get by fibre cable connection here in Sweden. smile.gif

Finally got it to work after a heap of experimentation, it's all about connecting that IO0 during powerup of the unit, then release AND re-powerup the unit to get things going. And it turns out that the latest version of Arduino Sketch works just fine with ESP8266-12E, no need to revert to an older version as a lot of people seem to think. The latest AFAIK. is 1.6.7.

Right now I'm messing around with using it as a standalone web server for various purposes, works like a dream.

biggrin.gif

*Edit*

Turns out that after the FIRST programming with the Arduino Sketch IDE (first accepted upload) the ESP8266-12E now have no need for the IO0 removed, all that's needed to reprogram or reupload a sketch is just to turn the power off/on again - and just upload.

Hmm,strange. Maybe something changed in the IDE,or something.

I have noticed that sometimes after the first flash of a new firmware/bootloader,they can be kinda weird on that first boot,but after that they usually work fine.


I might play with the MESH example code,and see if I can get it working on a couple modules tonight. smile.gif


--------------------
"we need an e-kick-in-the-nuts button" -Colt45
PMUsers WebsiteYahoo
Top
JoOngle
Posted: January 05, 2016 10:05 am
Reply to this postQuote Post


Forum Addict ++
Group Icon

Group: Moderators
Posts: 9,591
Member No.: 3,818
Joined: December 12, 2005




OMG m8, l@@k at the l00t that just came in the doorstep this morning:

user posted image

5 x Arduino Nano, the production examples here look nothing short of excellent, the build quality is TOP NOTCH. thumbsup.gif 2$ each! These are the CH340/41 Serial version (works straight out of the box on a Linux machine, but needs drivers under windows).

5 x HC-SR04 Distance Measuring Units. (Look at the numbers of ICs on these babies, paid roughly 1.5$ for these. I can't even purchase the two Ultrasonic mics for that price alone. The build on these boards is really impressive too.

1 x IIC/I2C/TWI/SPI Serial Interface board for LCD displays. This is a cute thing I've been wanting to mess around with, we're freeing up I/O ports by just attaching that small thing to any Hitachi compatible LCD display (AFAIK, I've yet to try this, but I've seen people using it with success on the tiny DigiSpark Kickstarter Arduino that I bought earlier).

1 x ATmega2560-16AU CH340G MEGA 2560 R3 Board. This is the CHEAPEST version of the MEGA 2560 board I could find on eBay, I just bought this for laughs really as I really have to see if it's even possible to make this giant of an I/O Arduino work at that price. I have bought a much more expensive version (you can see that one in use in the Arduino Display thread in this forum if you're curious), but I've yet to test this cheapo version.

It looks kinda suspicious, it has the same chip, but it has an CH340/41 Serial instead of the Atmel the other board seem to come with for Serial comms. And it looks different too, a bit cheaper - seems like they've saved on the juicy components too as a lot of them looks smaller here...but hey...it might work just as fine, we'll see.

Now off to test it all...



--------------------
If my soul was software, I could program myself and you.
PMEmail Poster
Top
JoOngle
Posted: January 05, 2016 10:21 am
Reply to this postQuote Post


Forum Addict ++
Group Icon

Group: Moderators
Posts: 9,591
Member No.: 3,818
Joined: December 12, 2005




I've now tested all the units, they ALL worked on the FIRST try.

The 5 Nanos, it was so hassle free it felt like some kind of production line testing, same driver in Linux I guess...so it was smooth sailing, quick to upload stuff to and test right away.

The big surprise was the arduino Mega 2560 (7$ clone of the 50-60$ real thing), it worked just as fine as the more expensive clone I bought earlier. The contact SEEMS a little flimsier, the components SEEMS cheaper. But it does the job. Same speed, same performance on my BIG LCD graphical displays.



--------------------
If my soul was software, I could program myself and you.
PMEmail Poster
Top
Nothing40
Posted: January 06, 2016 04:50 am
Reply to this postQuote Post


Forum Addict ++
*******

Group: Spamminator Taskforce
Posts: 3,767
Member No.: 181
Joined: October 05, 2002




Ahh,be careful of those I2C LCD expander things! They're great,and easy to use..if you're sure of the type you have!
I discovered there are at least three (probably 4) different versions of them..
http://www.dutchforce.com/~eforum/index.ph...topic=43820&hl=

Something to be aware of,if you get more of them...they might not all be the same.

Edit2: I should mention that the two types (data high bits,control low bits...and control high,and data low) use two different Arduino Libraries,of course..BOTH WITH THE SAME NAME! nono.gif
I have copies of both,if you run into this,and don't want to spend a day Googling to get it figured out,like I did.


Edit:
Ohh,I got another cheap Mega2560 clone in the mail today...since I somehow managed to blow up like 3 in a row. blink.gif


--------------------
"we need an e-kick-in-the-nuts button" -Colt45
PMUsers WebsiteYahoo
Top
JoOngle
Posted: January 06, 2016 07:00 am
Reply to this postQuote Post


Forum Addict ++
Group Icon

Group: Moderators
Posts: 9,591
Member No.: 3,818
Joined: December 12, 2005




How did you manage to brick 3 x 2560? blink.gif

Anyway, I've got the (T) version of the I2C to LCD thingy.

But I've got far bigger problems with it than what you mentioned, I keep getting compiling errors:

QUOTE
/home/joongle/.arduino15/packages/digistump/hardware/avr/1.6.5/libraries/Wire/Wire.cpp:35: multiple definition of `USI_TWI::USI_LastRead'

libraries/TinyWireM/TinyWireM.cpp.o:/home/joongle/.arduino15/packages/digistump/hardware/avr/1.6.5/libraries/TinyWireM/TinyWireM.cpp:35: first defined here
libraries/Wire/Wire.cpp.o: In function `USI_TWI::USI_TWI()'


--------------------
If my soul was software, I could program myself and you.
PMEmail Poster
Top
Nothing40
Posted: January 06, 2016 07:33 am
Reply to this postQuote Post


Forum Addict ++
*******

Group: Spamminator Taskforce
Posts: 3,767
Member No.: 181
Joined: October 05, 2002




Hmm..For the I2C LCD thing you need the "LiquidCrystal_I2C" library also.(and the right version of it,depending on which way your particular module is wired.)
Even the 'wrong' version will compile,but your LCD won't work right.

Not sure why it's not happy. Is TinyWire the ATtiny Wire library? Maybe it's pulling in the wrong one?

Sometimes I *REALLY* hate the way they did the power on the Arduinos. If you decide to power your project from an external supply,and not over USB...when you plug in the USB (like,to re-upload new code),it back-feeds 5V from the Arduino into your PC,and overheats/cooks the little 5V regulator on the Arduino. Depending on how the regulator fails,it might cram the "raw" supply voltage into the uC supply pins,and/or the USB-serial chip,and cooks them too.
It's double fun when it tries to cram 9V,12V,whatever your "raw" supply voltage is,into the USB port on your PC. Funny smell,Project stops working,PC suddenly reboots/shutsdown. "WTF!?" Grr.

There's apparently supposed to be some kind of circuit on the Arduino boards to prevent this,with an LM358,and some BS..but it doesn't work,obviously.(Even Genuine Arduino boards suffer from this issue,IME.)

I often resort to removing the PTC/resettable fuse for the USB jack from the board,and remembering that it has to be powered 'externally' when you want to (re)program it.
Nuking 3x Mega2560's in a row is what happens when you forget this. sad.gif

That's the one major gripe I have about the Arduinos. It's made me say colorful things more than once.
Well,that and the half-spaced(.050) header arrangement on the one side. Kind of a pain to get it mounted to perf board.


--------------------
"we need an e-kick-in-the-nuts button" -Colt45
PMUsers WebsiteYahoo
Top
JoOngle
Posted: January 06, 2016 07:45 am
Reply to this postQuote Post


Forum Addict ++
Group Icon

Group: Moderators
Posts: 9,591
Member No.: 3,818
Joined: December 12, 2005




I'm using all of those libraries already, the example LCD comes with both those. Except the tinywire is called TinywireM.h instead. There's apparently an TinywireS.h as well... wacko.gif

Oh, so you cooked your USB power or the regulators on the 2560 Boards. Yay, I didn't know they hadn't compensated for that with a diode or something to avoid reverse power, oh well. Hadn't had any issues with that yet, despite running an external regulator AND my USB from the PC simultaneously, lucky I guess blush.gif .

Maybe I should use optocouplers a little more often. Don't wanna fry my only main PC.

Thanks for the heads up, any progress on that MESH network?


--------------------
If my soul was software, I could program myself and you.
PMEmail Poster
Top
Nothing40
Posted: January 06, 2016 08:06 am
Reply to this postQuote Post


Forum Addict ++
*******

Group: Spamminator Taskforce
Posts: 3,767
Member No.: 181
Joined: October 05, 2002




I think you want the regular "Wire.h" library,assuming you're using a Mega/328/etc.
I'm assuming the "TinyWire" ones are for the ATtiny chips? Not sure.

I've had issues before when I added new/updated libraries to the libraries folder.Suddenly the IDE sees two versions of the library,and invariably,picks the wrong one. I usually go into the libraries folder,and re-name or move the wrong one,temporarily. Dunno if that's the problem you're currently having,but it's something to be aware of..caught me a couple times.

The MESH thing...
I played with it a bit last night.. I'm not sure what's up.. Either I'm missing something,or it just doesn't work right.
It seems only one specific 'node' (an ESP8266 -01 module) is sending out messages,and only one other module (an ESP8266 -12) sees the messages. No other nodes seem to send or see any other messages from any other nodes,like,at all. Nada. (I had like 4-5 of them running)
No idea. It seems other people have had similar issues with it not working at all,or only kinda-sorta-half-working. dunno.gif

Maybe it'll work in the next version. It didn't even exist in the last version.


--------------------
"we need an e-kick-in-the-nuts button" -Colt45
PMUsers WebsiteYahoo
Top
JoOngle
Posted: January 06, 2016 08:47 am
Reply to this postQuote Post


Forum Addict ++
Group Icon

Group: Moderators
Posts: 9,591
Member No.: 3,818
Joined: December 12, 2005




Well, I've already tried the Wire.h one, but the other I2C driver seems to be depending on the AtTiny libraries, so it still compiles nagging about these things. #include

QUOTE
<LiquidCrystal_I2C.h>          // for LCD w/ GPIO MODIFIED for the ATtiny85


This isn't purely a matter of getting the 1602 to work, it's a matter of getting that little Digispark Kickstarter Arduino to work with an LCD display.

Anyhoo...as for the ESP8266-12Es, I've done a LOAD of experiments with the one I've got lately, and there seems to be various issues.

For example, when I'm using it as a web server AND access point - it's working fine as an access point, but having trouble delivering the pages. I sort of suspect this is an speed issue, maybe even a compatibility issue, who knows.

And when I use it on the Network (where it connects as a client to my router), it works fine for 3 hours until it somehow latches up and I can't get to its IP address anymore.

The reverse is true for using it as an Access Point, then it can run for days without issues, but won't display the web pages (it will however, show SSID on any device, and you'll be able to connect to it all the time.



--------------------
If my soul was software, I could program myself and you.
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic OptionsPages:123 Reply to this topicStart new topicStart Poll

 


:: support us ::




ElectronicsSkin by DutchDork & The-Force