Author Topic: Arduino compatibility problem  (Read 2307 times)

0 Members and 1 Guest are viewing this topic.

Offline ESXiTopic starter

  • Regular Contributor
  • *
  • Posts: 113
  • Country: nl
  • Just a hobbyist
Arduino compatibility problem
« on: August 27, 2018, 07:55:34 pm »
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  :palm:
« Last Edit: August 27, 2018, 07:58:29 pm by ESXi »
my elcheapo lab:
Hantek DSO5102P, KSGER T12 STM32 V2.1S + safety mods, RD6018W DC variable power supply, Quick 861DW, Quick 201B, Telequipment D1011, Optika ST-50LED (ringlight modded)
 

Offline sentry

  • Contributor
  • Posts: 12
  • Country: dk
Re: Arduino compatibility problem
« Reply #1 on: August 27, 2018, 08:33:23 pm »
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).
 

Offline ESXiTopic starter

  • Regular Contributor
  • *
  • Posts: 113
  • Country: nl
  • Just a hobbyist
Re: Arduino compatibility problem
« Reply #2 on: August 28, 2018, 10:53:05 am »
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).

I 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?


« Last Edit: September 28, 2018, 01:42:27 pm by ESXi »
my elcheapo lab:
Hantek DSO5102P, KSGER T12 STM32 V2.1S + safety mods, RD6018W DC variable power supply, Quick 861DW, Quick 201B, Telequipment D1011, Optika ST-50LED (ringlight modded)
 

Offline rjp

  • Regular Contributor
  • *
  • Posts: 124
  • Country: au
Re: Arduino compatibility problem
« Reply #3 on: August 28, 2018, 11:04:50 am »
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
 
The following users thanked this post: ESXi

Offline ESXiTopic starter

  • Regular Contributor
  • *
  • Posts: 113
  • Country: nl
  • Just a hobbyist
Re: Arduino compatibility problem
« Reply #4 on: August 28, 2018, 11:34:15 am »
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

The Neo6MV2 does have a backup battery. But thanks for the information, didn't know that.
my elcheapo lab:
Hantek DSO5102P, KSGER T12 STM32 V2.1S + safety mods, RD6018W DC variable power supply, Quick 861DW, Quick 201B, Telequipment D1011, Optika ST-50LED (ringlight modded)
 

Offline ESXiTopic starter

  • Regular Contributor
  • *
  • Posts: 113
  • Country: nl
  • Just a hobbyist
Re: Arduino compatibility problem
« Reply #5 on: August 28, 2018, 05:29:24 pm »
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]; // 1024
NanoCanvas canvas(128,64, buffer); // 64,16,
canvas.fillRect(?, ?, ?, ?, fill color?); // ???
canvas.blt(ssd1306_displayWidth, ?); // ??
« Last Edit: August 28, 2018, 05:33:43 pm by ESXi »
my elcheapo lab:
Hantek DSO5102P, KSGER T12 STM32 V2.1S + safety mods, RD6018W DC variable power supply, Quick 861DW, Quick 201B, Telequipment D1011, Optika ST-50LED (ringlight modded)
 

Offline doobedoobedo

  • Regular Contributor
  • *
  • Posts: 212
  • Country: gb
Re: Arduino compatibility problem
« Reply #6 on: August 30, 2018, 06:28:20 pm »
Check out u8_glib. It drives SSD1306 screens really well, is well documented and easy to use.
 
The following users thanked this post: ESXi


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf