ad: M2Ant-1

usb serial 2 web text

Discussion in 'Arduino Playground' started by VE3CGA, Aug 2, 2021.

ad: L-HROutlet
ad: l-rl
ad: Left-3
ad: MessiPaoloni-1
ad: L-MFJ
ad: L-Geochron
ad: abrind-2
ad: HRDLLC-2
ad: Left-2
  1. VE3CGA

    VE3CGA XML Subscriber QRZ Page

    building a serial to web page text utility. Presently using an esp8266 board. The purpose is to develop a 2way wireless link for my K3NG rotor. All it has to do is replace the rs232 (at logic levels) with wireless 2.4Ghz link like my wireless antenna switch does and get rid of yet another cable. Its been running flawless at 110' between antenna relay and webpage controller at the PC
    Not interested in bluetooth.
    Progress so far is to display USB serial to a web page. I'll get this to monitor what the master arduino board sends to the slave then have it do the return data from the slave board to master control and eventually add manual rotor buttons

    Overall I'd like to replace the mega master board and the remote uno with esp32's but my limited programming skills are giving me trouble trying to get the mega or arduino code to compile to a esp32 (or esp8266). Seems libraries for hardware arent compatable - avr/wdt no such library. Probably more errors since hardware libraries & pins are different

    So the first step is just to use them to replace the serial coms
    so far a manual test from arduino usb serial com13 with results on a webpage...
    Next step is to connect the esp8266 to the serial TX from the master mega board, should be able to connect that on the TX line & show that data on a web page without interfering with the data sent (over the wire) to the remote uno.
    after that, the next step is to send back the reply msg. This would basically just monitor the 2 way traffic

    Even just adding a couple esp8266's as a serial bridge of sorts, wouldnt be a bad thing since they are cheap enough and there ample room in the master & slave boxes, perhaps using espnow.
    Eventually I'd like to replace the mega and uno rotor boards with esp32's
    I'd like to know if anyone has been able to compile mega or uno code to esp32 or esp8266 code, using K3NG code
    I'll probably post this on the site as well
    KA9JLM likes this.
  2. NQ4T

    NQ4T XML Subscriber QRZ Page

    I haven't looked at K3NG's code; but avr/wdt is the watchdog library for the AVR it likely wouldn't exist in the ESP8622 Adruino core.

    I'll poke the code later and see what this is doing and if it's even a fault of the rotator code or if this is an environment related thing.
  3. VE3CGA

    VE3CGA XML Subscriber QRZ Page

    that would be great, some are asking the same thing on the k3ng site
    just a matter of time before its done. I can give you my rotor code from here if you like
    Its very basic: LCD on the master with a serial (logic levels-not rs232 levels) feed to the remote out at the rotors and magnetic az & el sensors
    I've described it on my qrz page

    Not only would that eliminate another wire (YAWG Yet Another Wire Gone) but
    It would also open possibilties for wireless rotor control (eliminating the remote serial cable) and maybe making it easier to use sat32pc controlling doppler and rotor while using UISS for packet, plus wireless rotor control for 2M weak signal work
  4. NQ4T

    NQ4T XML Subscriber QRZ Page

    According to a change he made last august, he supposedly eliminated the need for avr/wdt.h. In fact all the references I can find to wdt_enable are commented out.

    Elimated the need for avr/wdt.h include file
    Refactoring service_calc_satellite_data() to do all satellite az, el, lat, long, next AOS, and next LOS calculations.
    Enhanced the satellite[] struct to contain more information. Going to have service_calc_satellite_data() populate this.
    I would check whatever version of code you have to make sure it's the latest; then make sure all the wdt_enable commands are commented out. I guess it's possible the arduino IDE itself is calling it for some reason, but you'd think that would be resolved in the ESP core. There could be a built-in library. Did the compiler not give you a line number or reference to where the error was?

    I could not find references to avr/wdt.h in any of the libraries. I did not take the time yet to search for any of the wdt_enable commands to make sure some didn't slip by; but I don't see avr/wdt.h included in any of those.

    TimerFive and TimerOne libraries in the /libaries subdirectory does reference a couple of AVR specific libraries:

    #include <avr/io.h>
    #include <avr/interrupt.h>

    This could cause additional problems.
  5. VE3CGA

    VE3CGA XML Subscriber QRZ Page

    playing a bit this morning with the code, initial compile for a es932 gives:
    avr\pgmspace.h: No such file or directory
    so followed a solution on:
    to change: #include <avr\pgmspace.h> to #include <pgmspace.h>
    next error was:
    k3ng_rotator_controller:8892:47: error: 'SP' was not declared in this scope
    unsigned long free = (unsigned long)SP - (unsigned long)HP;

    and more.
    next got a pgmspace.h file from here:
    renamed the pgmspace.h in the arduino directories
    then compiled again and got the same error as before:
    C:\Users\User\AppData\Local\Temp\arduino_modified_sketch_228022\k3ng_rotator_controller.ino: In function 'void output_debug()':
    k3ng_rotator_controller:8892:47: error: 'SP' was not declared in this scope
    unsigned long free = (unsigned long)SP - (unsigned long)HP;

    and actually there are several more errors after this but I'm sure the first thing to solve is the pgmspace problem
    Doing a search on that pgmspace.h for esp8266 and esp32, it comes up with a ton of examples and fixes but all thats beyond my programming level and time to chase down all of those possibilities
  6. NQ4T

    NQ4T XML Subscriber QRZ Page

    If I had a rotor I would pick up an ESP and help work on this. But it sounds like they used a lot of AVR specific stuff. It nakes sense since 99% of it is AVR based.

    If I need to take a break from my own project Im starting back up I can look for the AVR specific stuff and aee how much there is. The function calls between pgmspace for esp32 and avr are probably different, so its more than just redirecting the .h
  7. VE3CGA

    VE3CGA XML Subscriber QRZ Page

    yes I feel its very embedded to avr and will likely need to be rewritten to do stand alone esp32 with wireless display and control.
    Might be easier to re-write a complete wireless rotor system with tracking from gpredict or sat32pc

    beginning to sound like a fall/winter project:D:D

Share This Page

ad: Preppcomm-1