Arduino compatibility problem  - Page 1
Forum section: electronics / beginners

author: ESXi
author_rank: Regular Contributor
timestamp: August 27, 2018, 07:55:34 pm
content: Hi,I was making a project with a gps module and small I2C ssd1306 128x64 oled screen. But the code(NeoSWSerial latest version) doesn't compile on my Arduino Pro Micro AtMega32u4. Also I cannot get the oled screen to work because I am unable to redefine the pins for I2C?Somebody who knows how to fix this issue? My project is stalled.. Would like to finish it but don't feel like programming a complete library

author: sentry
author_rank: Contributor
timestamp: August 27, 2018, 08:33:23 pm
content: Why do you want to redefine the pins for SCL and SDA? I’m pretty sure you can’t. On the ATMega32u4 chip they are wired to D2 (SDA) and D3 (SCL).

author: ESXi
author_rank: Regular Contributor
timestamp: August 28, 2018, 10:53:05 am
content: Quote from: sentry on August 27, 2018, 08:33:23 pmI have tried that, but I also could not get the display to work somehow. I tried to solder of the"Pro"board and guess what, I ended up destroying the prototype board and the pro micro because i soldered all pins and I also found out that the "guutwick, 3.0mm 1.5m" that I ordered kinda sucks compared to my previous solder wick so ...Now using a Nano v3, everything works like it should. The only weird thing now is that it gets a fix REALLY slow. Maybe because it's cloudy outside, I don't know. My phone's gps gets a fix within seconds.When I go outside and connect my Nano V3 with OTG to my phone I can see the serial monitor output, I am tweaking some code now. But at least the display and gps module work.Ordered a few other, I might have damaged my gps module while taking it off. I touched up the U-BLOX module with my beveled soldering tip and added some solder because I wasn't sure why it was not getting a proper fix and not showing me the utc gps date and time on the display that it did the day before on the Uno.Thing is NeoSWSerial is not compatible with the Pro Micro(because of a missing timer or timer type and interrupt thing), and also when changing ssd1306_i2c_conf.h It did do nothing (black screen). Haven't tried Adafruit lib but made my code using ssd1306_i2c, so didn't want to throw that away.Clouds just cleared up a little bit and the device works properly again. Conclusion, it was poor gps reception, so the antenna is kinda bad?

author: rjp
author_rank: Regular Contributor
timestamp: August 28, 2018, 11:04:50 am
content: GPS needs to keep some data in memory (ephimerides) so it can lock on quickly.if you completely remove power from the unit it needs to update that information slowly - unfortunately the cheap breakouts dont expose the battery backup pin

author: ESXi
author_rank: Regular Contributor
timestamp: August 28, 2018, 11:34:15 am
content: Quote from: rjp on August 28, 2018, 11:04:50 amThe Neo6MV2 does have a backup battery. But thanks for the information, didn't know that.

author: ESXi
author_rank: Regular Contributor
timestamp: August 28, 2018, 05:29:24 pm
content: For god sake.. Adafruit_SSD1306 does not work out of the box, I changed the header file to match my oled screen. 128x64. But still nothing..The other library that I am using is really poor documented. I don't know how the functions should look like so I took some code from the demo but its garbage..I am trying to make a canvas or filled box that I can control the width of so I can control it. Like a progress bar, but for the speed indication.So far everything else works.What I am looking for is a example or documented file that shows me how I should use the functions like;uint8_t buffer[128*64/8]; // 1024NanoCanvas canvas(128,64, buffer); // 64,16,canvas.fillRect(?, ?, ?, ?, fill color?); //canvas.blt(ssd1306_displayWidth, ?); // ??

author: doobedoobedo
author_rank: Regular Contributor
timestamp: August 30, 2018, 06:28:20 pm
content: Check out u8_glib. It drives SSD1306 screens really well, is well documented and easy to use.