Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. I've been so productive!

I've been so productive!

Scheduled Pinned Locked Moved The Lounge
hardwareasp-netgraphicsdesigniot
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    honey the codewitch
    wrote on last edited by
    #1

    I want an IoT ecosystem that's as cross platform as possible, but even then I have some code that is for some MCUs specifically - generally driver stuff, or things that take advantage of one off features of an MCU like integrated WiFi. The ESP32 is a popular target of mine. The ESP32 targeted things can either run under Arduino or the ESP-IDF, so there are still cross platform considerations, since the ESP-IDF and Arduino frameworks operate in fundamentally different ways. I recently built a project that runs on Arduino or the ESP-IDF, and runs on one of two devices - The M5 Stack Core 2 and the M5 Stack Tough. They share much of the same hardware, slightly different wiring, and most notably a different capacitive touch panel controller. Eventually I modularized the configuration for the project, restructuring it so the shared libraries were grouped together, and then it had specific libraries for each device separately. I've pasted the result at the end of this post. Anyway, I developed a good portion of this over the past several days, and/or upgraded existing code to be cross platform. Those shared library dependencies are the same for Arduino, and the ESP-IDF, and work the same across those two devices. There are only two libraries each that are specific to the device - its power chip, because despite both being an AXP192 they are wired differently on each device, and then the touch panel controller. There are very few and very brief forks in my actual application code either, and it compiles and runs under Arduino and ESP-IDF on both devices. I don't know how practical this accomplishment is, but I wanted to share it with someone, and everyone around me is asleep right now. And yeah, I wrote an article about it today, but it didn't cover this bit.

    [common]
    core2_com_port = COM10
    tough_com_port = COM20

    lib_deps_shared = codewitch-honey-crisis/htcw_esp_i2c ; i2c init
    codewitch-honey-crisis/htcw_esp_lcd_panel_ili9342 ; screen
    codewitch-honey-crisis/htcw_uix ; UI and Graphics
    codewitch-honey-crisis/htcw_esp_wifi_manager ; wifi
    codewitch-honey-crisis/htcw_esp_ntp_time ; NTP time service
    codewitch-honey-crisis/htcw_bm8563 ; real time clock
    codewitch-honey-crisis/htcw_esp_ip_loc ; IP geolocation

    lib_deps_core2 = codewitch-honey-crisis/htcw_m5core2_power ; AXP192 power chip
    codewitch-honey-crisis/htcw_ft6336 ; touch screen panel

    lib_deps_tough = codewitch-honey-crisis/htcw_m5tough_power ; AXP192 power chip
    codewitch-honey-crisis/h

    R 1 Reply Last reply
    0
    • H honey the codewitch

      I want an IoT ecosystem that's as cross platform as possible, but even then I have some code that is for some MCUs specifically - generally driver stuff, or things that take advantage of one off features of an MCU like integrated WiFi. The ESP32 is a popular target of mine. The ESP32 targeted things can either run under Arduino or the ESP-IDF, so there are still cross platform considerations, since the ESP-IDF and Arduino frameworks operate in fundamentally different ways. I recently built a project that runs on Arduino or the ESP-IDF, and runs on one of two devices - The M5 Stack Core 2 and the M5 Stack Tough. They share much of the same hardware, slightly different wiring, and most notably a different capacitive touch panel controller. Eventually I modularized the configuration for the project, restructuring it so the shared libraries were grouped together, and then it had specific libraries for each device separately. I've pasted the result at the end of this post. Anyway, I developed a good portion of this over the past several days, and/or upgraded existing code to be cross platform. Those shared library dependencies are the same for Arduino, and the ESP-IDF, and work the same across those two devices. There are only two libraries each that are specific to the device - its power chip, because despite both being an AXP192 they are wired differently on each device, and then the touch panel controller. There are very few and very brief forks in my actual application code either, and it compiles and runs under Arduino and ESP-IDF on both devices. I don't know how practical this accomplishment is, but I wanted to share it with someone, and everyone around me is asleep right now. And yeah, I wrote an article about it today, but it didn't cover this bit.

      [common]
      core2_com_port = COM10
      tough_com_port = COM20

      lib_deps_shared = codewitch-honey-crisis/htcw_esp_i2c ; i2c init
      codewitch-honey-crisis/htcw_esp_lcd_panel_ili9342 ; screen
      codewitch-honey-crisis/htcw_uix ; UI and Graphics
      codewitch-honey-crisis/htcw_esp_wifi_manager ; wifi
      codewitch-honey-crisis/htcw_esp_ntp_time ; NTP time service
      codewitch-honey-crisis/htcw_bm8563 ; real time clock
      codewitch-honey-crisis/htcw_esp_ip_loc ; IP geolocation

      lib_deps_core2 = codewitch-honey-crisis/htcw_m5core2_power ; AXP192 power chip
      codewitch-honey-crisis/htcw_ft6336 ; touch screen panel

      lib_deps_tough = codewitch-honey-crisis/htcw_m5tough_power ; AXP192 power chip
      codewitch-honey-crisis/h

      R Offline
      R Offline
      Roger Wright
      wrote on last edited by
      #2

      A little OT, but I suspect that you're the one to ask... I've got a system of 14 RTUs on a rs-485 chain, and I need to monitor and record the data passing back and forth among devices. All I can find are tools that want to actively query devices, not just passively listen. Do you use such a tool in your IoT activity, or know of one that I might be able to use?

      Will Rogers never met me.

      H B 2 Replies Last reply
      0
      • R Roger Wright

        A little OT, but I suspect that you're the one to ask... I've got a system of 14 RTUs on a rs-485 chain, and I need to monitor and record the data passing back and forth among devices. All I can find are tools that want to actively query devices, not just passively listen. Do you use such a tool in your IoT activity, or know of one that I might be able to use?

        Will Rogers never met me.

        H Offline
        H Offline
        honey the codewitch
        wrote on last edited by
        #3

        I've never needed to do that. I have a serial UART probe that handles that kind of thing for me, and a logic analyzer when that doesn't work. But sniffing wires? That's outside my wheelhouse. Could you splice into it?

        Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

        R 1 Reply Last reply
        0
        • H honey the codewitch

          I've never needed to do that. I have a serial UART probe that handles that kind of thing for me, and a logic analyzer when that doesn't work. But sniffing wires? That's outside my wheelhouse. Could you splice into it?

          Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

          R Offline
          R Offline
          Roger Wright
          wrote on last edited by
          #4

          Yes, I can splice into it or just wire a logger into a terminal block on the chain. A logic analyzer would do it, but I'd really like something that understands the MODBUS commands and can list what commands have been sent to each device, and report the responses, if any. I suppose I'm looking for a rs-485 MODBUS equivalent to an Ethernet port sniffer, but I'm not having any luck finding one. [sigh] Oh well, just thought I'd ask. Thanks!

          Will Rogers never met me.

          H 1 Reply Last reply
          0
          • R Roger Wright

            A little OT, but I suspect that you're the one to ask... I've got a system of 14 RTUs on a rs-485 chain, and I need to monitor and record the data passing back and forth among devices. All I can find are tools that want to actively query devices, not just passively listen. Do you use such a tool in your IoT activity, or know of one that I might be able to use?

            Will Rogers never met me.

            B Offline
            B Offline
            BBar2
            wrote on last edited by
            #5

            If you are comfortable with this sort of thing, a homegrown protoboard approach is an option. I'm currently working on a project where several Arduino devices communicate over a rs485 bus. I use Max3488 chips to switch between balanced rs485 lines and the Arduino's single ended Tx/Rx signals. For troubleshooting, I run an Arduino and Maxx3488 8 pin DIP on a protoboard. Once you have that, you can snoop on the 485 bus with a very few lines of code and a serial monitor.

            R 1 Reply Last reply
            0
            • B BBar2

              If you are comfortable with this sort of thing, a homegrown protoboard approach is an option. I'm currently working on a project where several Arduino devices communicate over a rs485 bus. I use Max3488 chips to switch between balanced rs485 lines and the Arduino's single ended Tx/Rx signals. For troubleshooting, I run an Arduino and Maxx3488 8 pin DIP on a protoboard. Once you have that, you can snoop on the 485 bus with a very few lines of code and a serial monitor.

              R Offline
              R Offline
              Roger Wright
              wrote on last edited by
              #6

              That's a definite possibility, and have a few Arduino boards lying around here. Trouble is, I have no time to play anymore! Grrr!!!

              Will Rogers never met me.

              1 Reply Last reply
              0
              • R Roger Wright

                Yes, I can splice into it or just wire a logger into a terminal block on the chain. A logic analyzer would do it, but I'd really like something that understands the MODBUS commands and can list what commands have been sent to each device, and report the responses, if any. I suppose I'm looking for a rs-485 MODBUS equivalent to an Ethernet port sniffer, but I'm not having any luck finding one. [sigh] Oh well, just thought I'd ask. Thanks!

                Will Rogers never met me.

                H Offline
                H Offline
                honey the codewitch
                wrote on last edited by
                #7

                Good luck!

                Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups