Quick teaser update I filmed while on the house phone with AT&T reminding them I get crummy service - they re-re-reset my phone and are going to do a formal service review this time. I killed the audio because it was speaker phone to the tech I shot after I could power my Note4 back up to use the camera.
https://onedrive.live.com/redir?resid=5BE3704DEF865242!3864&authkey=!AGrTe2sgoEg-nME&ithint=video%2cmp4This shows the two Pro+OLED's wired serially to each other from the GPS pins on the PCB board. They are sharing a common USB Battery box - at least until I pull one to USB for program updates - which is risky with Rx/Tx left connected. Be sure to read
http://digistump.com/board/index.php/topic,1596.0.html about serial connects. The ATMEL pins are unprotected and shouldn't be exposed to power when off, or 'confusion' from multiple power sources as they have no isolation or protection, and without a common ground power the serial won’t be reliable if it works at all (I ran a ground to no effect, that could only cause trouble). I may have toasted one of my Pro's in the learning process, it shows some life so I’m going to re-dump the bootloader if I can. I know it makes power and the OLED is good, both soldered in place.
OLED Library needs some work but tough to Debug it on same screen (that is the spew running between the smiley face)- so with this working I can export values to a second screen - the other Pro’s OLED. This setup as you see it in fact helped me debug and diagnose the serial connection too. There is a default 16byte serial buffer ( those IDE settings for PRO 32 and 64 will dedicate precious extra RAM for larger buffer space ) and when I displayed char counts on the screen I saw I crushed that boundary. The instant I saw serial input my code was excitedly prepping and writing to the OLED and the other pro was still sending and I wasn't emptying the buffer and I lost 16 characters (thanks debugger). So I started sending non displayed 'Tilda:~' characters to force the issue after the simple message starting at one I ran up to 200 of them ( I did more but that takes time and you can already see the delay growing at 200 [one Pro blinks as it starts to send, the other blinks on completion but the blinks are hard to see in the light]), and if you see the video I started tracking that. I had to adjust my code timing on both sides to clean this up as there is no transmit control line [ I could add one, or a response character, but that would put code burden on the test machine ]. Once I sped up the receiver it could empty the buffer so fast it thought the sender was done - even at 115,200 baud and would quit before all the Tilda's were sent after I added a "delay(3);" on the sender's end, so I added a "delay(15);" on the receiver end before I declared the message done [now that I know it works I can add a stop character from the Test machine and cue on that]. Now that I know it can do 115kbs I need to see what happens at lower bps, these delay’s should be ‘harmless’ overkill. Depending on the Test Application too fast can be as bad as too slow on the baud rate because it takes MCU cycles, so it needs to be flexible.
And inserting code in the system you are testing can cause its own problems, or hide them. When I ported the OLED I wondered what a value was - so I extern'd a value from the Library to the sketch to OLED print and that fixed something, in fact when I pulled even the printed use of that variable it compiled out and the OLED code re-BROKE! That variable created a buffer that kept something from being trashed, and the need for it went away after mshorer made a mod to the MicrOled library - though I'm now seeing other garbage on the screen (dots between the large font characters) that may be new, so I need to test the old library and that debug extern in the new version to see.
So much for this quick update – I’ll add pics of my newer Mark II device – and post my working code that might be a good example for the MicrOled library. The Mark II went from exposed Male pins to long pin Females ($15 got me a 100 pack from Amazon), and I socketed the Pro in case. I wanted access to all the Pro pins – but the 18 male pins hanging out the bottom are too often in harm’s way, especially with a handheld DMM probe. I finished my first 50 feet of lead free solder – the Pb stuff is way better!