u/JamesWjRose

▲ 1 r/esp32

Debugging Arduino + ESP32?

Hello gang,

I've been a software dev for decades, but in business applications. My experience with Arduino and ESP32 devices is VERY limited.

I'm working on a bit of what I would think is simple code, but I'm getting some odd output and don't know where to look. I've spent some time attempting to look up debugging within Arduino IDE but there are some models of the Arduino device that don't support debugging and I'm not finding an answer for my ESP32.

The code and output is below, but really I'm only asking for a video or whitepaper on debugging for ESP32.

Thanks.

---------------------

Code, I create an array of Events, and each of those has a struct that has an array of Event (NOTE "Events" (plural) and "Event" are different)

This is the list created at 'setup':

void SetupEvents()
{
  events[0].name = "R2 General Head Movement";
  events[0].eventCount = 4;
  events[0].events = new R2Event[4];
  events[0].events[0].type = TYPE_DOME_TURN;
  events[0].events[0].min = 40;
  events[0].events[0].max = 230;
  events[0].events[1].type = TYPE_DELAY;
  events[0].events[1].min = 2100;
  events[0].events[1].max = 4200;
  events[0].events[2].type = TYPE_DOME_TURN;
  events[0].events[2].min = 130; //Basically straight ahead
  events[0].events[2].max = 140;  
  events[0].events[3].type = TYPE_DELAY;
  events[0].events[3].min = 8000;
  events[0].events[3].max = 15000;

  events[1].name = "event two";
  events[1].eventCount = 2;
  events[1].events = new R2Event[2];
  events[1].events[0].type = TYPE_PROCEDURE;
  events[1].events[0].text = "TODO";
  events[1].events[1].type = TYPE_DELAY;
  events[1].events[1].min = 2100;
  events[1].events[1].max = 4200;
}

The output code:
Serial.println("Events_Index: " + String(eventsIndex));
Serial.println("eventIndex: " +  String(eventIndex));
Serial.println("eventCount: " + String(events[eventsIndex].eventCount));
Serial.println("------------");
  if (eventIndex >= events[eventsIndex].eventCount)
  {
    isProcessingEvents = false;
    Serial.println("Event List Complete");
    Serial.println("=================");
  }

The output:

Events_Index: 0
eventIndex: 4
eventCount: 4
------------
Event List Complete
=================
Events_Index: 1
eventIndex: 1
eventCount: 2
------------
art_enable_tx_intr  <- WHAT IS THIS?
Events_Index: 1
eventIndex: 2
eventCount: 2
------------
Event List Complete
=================

I get a collection of different output messages, so without knowing how to properly debug I'm thrashing about. ANY ideas are helpful.

Thanks and have a wonderful day

reddit.com
u/JamesWjRose — 2 days ago
▲ 1 r/esp32

Solved! Thank for the info from u/rattushackus I was able to find another post that mentions the driver issue (duh, I should have thought of that) The other post mentioned that the ESP would show up under "Other Devices" That allowed me to find out which device name and go find the correct driver.

------------------------

Hello gang,

I am attempting to setup a ESP32 but I am not able to see a port in the Ardino IDE or within Windows.

I also have an Arduino connected to my PC (Win11) If I open Device Manager and select "Ports" I can see the Arduino (com3) If I unplug it, Windows beeps and the device is no longer show. Cool, all good.

When I plug in my ESP32 I hear the beep, Device Manager refreshes and still no reference to that device. If I unplug it, again the beep and refresh of DM. So SOMETHING is happening.

What am I doing wrong?

Thanks

reddit.com
u/JamesWjRose — 16 days ago

FIXED: Thanks to u/HissyKittykat for giving me a hint in the correct direction

I had the ESP32 by Espressif Systems version 3.+, instead of 2.0.17

The board that I that works is: "ESP32S3 Dev Module"

--------------------------

Hello gang,

Happy May the 4th! I'm currently working with a set of Astro Pixels for my R2D2. However I am getting an error when I attempt to compile.

Since lots of people are using these I FEEL comfortable in saying it's something *I* am doing wrong.

Followed the directions stated here: https://r2djp.gitbook.io/astropixels/advanced/environment-arduino

Ardiuno > FILE > PREFERERENCES > Sketchbook Location
c:\Users\james\Documents\Arduino

The library that is throwing the error:
C:\Users\james\Documents\Arduino\libraries\Reeltwo-master

There are multiple errors being thrown and before I contact the dev of Reel-Two I thought I'd ask here.

I'm a software developer for decades, but high level languages, so before I attempt to do anything with c++ I thought it best to ask wtf is going on. SEEMS like an issue with the code from Reel-Two, but I'd bet I'm wrong.

The errors are as follows:

---------------------------------------

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\bt\PSController\PSController.cpp: In static member function 'static bool PSController::startListening(const char*)':

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\bt\PSController\PSController.cpp:936:9: error: 'esp_base_mac_addr_set' was not declared in this scope

936 | esp_base_mac_addr_set(base_mac);

| ^~~~~~~~~~~~~~~~~~~~~

In file included from c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\encoder\PWMDecoder.cpp:3:

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\encoder\PWMDecoder.h:171:17: error: 'rmt_obj_t' does not name a type; did you mean 'rmt_mode_t'?

171 | rmt_obj_t* fReceiver;

| ^~~~~~~~~

| rmt_mode_t

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\encoder\PWMDecoder.h: In member function 'void PWMDecoder::begin()':

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\encoder\PWMDecoder.h:124:38: error: 'struct PWMDecoder::Channel' has no member named 'fReceiver'

124 | if ((fChannel[i].fReceiver = rmtInit(fChannel[i].fGPIO, RMT_RX_MODE, RMT_MEM_64)) != NULL)

| ^~~~~~~~~

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\encoder\PWMDecoder.h:124:90: error: 'RMT_MEM_64' was not declared in this scope

124 | if ((fChannel[i].fReceiver = rmtInit(fChannel[i].fGPIO, RMT_RX_MODE, RMT_MEM_64)) != NULL)

| ^~~~~~~~~~

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\encoder\PWMDecoder.h:126:56: error: 'struct PWMDecoder::Channel' has no member named 'fReceiver'

126 | rmtSetTick(fChannel[i].fReceiver, 1000);

| ^~~~~~~~~

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\encoder\PWMDecoder.h:126:33: error: 'rmtSetTick' was not declared in this scope

126 | rmtSetTick(fChannel[i].fReceiver, 1000);

| ^~~~~~~~~~

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\encoder\PWMDecoder.h:127:58: error: 'struct PWMDecoder::Channel' has no member named 'fReceiver'

127 | rmtSetFilter(fChannel[i].fReceiver, true, 100);

| ^~~~~~~~~

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\encoder\PWMDecoder.h:127:33: error: 'rmtSetFilter' was not declared in this scope

127 | rmtSetFilter(fChannel[i].fReceiver, true, 100);

| ^~~~~~~~~~~~

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\encoder\PWMDecoder.h:128:59: error: 'struct PWMDecoder::Channel' has no member named 'fReceiver'

128 | rmtSetRxThreshold(fChannel[i].fReceiver, 5000);

| ^~~~~~~~~

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\encoder\PWMDecoder.h:128:29: error: 'rmtSetRxThreshold' was not declared in this scope; did you mean 'rmtSetRxMinThreshold'?

128 | rmtSetRxThreshold(fChannel[i].fReceiver, 5000);

| ^~~~~~~~~~~~~~~~~

| rmtSetRxMinThreshold

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\encoder\PWMDecoder.h:129:49: error: 'struct PWMDecoder::Channel' has no member named 'fReceiver'

129 | rmtRead(fChannel[i].fReceiver, receive_data, &fChannel[i]);

| ^~~~~~~~~

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\encoder\PWMDecoder.h: In member function 'void PWMDecoder::end()':

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\encoder\PWMDecoder.h:146:41: error: 'struct PWMDecoder::Channel' has no member named 'fReceiver'

146 | if (fChannel[i].fReceiver != nullptr)

| ^~~~~~~~~

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\encoder\PWMDecoder.h:148:52: error: 'struct PWMDecoder::Channel' has no member named 'fReceiver'

148 | rmtEnd(fChannel[i].fReceiver);

| ^~~~~~~~~

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\encoder\PWMDecoder.h:148:33: error: 'rmtEnd' was not declared in this scope

148 | rmtEnd(fChannel[i].fReceiver);

| ^~~~~~

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\encoder\PWMDecoder.h:149:55: error: 'struct PWMDecoder::Channel' has no member named 'fReceiver'

149 | rmtDeinit(fChannel[i].fReceiver);

| ^~~~~~~~~

c:\Users\james\Documents\Arduino\libraries\Reeltwo-master\src\encoder\PWMDecoder.h:150:45: error: 'struct PWMDecoder::Channel' has no member named 'fReceiver'

150 | fChannel[i].fReceiver = nullptr;

| ^~~~~~~~~

exit status 1

Compilation error: exit status 1

u/JamesWjRose — 19 days ago
▲ 16 r/queen+2 crossposts

Hello gang,

Last year I made a SHORT Queen VR experience, since I was never lucky enough to see them live. I was inspired by YouTube clips where at recent concerts other artists have been playing Bohemian Rhapsody and the audience singing along was fabulous, awesome, moving... it was wonderful! So I downloaded the audio of the audience from multiple clips and placed those around you The Viewer. JUST the audio makes this worth a watch, I promise it's great. (and hey, it's free) This is a one song Queen concert, so sit back and enjoy.

Video of the pervious version: https://youtu.be/fuWAGdqgnow?si=GqVFgo4e09kDQHMv

The previous version was only PCVR, not stand alone/native. I finally took a few days, updated the experience to the latest, fastest version of Unity. I also upgrade the experience: The Viewer is now closer to the stage, better effects, more people in the crowd, some improvements to the band's performance, and lots of other smaller details.

I also made a scaled down version for stand alone VR devices* Be aware that on this version the stadium is now a smaller club, fewer people, no weather, no effects, etc. It's the sound of the audience singing that makes this a great experience, the rest is just "nice"... but yes, if you have a PC that you can connect to your VR device, choose that version

This can be found on my site, 100% free fan made project.
http://blissgig.com/default.aspx?id=67

* I have only tested this on a Meta Quest 2, stand alone and connected to my PC.

u/JamesWjRose — 24 days ago