Don’t know how much code changes have to be made, but you 'll need to include a matching LCD display library into the code as those displays are not supported by the ssd1306 display library. That’s not much to do, but I don’t know either how specific code was written regarding the display type.
I stumbled through the code today and tried to get tracker compass module working. I ordered a hmc5883L i2c compass module, which I installed today. It is recognized, but does not deliver heading data… Then I remembered I had some cheap GPS/compass modules lying around and connected the compass part via i2c and voila… works!
A second bug/issue I encountered was wifi connection to OHD groundstation didn’t establish or did more or less randomly,it switched after some seconds into AP mode.
Following workaround to avoid this:
- In Config.h comment out #define Auto AP right below where to select WiFi mode.
This leads to AntTracker stays in STA mode (which we want it to as AntTracker should act as a WiFi client for OHD groundstation), BUT most of the time it still didn’t connect to OHD AP.
What we need to do is give AntTracker more time for retries establishing a wifi connection.
I finally found in the code the part to change:
- In “AntTrack_v2.xx” goto line 1037 (in my case, may be different according to the version you are using), you should find the line in section “Station”
if (retry >10) (
change the number (10) to a much bigger one (e.g 1000)!
This line of code let the AntTracker just give 10 trials to find and establish a connection to OHD and this is way too small as it looks maybe for 2 seconds for it and then stopped/switched to make an own AP.
After changing this the Tracker waits patiently now and until now I get a connection every time I tried (OK, did 5 tries, not representative, but hey, much better than before!)
Hope this will help you!
Thx, nice finds !
Got the AntTracker finally working with Wifi OHD-Hotspot. The issue why I got a connection but no telemetry from airpi/FC was simple: I forgot to change UDP port to14550 (default set to 14555).
Now all is working fine, tracker receives telemetry, sets Home Position and tracks position.
for connection to OHD the tracker has to be set into STA mode, you have no need to set a specific IP Adress as OHD Hotspot acts as DHCP router
The only thing which has to be changed is setting both UDP port lines to port14550 (like you already did)
Thank you, UDP mode is work.
Ok, need help !
I got that ESP32 dev board, from the above ebay link and found locally an oled I2C display 128x64, 1.3 inch, black/white.
Problem is, it is only working wit SH1106 driver, with SSD1306 not.
Ant-tracker was written for ssd1306, so my display is only showing a blank screen.
Who could help, rewrite the code for my display, I’m 0,000 noob at coding…
Thanks in advance, Norbert
If you’re lucky, only a separate library has to be included. Also had problems to get 1.3 inch oled. Display working, with 0.96 inch the existing library is working perfectly. Will. give it a try tomorrow and see if I can get it running!
included the sh1106 library, but got errors in AntTrack_v2.14 and config.h (code is referring to ssd1306)
I have a 0.96 inch display too, it is isp not i2c
Tried to include the sh1106 library into the AntTracker Arduino code, but with low efforts. From my “low-power coding skills” view it seems, many of the oled functions are tailored especially for ssd1306 library, just replacing elements and pointing them to sh1106 library didn’t work out. So maybe someone else with more experience in programming can fix it easily.
There are graphics libraries that work on multiple kinds of displays, that would probably be the thing to do with it. u8glib2 is one that is very common.
Thanks Marcel for the effort. Wired my tracker today, the small oled is working
The pinouts from config.h are correct ? “Set home” button to GPIO 15 is working ? And last Q for today : what is the (right) starting position for the servos ? Especially the elevation servo (tilt) resting position, before tracker start tracking ?
Yes, the gpio pinout in Config.h is correct, d15 for button and d13 for Led.
I have my servo starting configuration set to pan pointing straight forward (+/- 90 degrees of pan) and have set the elevator servo to about 10 degrees upwards horizontal line position. But this depends on your antenna characteristics (I have a flat panel) and I did this as I had best reception at startup and in flight that way.
If you encounter problems tracker is not following properly you will have to change the pwm values for the min/max angles.
Glad to hear display is working now.
@stephen: thx, will give it a try with u8gblib, used that one in a previous project some years ago with a 1604 LCD.
PositionServos(90, 90, 90); // Intialise servos to az=90, el=0, hom.hdg = 90;
What is "hom.hdg=90?
Sorry for so many questions, don’t know anybody else having a working zs6buj tracker…
hom.Hdg is the angle the servo is when in home position
Could you please share your entire code, so I could compare with default code from github?
I might learn something, because right now I’m like scientists in front of Covid, trying to make a vaccine…
Can upload my Arduino code later, but I really didn’t change that much besides the things described here.
Working on vaccine is definitely more work, although reading DNA/RNA code is much simpler than some programming languages
Thanks again, waiting eagerly, really want to test it on the field this weekend…
Setting up the ghettostation is sooooo much easier…
with 3 buttons and on display menus…
@dr0nemrc, are you online ? waiting for your help/share …
can’t get it working, for God’s sake…
whatever I do, starting is like so
then the screen moves on
and stay there
ghettostation was working with same mavlink params, I don’t changed them
1 out 10 starts, I got the" push button " on the screen, depending on what stage is the led, it stays on or off after I push the home button,
but the tracker doesn’t track.
I walked with the plane 20 meters away, but nothing… no tracker movement