#help-with-arduino

1 messages · Page 21 of 1

leaden walrus
#

feather esp32 v2 behavior for comparison

leaden walrus
#

those previous issue threads pre-date the Feather ESP32 V2, so can't roll back that far and still use the same board

#

however, using an original feather esp32

#

installing BSP 2.0.1

#

it works

stable forge
#

did it not work before the updates?

leaden walrus
#

it did not

#

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1284
load:0x40078000,len:12836
load:0x40080400,len:3032
entry 0x400805e4
Adafruit SCD30 test!
SCD30 Found!
Measurement Interval: 2 seconds
Data available!
Temperature: 22.91 degrees C
Relative Humidity: 47.63 %
CO2: 0.000 ppm

Data available!
Temperature: 22.89 degrees C
Relative Humidity: 47.81 %
CO2: 385.695 ppm

Data available!
Temperature: 22.87 degrees C
Relative Humidity: 47.82 %
CO2: 458.472 ppm
stable forge
#

then you might try 3.0.0 or 3.0.1

leaden walrus
#

i'm currently dealing with really slow internets, so unfortunately can't easily do a BSP version regression walk 😦

stable forge
#

I would do it now but I have non-work stuff to do tonight. I can try tomw if you still have slow internet

leaden walrus
#

@stable forge think i figure it out. it's related to i2c power feature of feather esp32 v2. adding a delay in user sketch before init'ing SCD30 seems to resolve it.

#

@versed python try adding a delay in the example sketch:

  // Try to initialize!
  delay(1000);
  if (!scd30.begin()) {
stable forge
leaden walrus
#

datasheet doesn't seem to have a spec for power on timing

#

but a feather board reset power cycles the scd30

versed python
leaden walrus
#

cool. glad that fixed. you can try reducing that delay amount to figure out what you can get away with.

#

1 second was just a super conservative guess value

versed python
silk geyser
#

is there a way to drive an st7789 from an esp32(s3) using DMA (using arduino ide)?

#

i mainly just need to be able to send a framebuffer very fast

desert ibex
#

Super beginner and basic at coding but joined robotics team and my job right now is to deploy lights on a rover:
need your feedback on my LED implementation for the robotics rover. The electrical team gave me detailed instructions, and here's what I've put together:
Hardware Requirements
Using WS2812 LED strips (30 LEDs)
Each LED draws 60mA at full brightness, so total current draw is 1.8A
Need external 5V power supply since Arduino USB (500mA) isn't enough
Added safety features:
1000 µF, 6.3V capacitor across power lines
Fuse for overcurrent protection
Backfeed protection for Arduino
My Implementation; I coded it (used a bit of feedback and google + AI to learn cuz I am super new sorry); can I get any feedback pls? Just trying to learn
https://paste.mod.gg/kkltzmkaeozb/0

#

heres a pic of setup

stable forge
desert ibex
#

this is what they gave me to work with

desert ibex
#

It would probablyu make the code simpler though

stable forge
#

Neopixels at full brightness are REALLY bright. Do some testing and see if you really need full brightness.

#

If not, you can cut back on the power requirements.

gilded swift
#

Personally, I’ve found that 30-40% brightness is pretty sufficient

desert ibex
stable forge
#

don't paste screenshots, if that's what you are doing. The link to the paste place is fine

desert ibex
#

oh alright, yeah the link works

#

sorry about that

#

ok ill leave the link but i cant delete the ss

#

if u have feedbacxks let me know

stable forge
#

You can define a color once and use it, like:

uint32_t red = strip.Color(255, 0, 0);
desert ibex
#

I kind of did that

#

different syntax tho, ill change it

#
uint32_t red = strip.Color(255, 0, 0);
uint32_t green = strip.Color(0, 255, 0);
uint32_t blue = strip.Color(0, 0, 255);
uint32_t off = strip.Color(0, 0, 0);

``` smth like this, right?
#

ok

#

one sec

stable forge
#

that works

desert ibex
#

yay

#

im gonna ask to set it up

#

i really wish i had more knowledge of circuits

#

i will learn though - i am in computer engineering but idk how themosvet and stuff works 😦

desert ibex
tame cargo
#

Is it possible to do Arduino development (for RP2040 in this case) without using the Arduino IDE? It's awful performance is really getting in my way.

leaden walrus
tame cargo
sharp turret
silk geyser
#

There is also the Arduino Extension for VSCode which is what I use

#

It interfaces with arduino-cli and adds a ui

#

its called "Arduino Community Edition" (the original was deprecated so this is the actively maintained fork)

unreal path
#

New with the Arduino Uno R4 and designing my own board. On the Pro Mini with P328 I could grab pins directly in code using the names from the datasheet.
Would I be able to do the same with the R4 or is using any random pin for a function gonna be a world of hurt when actually trying to program it?

tame cargo
#

I am old school. emacs and a command line.

eternal cloud
tame cargo
brittle bluff
#

Microservo jitter behavior:
I have an SG92R micro servo wired up to a 5v metro mini v2 at D12 and an external power supply (5V, 30A). The microservo is attached to arm that's ~8 grams and 130mm long.

  • It seems fine from 0-60 degrees
  • 90 degrees, it jitters chaotically
  • 90-180, it loses a few degrees the until 180 is actually closer to 140.
  • added a 100uf capacitor across the external power supply, no luck
  • microservo doesn't jitter at position 0
    Any other ideas to stabilize the microservo?
void servo_test() {
  for(int i=0;i<180;i+=30) { 
    sort_servo.write(i);
    delay(5000);
    sort_servo.write(0);
    delay(5000);
  }
}```
peak shell
#

have a problem with my code for a music box that has the following features. Using two neokey1x4 I can switch between folders on the SD card and press play/pause, stop, next song, previous song. Then .mp3 on the SD card should be selected and played. In each folder (01, 02, 03, etc.) there are .mp3 according to the following scheme: 001.mp3, 002.mp3, etc. I use a function to count the songs in the folder. I tried many things and looked many times in the mp3 musicbox adafruit project. Unfortunately, songs are skipped and I don't know why. Everything works, until further notice. In the meantime I have inserted a lot of serial.prints to check where the problem could be. I also checked different SD cards (FAT32), replaced the µC or the vs1053. In a stripped down project everything works fine. Maybe one of you has an idea? Thanks a lot!

stable forge
#

But this does not sound like your problem. This sounds more like a debouncing problem.

#

Do the "Playing song" debug prints show skipped songs? How about the printouts in playSong()?

quaint nebula
#

Having arduino nano issues I’m using these nanos and the red light is on and the it recognizes the nano board but nothing happens when I run my code. Is this some driver issue Ik not aware of if so how can I fix this?

#

it seems like the boards are working with that void setup test. I think it might be how it’s wired?

north stream
#

Looks like you have two nanos, what are they doing? Does either one start up?

quaint nebula
#

Both start up and the red light is on

quaint nebula
#

Both are not plugged in don’t worry

north stream
#

Start up in the sense of starting to run your code?

quaint nebula
#

Yeah

#

And the board blinks but nothing happens

#

Someone told me the nano needs an external power source

north stream
#

It should be powered from the USB connection

#

My next step would be to put some waypoints in the code to see how far it gets

quaint nebula
#

Ii uh

#

Don’t how to program like that

modern dawn
#

waypoints are places where the code does something unique that you can see or hear. To tell that it got that far. For desktop computers, that is often a print statement. For a microcontroller, where there is no screen, blinking an LED (in a pattern) is typical. With a neopixel, blink and set colors.

peak shell
# stable forge Do the "Playing song" debug prints show skipped songs? How about the printouts i...

hello danh, thanks for your looking into the code. In the following an example output after pressing playNextsong():

20:05:27.724 -> Now playing: /01/001.mp3
20:05:27.724 -> Started playing
20:05:30.230 -> File not found: /01/002.mp3
20:05:30.230 -> Failed to play song 2
20:05:30.279 -> Failed to start playing: /01/003.mp3
20:05:30.461 -> Now playing: /01/003.mp3
20:05:30.461 -> Playing song: 3 of 28
20:05:31.714 -> File not found: /01/003.mp3
20:05:31.714 -> Failed to play song 3
20:05:31.747 -> Failed to start playing: /01/004.mp3
20:05:31.912 -> Now playing: /01/004.mp3
20:05:31.912 -> Playing song: 4 of 28
20:05:33.230 -> Failed to start playing: /01/004.mp3
20:05:33.394 -> Now playing: /01/004.mp3
20:05:33.394 -> Playing song: 4 of 28
20:05:34.482 -> File not found: /01/005.mp3
20:05:34.512 -> Failed to play song 5
20:05:34.512 -> File not found: /01/006.mp3
20:05:34.512 -> Failed to play song 6
20:05:34.512 -> File not found: /01/007.mp3
20:05:34.512 -> Failed to play song 7
20:05:34.512 -> File not found: /01/008.mp3
20:05:34.512 -> Failed to play song 8
20:05:34.512 -> File not found: /01/009.mp3
20:05:34.512 -> Failed to play song 9
20:05:34.512 -> File not found: /01/010.mp3
20:05:34.512 -> Failed to play song 10
20:05:34.546 -> File not found: /01/011.mp3
20:05:34.546 -> Failed to play song 11
20:05:34.546 -> File not found: /01/012.mp3
20:05:34.547 -> Failed to play song 12
20:05:34.547 -> File not found: /01/013.mp3
20:05:34.547 -> Failed to play song 13
20:05:34.579 -> Failed to start playing: /01/014.mp3
20:05:34.745 -> Now playing: /01/014.mp3
20:05:34.745 -> Playing song: 14 of 28
20:05:35.732 -> Now playing: /01/006.mp3
20:05:35.732 -> Playing song: 6 of 28
20:05:36.689 -> Now playing: /01/007.mp3
20:05:36.689 -> Playing song: 7 of 28
20:05:37.610 -> File not found: /01/008.mp3
20:05:37.610 -> Failed to play song 8
dusk orchid
# quaint nebula

The arrows on the NeoPixel / LED strip are going the other way, although hard to tell in video, they should be pointing away from the Data In signal wire.
Try connecting the wires (or at least the data signal wire) to the other end of the LED strip

quaint nebula
brave sluice
#

I am working on a Weather Station project which is (probably) going to use a Feather ESP32-S2 in the final build.
However, I am developing with a Feather ESP32-S2 TFT board, And I would like to be able to display the Weather Data on the TFT.
So, my question is there a way, at compile time, to identify which board has been selected?

north stream
#

Many compilers will set some variables you can check with #ifdef type statements

stable forge
solemn cliff
north stream
#

I think it does

quaint nebula
#

It’s working

#

I’m so dumb

#

The arrows on the strip are supposed to face away from the board

north stream
#

We all goof sometimes, I'm glad you got it working!

quaint nebula
#

Yippee

#

Now I can finish the suit

ancient crow
#

Hello everyone!

I'm having an issue with my ESP32 S3 Mini when trying to upload code using Arduino IDE. Here's what's happening:

After I upload the code, the upload window in Arduino IDE gets stuck and doesn't finish.
The ESP32 gets disconnected from my PC, and I can't reconnect it unless I hold the BOOT button while plugging it in.

Does anyone know what might be causing this issue? Any help or suggestions would be greatly appreciated!

Thanks in advance!

#

(i don't view my debug rows on serial monitor)

leaden walrus
#

sounds like possibly some native USB issues

#

try testing with a basic Blink arduino sketch

ancient crow
#

it was code problem, becase with simple code it works...
Now I'm trying to use lcd tft 1,28", with stock configuration pin of library Setup200_GC9A01.h then this:

#define TFT_MOSI 15
#define TFT_SCLK 14
#define TFT_CS 5
#define TFT_DC 27
#define TFT_RST 33
#define TFT_BL 22
It works (but I don't view nothing, correclty, because on my super mini esp32 I don't have this pins)

Then I changed this pins with mine:

#define TFT_MOSI 7
#define TFT_SCLK 6
#define TFT_CS 5
#define TFT_DC 4
#define TFT_RST 3

After uploading, I got this error in the serial monitor:

Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.

Core 1 register dump:
PC : 0x42002c8c PS : 0x00060930 A0 : 0x82002d60 A1 : 0x3fca2c90
A2 : 0x3fc97ab8 A3 : 0x00000000 A4 : 0x0000000c A5 : 0x00000007
A6 : 0x000000ff A7 : 0x60004000 A8 : 0x00000010 A9 : 0x08000000
A10 : 0x3fc97bcc A11 : 0x019bfcc0 A12 : 0x00000001 A13 : 0x00000000
A14 : 0x00000008 A15 : 0x019bfcc0 SAR : 0x00000003 EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000010 LBEG : 0x40056f5c LEND : 0x40056f72 LCOUNT : 0xffffffff

Backtrace: 0x42002c89:0x3fca2c90 0x42002d5d:0x3fca2cc0 0x42002d68:0x3fca2ce0 0x42001d67:0x3fca2d00 0x42007322:0x3fca2d20 0x4037c9fa:0x3fca2d40

north stream
#

Looks like a null pointer reference, but I'm unsure how changing the pins would cause that

#

Perhaps the initialization fails for some reason, and returns null or something, then later code tries to do something with it?

ancient crow
#

this is my simple code, I don't think thath it is code problem:

#include <TFT_eSPI.h>
#include <SPI.h>

TFT_eSPI tft = TFT_eSPI();

void setup() {
Serial.begin(115200);
tft.begin();
tft.setRotation(0);
tft.fillScreen(TFT_BLACK);
tft.setTextColor(TFT_WHITE);
tft.setTextSize(2);
tft.setCursor(10, 10);
tft.print("Hello World!");
}

void loop() {

}

brave sluice
#

@north stream, I found it by using Visual Micro. The verbose output shows the defines; in this case, ARDUINO_ADAFRUIT_ESP32_S2_TFT

peak shell
stable forge
ancient crow
#

Hi to everyone!
I just solved my storeprohibition problem on my ESP32S3.
Same pins and same configuration;

I installed a different version of the board library (ESP32 by Espressif), downgrading from 3.1.1 to 2.0.14.

If I wanted to make the same change in PlatformIO, how can I do it?
I can't find version of esp32 boards

unreal path
#

Where would I find how the Arduino libraries map a pin number to a memory address? Basically the hardware layer of the stack.
Want to see if there's a smarter way to map out and call pins than listing all the pin's addresses as per datasheet

#

(I'm doing this for using my own board but still having access to other arduino libraries and functionality)

stable forge
#

you mentioned "libraries", but it sounds like you are talking about board definitions. If not, could you clarify?

unreal path
#

No, you're right. Thanks!

#

There does seem to be more abstraction to it than I'd expect... Not immediately obvious how it gets from a pin number to a memory address :/

stable forge
# unreal path There does seem to be more abstraction to it than I'd expect... Not immediately ...

pins don't usually have a simple memory address. Instead there are multiple "registers" in the address space that are not regular memory addresses, but correspond to various aspects of a pin's functionality. Often the pins are represented as a bitmask. For instance, there might be a register to, say turn a pin's internal pull-up on and off. If there are 32 possible pins, then there might such a register, with its bit 0 correspond to pin 0, 1 to 1, etc.

#

Also pin numberings are not necessarily simple integers. For instance, the SAMD chip pin are grouped into "ports', so there's PA_00, for pin 00 in Port A, PB_05 for pin 05 in Port B, etc.

#

The Arduino pin numbers don't necessarily correspond to the chip pin numbers at all.

unreal path
#

Yea so for the RA4M1 P010 to P015 it's 0x4004083F in increments of 4

stable forge
#

And the physical pin numbers counting around the edge of the board or the edge of the chip are yet another scheme.

#

So the RA divided it up that way, but there are other orthogonal ways of doing it done by other chips

unreal path
#

And then for P100 to it's 0x40040843 up to P115

#

So there's a lot to write out and was hoping maybe there would be some boilerplate for me to hook into or steal

stable forge
#

Sounds like in the RA series all the functionality is in those four words for each pin?

#

I'd suggest you copy from an existing RA chip, like the Arduino 4 or maybe the Giga R1?

unreal path
#

Yes 🙂 I'm kinda hoping to do that

#

So at least I'd only have to fill out the gaps

stable forge
#

Ladyada has used AI code generators to produce boilerplate like this. But she feeds them the datasheets, and she knows when they get it wrong.

unreal path
#

Yea that'd maybe be more work than writing out ranges myself 😄

stable forge
#

Consider writing, say, a Python program to generate the rough outline and then correct it.

unreal path
#

I'm gonna recount my pins and see if I can just mirror the pin usage from the R4 on my own board if I'm being nifty

#

.. Or I could just go back to an MCP24017 and make my life easier 😄 But then I'd have to spent multiple dollars extra on parts! 😆

stable forge
#

The pin definitions is somethigng I triple-check against the schematic when I do a board definition in CircuitPython. In CPy, we describe the pin details (this one can do A/D, this one has no pull-up, etc.) once, in a chip-related pin file. Then for each board, we just refer to that file. In most Arduino board packages, those kinds of pin details are copied over each time, unfortunately.

unreal path
#

If this doesn't work, maybe I'll just do an output-pin-array with direct addresses. Not as intricate and flexible but iteratable

#

iterationable...

stable forge
unreal path
#

Not sure what that way is..
In variant.cpp it says { BSP_IO_PORT_03_PIN_01, P301 }
Gives the impression that they map a pin name per RA standard to a BSP defined value so there's more remapping, from BSP_IO_PORT_03_PIN_01 (which is 0x0301) to the actual chip specific address for that port's bitmask.
In the other direction, the user won't see P301 but D0 so there's another mapping there.

But if you just mean to list the pins and addresses in a list of #define then yea, you have a good point

#

It's just me doing this code, but I started with the RA expecting more complex projects down the line, so worth making it easier down the line.

stable forge
unreal path
#

Riiight so the analog pins are just expected to be indexed further in since they also start from 0

#

Yea I see now

#

Why they then even bother with the P301 is confusing...

stable forge
#

The actual memory addresses are usually taken care of by the low level routines that do pin operations, e.g. there's a routine that, say, sets, a pull-up, and it takes BSP_IO_PORT_03_PIN_01 or P301 or whatever, and then internally converts that to the memory address. But most of the code doesn't need to know the actual memory address at all.

#

I don't know what P301 is in this case. What is its value?

unreal path
#

Are these routines for the limited subset of pins used by arduino or is that something I can tap into for my own convenience?

#

So P301 is the name of a pin. All pins on the RA are Pxyy where x is port and yy is pin index

stable forge
#

usually they are general purpose. Sometimes the Arduino code is talking the registers directly; sometimes it is calling some low-level HAL routines in the SDK provided by the manufacturer. E.g. for RP2040, Raspberry Pi provdies the pico-sdk, which has routines like gpio_set_pulls().

#

but is there a #define P301 <something>, and if so, what is the <something>?

unreal path
#

Aaaah yea found it in an include...

#
PIN_PWM|CHANNEL_4|PWM_CHANNEL_B|GPT_ODD_CFG,
PIN_INTERRUPT|CHANNEL_6,
SCI_CHANNEL|PIN_RX_MISO_SCL|CHANNEL_2|SCI_EVEN_CFG,
SCI_CHANNEL|PIN_CTS_RTS_SS|CHANNEL_9|SCI_ODD_CFG|LAST_ITEM_GUARD
};
stable forge
#

so that describes all its characteristics, like its PWM channel, etc, etc. In some variant.cpps, that's all broken out in the variant table

unreal path
#

Riiiight

stable forge
#

liked in the SAMD table I pointed you to, an example line is

  { PORTB,  8, PIO_ANALOG, (PIN_ATTR_PWM|PIN_ATTR_TIMER), ADC_Channel2, PWM4_CH0, TC4_CH0, EXTERNAL_INT_8 }, // ADC/AIN[2]
unreal path
#

But yea, I think I'll just use the overarching array of addresses and can shuffle them around if I need them in a different order

stable forge
#

I think you should use the same table structure as the Arduino RA boards; is that what you mean?

unreal path
#

Just listing the direct pin mode and value bit addresses in an array, so simpler

stable forge
#

then you are doing it in a non-standard way. If you copy how Ardiuno does it, then you can use all the existing structure. Just copy the R4 board, and then shuffle around the table.

unreal path
#

I know how to take the address and set the bit, but I don't know how to reuse this table :/

stable forge
#

I'd say don't change the standard unless you have a reallly good reason

#

ok hold on, let's look at their table...

unreal path
#

No I mean...

#

Sorry was trying to paste all the code somehow that wouldn't be a massive block in the channel

rotund python
#

is there a reason for arduino ide to not output any serial print in values on the serial monitor

north stream
#

There are several possibilities, such as logic conflict, baud rate mismatch, port allocation problem, synchronization issue, driver problem, different port, etc.

waxen nymph
#

Does anyone know if its possible to have an ATtiny85 to switch back and forth between pretending to be a USB keyboard and passing USB traffic from another device straight through? i want to put one inside a mouse and after it detects that it hasn't moved within a certain amount of time it switches to pretending to be a keyboard and types some stuff out on the computer its connected to.

stable forge
rotund python
#

ok i have the serial monitor working but get nothing but 000 on all axis even in the example scrypt for the TLV493d board which i am using

livid osprey
#

Does anybody know how to print Chinese characters using adafruit gfx?

livid osprey
#

I know there are other libs that support Chinese, but I haven’t managed to get their driver to initialize properly.

sharp turret
#

oh, I just realized that's 6 years old

north stream
#

If you just need a handful of characters, you can map them like any other custom glyphs. If you need a bunch of them, you may run into issues.

ivory ridge
#

I tried the arduino simulator online and its actually quite neat

#

didnt know I could just do it all virtually first, test it out. Then when you're actually confident transfer that to the real deal

dusk orchid
livid osprey
#

Is there anyone familiar with the lvgl glue library? I’m trying to use lvgl with an ili9488 driver, but the only driver that works seems to be the one by Jared Burkett, which doesn’t appear to work with lvgl glue(expects spitft)

#

Alternatively, is there anyone familiar with a way to convert a display driver lib from adafruit_gfx to spitft?

bleak socket
#

Hey guys, anyone know why my LCD screen looks like this? It's washed out 🫣
my board is an ESP32-WROOM

and im using these pinouts

MOSI->DIN
SCLK->CLK
CS->CS
DC->DC
RST->RST
BL->BL
#define TFT_MOSI 14
#define TFT_SCLK 12
#define TFT_CS   15  // Chip select control pin
#define TFT_DC    2  // Data Command control pin
#define TFT_RST   4  // Reset pin (could connect to RST pin)
#define TFT_BL   13  // LED back-light

only thing i know is that MOSI is the data line

north stream
#

I'm guessing a color mapping or contrast issue

dusk orchid
dusk orchid
# livid osprey Is there anyone familiar with the lvgl glue library? I’m trying to use lvgl with...

Looks like the advice is to use Bodmer's TFT_eSPI library (similar with the lilygo T-Display S3) https://forum.arduino.cc/t/changes-in-adafruit_ili9341-library-for-ili9488/614186/2

#

You might need an older or customised version, to match up to lvgl 8.2 which adafruit lvgl glue requires.

livid osprey
#

Honestly my early attempts were hindered by the fact I was using a samd51, so I’ve since switched to an esp32s3 and am hoping the other options work better…

dusk orchid
#

All I really remember is the tdisplayS3 had it's own changes for the bodmer library, included in the manufacturers board repo, but later the same driver was upstream too.

livid osprey
#

I did manage to get it working on an esp32s3, so I think I’m okay for now. Thanks for looking into it @dusk orchid

silk geyser
#

is there a way to use an sd card (spi) with an esp32 and arduino and be able to use methods like "fopen"

#

esp-idf does this using mmc i think, but im not very expirienced with esp-idf or using periphirals with it

#

there is also the fatfs library for arduino but i cant find much info about it

bleak socket
limber blaze
#

Hello!
How do I go about using this board: https://www.adafruit.com/product/5165 with a QTPY ESP32-S2 (https://www.adafruit.com/product/5348) ? The example from the library doesn't seem to work.

limber blaze
timid talon
#

Hi, I am trying to use the Arduino IDE to program an Adafruit Feather V2 to read data from an Adafruit SCD41 sensor and send it to a Raspberry Pi via MQTT. However, I am having trouble uploading the file and running it. The compilation process takes forever and never finishes. I'm not sure what’s wrong, as I’m not receiving any errors—it’s just compiling very slowly.
Here is the code I am trying to run. Do you have any suggestions on what I can try?

quaint nebula
#

Hello!

I have some LED projects running with WS2812B strips and they are working superbly with the Neopixel library.

However they are only RGBW and I have to choose which color temperature of white pixel to buy. I'm intrigued by the WS2805 strips with RGBCCT with warm and cool white pixels so you can adjust color temperature. These seem ideal. However while I see that WLED has support as of 0.15.0-b2 for WS2805 I can't find anything that says support is available for Arduino libraries.

Would love to get some advice on where to look for an Arduino LED strip library that has WS2805 support, or news of when (if) that might come to the Neopixel library. And of course if I've completely missed it and it's already implemented somewhere please do steer me in that direction. Thanks!

rugged trout
#

Im pretty sure that the board is broken as one of the traces on the back is uncovered. When a motor is connected, if there is power in 12v or even 5v logic the motor runs. Removing the enable jumpers or writing LOW LOW on any of the pins does nothing. Is there something common ive missed or is this board just dead?

sharp turret
rugged trout
#

Its an LN298, even with the enable jumper removed (which should completely stop the motor) the motor runs constantly from when power is connected.

#

Im just checking to make sure that im not going crazy

dusk orchid
# timid talon Hi, I am trying to use the Arduino IDE to program an Adafruit Feather V2 to read...

can try compiling in the commandline, with arduino-cli, or using preferences in arduino-ide select verbose build option. Maybe it'll tell you what's up and why it never finishes.
When I compiled your code on wokwi (online esp32 simulation) it says wifi.init doesn't exist (see here: https://docs.espressif.com/projects/arduino-esp32/en/latest/api/wifi.html#wifista)
https://wokwi.com/projects/421455473960407041

silver stirrup
#

I'm following the instructions on this page:
https://learn.adafruit.com/adafruit-esp32-s3-tft-feather/arduino-blink
I can upload the blink sketch which includes a Serial.println("Hello!"); in the loop()
The LED blinks, but I get nothing on the Serial Monitor - it says: Port monitor error: command 'open' failed: Invalid serial port. Could not connect to COM4 serial port.
However this is the same COM port that was just used successfully to upload the sketch. (Arduino IDE 2.3.4 on Windows10)
It is always the same COM4 port whenever I check it in the Tools PORT menu , uploading uses that port and the Serial Monitor attempts to open that same port.
Any suggestions?

north stream
#

If the USB device re-enumerates, sometimes it will map to a different device name

sharp turret
#

Open up device manager and keep an eye on the COM port names there.

silver stirrup
sharp turret
#

post your full sketch

silver stirrup
#

it is the blink sketch from the page in the link above.

#

Another clue is that I have to hold Boot and press Reset before uploading a sketch works (can connect to COM4)

sharp turret
#

why is that a clue?

#

Putting an ESP32 into bootloader mode doesn’t seem weird to me.

#

or you mean you can connect to it (via serial) while in bootloader mode?

silver stirrup
#

Yes I can only connect to COM4 while in Bootloadwer mode.
Because I think you should be able to Upload a sketch without having to get into the bootloader every time you upload. But there are some confusing instructions regarding the bootloader on the page I linked. The screenshot of the tools menu does not match what is in the current version of Arduino IDE. Butr this is a digression from the issue that I cannot get Serial Monitor to work while a sketch is running.

eternal cloud
sharp turret
#

I would expect to need to go into bootloader anytime you upload code on a device with native USB.

eternal cloud
#

Also, the COM port will be different between bootloader mode and code running mode, if you want serial while the code runs, you need to choose the new com port.

sharp turret
#

(ESP32 or otherwise)

silver stirrup
#

OK lets focus on why Serial Monitor cannot connect when running a simple sketch. Only one COM port ever appears in Device Mgr. How do I tell Serial Monitor to look at a different port?

sharp turret
#

That’s where I am confused.

#

If you see the COM port in Device Manager, then serial monitor would be able to connect.

#

and just to verify, you have a ESP32-S3-TFT-Feather?

silver stirrup
#

Yes

sharp turret
#

Do you have another terminal program like putty or Real Term?

silver stirrup
#

yes putty

sharp turret
#

Can putty open the port?

silver stirrup
#

No putty cannot open the port either when in Bootloader mode or when a sketch is running.

lethal yarrow
#

Sometimes serial just breaks on Windows. Try unplugging it, rebooting, and then plugging into a different USB port.

#

And make sure it actually reboots, because "fast startup" can screw with things.

silver stirrup
#

Ok thanks for the assistance. I have to quit for the day now. Maybe I'll try using a Linux box or a Mac and see if that makes and difference.

north stream
#

With Linux, you can use udev to assign a fixed device name to a piece of hardware, which is quite handy.

tawdry bobcat
#

Hello! Not really an arduino question but I’m using the arduino core for nrf52840 and am trying to set up OTA but uploading the zip file doesn’t work and results in an error that I’m not targeting the board type

silver stirrup
#

The solution to my problems uploading to the ESP32-S3-TFT-Feather and then viewing the Serial Monitor is three settings in the Arduino IDE Tools menu:

  1. USB CDC on Boot: Enabled
  2. USB Mode: Hardware CDC and JTAG
  3. Upload mode: UART0 / Hardware CDC
quartz oracle
#

will an Adafruit CLUE board work with a BNO085 sensor board using I2C? Thanks!~

stable forge
quartz oracle
#

Hey Dan, just got back from the hospital. Caught COVID at the hospital so I just got home from an extended stay, 2 days ago and the BNO085 was waiting for me. I wanted to try it out and the only thing that had I2C ports I wasn’t using was the CLUE so I threw some Arduino code together based on the code on the Adafruit site.
What's strange is Arduino is telling me the port is in use but. the only thing connected is the CLUE and when I do a "board info" from the tools menu It shows the CLUE.
I don't have anything except Arduino IDE running. No terminal or anything else. I'm using the code on the Adafruit learn page for the BNO085. Here's the error:

#

Sketch uses 58480 bytes (7%) of program storage space. Maximum is 815104 bytes.
Global variables use 9148 bytes (3%) of dynamic memory, leaving 228420 bytes for local variables. Maximum is 237568 bytes.
Upgrading target on /dev/cu.usbmodem101 with DFU package /Users/joebanko/Library/Caches/arduino/sketches/E65B8CDB73A3112F38E04F5EF9E25475/Clue_BNO085.ino.zip. Flow control is disabled, Single bank, Touch disabled
Timed out waiting for acknowledgement from device.

Failed to upgrade target. Error is: Attempting to use a port that is not open

Possible causes:

  • Selected Bootloader version does not match the one on Bluefruit device.
    Please upgrade the Bootloader or select correct version in Tools->Bootloader.
  • Baud rate must be 115200, Flow control must be off.
  • Target is not in DFU mode. Ground DFU pin and RESET and release both to enter DFU mode.
    Traceback (most recent call last):
    File "main.py", line 296, in serial
    File "dfu/dfu.py", line 235, in dfu_send_images
    File "dfu/dfu.py", line 203, in _dfu_send_image
    File "dfu/dfu_transport_serial.py", line 155, in send_init_packet
    File "dfu/dfu_transport_serial.py", line 241, in send_packet
    File "serial/serialposix.py", line 615, in write
    serial.serialutil.PortNotOpenError: Attempting to use a port that is not open
quartz oracle
#

off to PT. back in a couple of hours...

limber blaze
runic quarry
#

Is there a way to tell what version of ESP-IDF is being used by the ESP32 Board Manager version 3.1.1? I see evidence it's 5.3 in the 3.1.1 tag on Github, but I'd like something more authoritative.

sharp turret
runic quarry
#

Also, what I'm starting from is the version string "3.1.1" in the Arduino IDE.

#

There's a tag for that in the repo, fine

#

The comment in the release note title is helpful, but if that were missing, what might tell me? That's what I mean by authoritative. What the the build system choose, so I don't have to rely on the person who did the release to document it?

runic quarry
#

I'm suddenly having weird issues with reliably flashing this ESP32-S3 (Adafruit MatrixPortal S3) I have. Whether or not I put it into BOOT mode, I get

Connecting......................................

A fatal error occurred: Failed to connect to ESP32-S3: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
Failed uploading: uploading error: exit status 2

I can usually clear it by manually calling esptool.py erase_flash, but that's a pain because Arduino grabs the port and I have to take annoying steps to make it let go

#

Oh actually using sudo when erasing it fixes that particular issue, but it's still a pain to just try to interate within the IDE

stable forge
runic quarry
cunning cloud
#

Has anyone tested the ArduinoBLE library with the ESP32-S3 Feather? I've been working with that library on a couple ESP32 Feather V2 boards, and my project eventually needs USB-HID support. The idea is that an S3 would be a Peripheral-based BLE Transmitter connected to a computer that the other ESP32 boards, as Centrals, would write to.

runic quarry
dusk orchid
# runic quarry That works at run time, and I suppose I can grep the sources inside the Arduino ...

Yeah they've been pretty religious about mentioning the IDF version in release title, but also the System PR section of what's changed always links the latest arduino-lib-builder / idf version including components, like https://github.com/espressif/arduino-esp32/pull/10599

GitHub

lib-builder: release/v5.3 1f52459
esp-idf: release/v5.3 a0f798cfc4
arduino: idf-release/v5.3 b318409f
tinyusb: master a8903d315
chmorgan__esp-libhelix-mp3: 1.0.3
espressif__cbor: 0.6.0~1
espressif_...

naive gull
#

Hi, I asked the following question in the hw-design channel a couple of days ago but maybe this one is more appropriate. I greatly appreciate any help and direction.

Due to "circumstances", I need to try using the UPDI/Reset/PA0 pin on the ATtiny816 as an analog input. I believe this is possible using the High Voltage UPDI Friend for programming. Normally, I'd use 'ss.analogRead(PIN_NUMBER)' with the Seesaw library, but is there a 'PIN_NUMBER' for the UPDI pin? Is this possible, even with Seesaw firmware modifications?

leaden walrus
naive gull
#

Nope, the ATtiny is still set up for low-voltage programming. I mentioned the HV programmer because the store page says it's needed when using the UPDI pin as reset/GPIO, which is what I'm trying to do. I've followed the instructions to edit boards.txt so the Arduino IDE lets me configure the UPDI pin as such. My issue is figuring out how to reference the UPDI/PA0 pin after I re-upload the Seesaw firmware. I can reference other pins (like PA1 as pin 14, as I tried to mark up in the attached screenshot), but what pin number would PA0 be now? Or, is it possible to modify the ATtiny's Seesaw firmware to let me reference it with a pin number? The reason I'm doing this is because my board only has the UPDI pin exposed, and I now need to read an analog voltage, which it wasn't originally designed to do.

leaden walrus
#

oh. ok. hmm....wonder if thats even possible in seesaw firmware. let me look.

#

and can be easily re-programmed using arduino - it supports updi uploading

#

PA0 = 0

inland gorge
#

Yeah I think removing that zero from INVALID_GPIO could work. At first glance I don't see any other blockages. I'd try doing a digitalRead on PA0 with a button to see if that works, then try analogRead

north stream
naive gull
#

Thank you all immensely! That is exactly what I needed. I will give it a go!

leaden walrus
#

yep, that's my understanding also, even though i've never used HV or re-assigned the UPDI pin

#

HV helps get you out of the situation where if you do change the UPDI pin, HV is the only way to get back in

polar imp
#

Please help, I just got my pico and I'm trying to get it to work with the tutorial but I wired the screen to different SPI pins (I had to, I'm using a plain pico and the tutorial was made for the 2040 feather variation of the pico), but I thought this wouldn't be a problem because according to the documentation, any SPI pins should be able to be configured appropriately, but in the script in the tutorial, it doesn't specify the SPI pins, it seems to rely on some built-in Adafruit configuration.

Please help, how do I convert this tutorial script to work on the plain pico?
The tutorial script: https://learn.adafruit.com/mini-gif-players/coding-the-mini-gif-players

Play your favorite GIFs on a Mini Screen

#

the tutorial is in Arduino script so I was pointed to this channel to ask for help

river yacht
#

Does anyone have experience with listening to a J1939 network with a feather CAN M4? I'm using the adafruit library, I am getting some of the broadcast messages from the network but they seem kind of disjointed like I'm not parsing them correctly.

eternal cloud
polar imp
# eternal cloud Then you should be able to use the SPI object in the display init call https://g...

So I would un-comment out one of those variable-declaration blocks... would it be the one under the if !defined(ESP8266) ? on line 27?
And then the first commented line, does it need any changing? I'm not sure if it's asking for something by saying " @brief Instantiate Adafruit ST7789 driver with selectable hardware SPI" I'm not familiar with @brief. And my only other question is would I just say &SPI0 (since I'm using GP20 thru 18 where it says 'pointer to an spi' in the line "@param spiClass Pointer to an SPI device to use (e.g. &SPI1)"

eternal cloud
#

And you don't need to change the library at all, just the call to the display init in the learn guide code

#

Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST); should be Adafruit_ST7789 tft = Adafruit_ST7789(&SPI, TFT_CS, TFT_DC, TFT_RST); and add your pin definitions before.

It might work without changing the call at all, just by selecting the correct pins, since I think SPI is used by default

Edit: the object is SPI, not SPI0.

polar imp
polar imp
eternal cloud
leaden walrus
#

pin_size_t is just the variable type to the function parameter pin

#

yep, just pass integer pin number

#

add those SPI.set calls before this line:

Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);
#

no need to alter that call. don't need to add the &SPI reference

#

the library will use SPI by default. and the calls to SPI.set() will set what those pins are

#

not need for the Feather since it has known specific pins used for SPI

polar imp
leaden walrus
#

the gif code is arduino, not circuitpython

polar imp
leaden walrus
#

do you have arduino setup already? and tested uploading a basic sketch to the pico?

polar imp
#

hmm I haven't tested a basic sketch from arduino IDE, I just got a test working on circuitpython through Mu.
I installed the arduino IDE, and it recognizes the pico but beyond that, i don't think I've done anything else on the arduino side. Do I need to do anything else to get it going?

leaden walrus
#

that should be enough to try a basic upload

#

you'll need to install some arduino libraries for the ani gif project

#

but for now, try just uploading a simple sketch to verify the general arduino setup is working

#
int count = 0;

void main() {
  Serial.begin(115200);
}

void loop() {
  Serial.print("count = ");
  Serial.println(count++);
  delay(1000);
}
#

upload that, open serial monitor, verify can see the serial prints going by

leaden walrus
#

oops. yah. i typed that in without verifying since i'm not setup right now.

#

one sec

#

oh. duh. setup not main. sry.

#
int count = 0;

void setup() {
  Serial.begin(115200);
}

void loop() {
  Serial.print("count = ");
  Serial.println(count++);
  delay(1000);
}
polar imp
leaden walrus
#

is the pico showing up in the com port list?

#

Tools -> Port

polar imp
#

yes here's a screenshot

polar imp
leaden walrus
#

mu was probably interfering with the com port access

#

so, yah, close mu

#

there should be more output for an upload

#

that looks like just a verify

polar imp
#

nope, just tried it again, I'm for sure hitting the upload button and it says "Done uploading" in a pop-up in the bottom right (too fast to take a screenshot)

leaden walrus
#

ok. maybe it did. try opening serial monitor.

polar imp
#

how do i do that

eternal cloud
#

you don't get a drive when the code is in arduino, so that's fine

leaden walrus
#

Tools -> Serial Monitor

#

or toolbar bar

polar imp
#

looks like it's working there

leaden walrus
#

yep. working.

#

so basic arduino usage is good

#

now back to the gif guide...

#

the mixed use of circuitpython and arduino is potentially confusing

#

CP is only being used as an easy way to load .gifs onto the pico

#

since CP firmware presents the pico as a CIRCUITPY folder you can easily drag/drop .gif files onto

#

but once the .gifs are copied, you switch to arduino

polar imp
#

I see, and the gifs remain but inaccessible after that switch to Arduino? I already put a gif while in circuitPy mode

eternal cloud
#

it's accesible to the arduino code

leaden walrus
#

"inaccessible" to your PC - like you won't see a folder or the files anymore

eternal cloud
#

you don't see them

leaden walrus
#

but...yah...what snakey just said

polar imp
#

makes sense, so it's there, just I can't touch it after the change to arduino

leaden walrus
#

yep

solemn cliff
#

there's a version of the gif player that shows a drive (but uses CP to format it)

leaden walrus
#

to add more, etc. you'd reload circuitpython to get the CIRCUITPY folder back

polar imp
#

ok, so from here, it looks like I just need these libraries. Is there an easy way to get them all at once?

leaden walrus
#

yah, i'm looking at the guide now....

#

it doesn't provide info on installing the libs it uses

#
#include <AnimatedGIF.h>
#include <SdFat.h>
#include <Adafruit_SPIFlash.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ST7735.h> // Hardware-specific library for ST7735
#include <Adafruit_ST7789.h> // Hardware-specific library for ST7789
polar imp
leaden walrus
#

can't install them all at once, but can use the Arduino library manager to install them

leaden walrus
#

Tools -> Manage Libraries...

#

SPIFlash will also bring in SdFat library (say "yes" to any "install dependencies?" like questions)

#

i think if you install those three libraries, that will get what you need

polar imp
#

After doing that I clicked Verify and got this error message:

In file included from C:\Users\convo\Documents\Arduino\gettingTheScreenToWork\gettingTheScreenToWork.ino:3:0:
c:\Users\convo\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:37:2: error: #error USE_BLOCK_DEVICE_INTERFACE must be defined to 1 in SdFatConfig.h. Make sure you use the Adafruit Fork at 'https://github.com/adafruit/SdFat'
#error USE_BLOCK_DEVICE_INTERFACE must be defined to 1 in SdFatConfig.h. Make sure you use the Adafruit Fork at 'https://github.com/adafruit/SdFat'
^~~~~
In file included from C:\Users\convo\Documents\Arduino\gettingTheScreenToWork\gettingTheScreenToWork.ino:3:0:
c:\Users\convo\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:54:2: error: #error FAT12_SUPPORT must be set to 1 in SdFat SdFatConfig.h. Make sure you use the Adafruit Fork at 'https://github.com/adafruit/SdFat'
#error FAT12_SUPPORT must be set to 1 in SdFat SdFatConfig.h. Make sure you use the Adafruit Fork at 'https://github.com/adafruit/SdFat'
^~~~~
exit status 1

Compilation error: exit status 1

leaden walrus
#

ok. one sec. ive got arduino up now. let me check.

#

im not getting that

#

double check you sdfat library. make sure its the fork.

polar imp
leaden walrus
#

both are installed. remove the top one.

polar imp
#

Now I'm getting errors from the code we added earlier ([ ](#help-with-arduino message)):

C:\Users\convo\Documents\Arduino\gettingTheScreenToWork\gettingTheScreenToWork.ino:62:1: error: 'SPI' does not name a type
SPI.setSCK(18);
^~~
C:\Users\convo\Documents\Arduino\gettingTheScreenToWork\gettingTheScreenToWork.ino:63:1: error: 'SPI' does not name a type
SPI.setTX(19);
^~~
C:\Users\convo\Documents\Arduino\gettingTheScreenToWork\gettingTheScreenToWork.ino:64:1: error: 'SPI' does not name a type
SPI.setRX(20);
^~~
C:\Users\convo\Documents\Arduino\gettingTheScreenToWork\gettingTheScreenToWork.ino:65:1: error: 'SPI' does not name a type
SPI.setCS(5);
^~~

#

there's more but it's too long to send on discord

leaden walrus
#

comment out those lines just to verify the original sketch compiles ok

polar imp
#

not sure what's happening here

#

it looks like it doesn't recognize printf but idk if it's supposed to be that way or not

leaden walrus
#

not sure

polar imp
#

just checked and the tutorial has it written that way on the site so it's not a copy/paste formatting error

leaden walrus
#

yep. but im not getting those errors.

#

so not sure whats different with your setup

eternal cloud
leaden walrus
#

yes

eternal cloud
#

i think there are multiple arduino cores

#

maybe they have different implementation

leaden walrus
#

there are

polar imp
#

I don't follow, what does that mean?

leaden walrus
#

check what you have installed

#

this icon brings up the board manager

polar imp
# leaden walrus

I don't have that installed but I'm on a plain pico.

When I click that, this is what comes up

leaden walrus
#

type "rp2040" in the filter search

polar imp
eternal cloud
#

yep, got different core

leaden walrus
#

remove that one. install the last one.

polar imp
leaden walrus
eternal cloud
#

yes, the raspberry pi one

leaden walrus
#

aka the "philhower" one

polar imp
#

installed that, uninstalled the other one I had, and now when I verify it stops right away and gives this error

leaden walrus
#

may need to reselect board?

polar imp
#

did that, re-verifying... it's taking longer so I think we're passed that error which is good

#

now this error:
In file included from C:\Users\convo\Documents\Arduino\gettingTheScreenToWork\gettingTheScreenToWork.ino:3:
c:\Users\convo\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:37:2: error: #error USE_BLOCK_DEVICE_INTERFACE must be defined to 1 in SdFatConfig.h. Make sure you use the Adafruit Fork at 'https://github.com/adafruit/SdFat'
37 | #error USE_BLOCK_DEVICE_INTERFACE must be defined to 1 in SdFatConfig.h. Make sure you use the Adafruit Fork at 'https://github.com/adafruit/SdFat'
| ^~~~~
c:\Users\convo\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:54:2: error: #error FAT12_SUPPORT must be set to 1 in SdFat SdFatConfig.h. Make sure you use the Adafruit Fork at 'https://github.com/adafruit/SdFat'
54 | #error FAT12_SUPPORT must be set to 1 in SdFat SdFatConfig.h. Make sure you use the Adafruit Fork at 'https://github.com/adafruit/SdFat'
| ^~~~~
exit status 1

Compilation error: exit status 1

#

this looks similar to the error from before

eternal cloud
#

didn't this get fixed earlier?

polar imp
#

yeah but it's back, oddly. Do I need to reinstall the library?

eternal cloud
#

check if you don't still have both sdfat libraries

polar imp
eternal cloud
#

huh... 🤔

polar imp
#

i reinstalled it and am reverifying

#

getting the same error

leaden walrus
#

weird

#

maybe manually delete it?

#

not sure whats different with your setup at this point

eternal cloud
#

yea, at this point i'm going with "try turning it off and then back on again"

polar imp
#

maybe I should do a reinstall of arduino IDE? I might've said no to the first pop-up asking for permissions because it was unintelligible last night.

eternal cloud
#

just try restarting it first, might have gotten confused over the core change

leaden walrus
#

check manually what is in this folder
c:\Users\convo\Documents\Arduino\libraries\

polar imp
#

so close and reopen the program?

leaden walrus
#

like what all folders have "SDfat" in the name?

leaden walrus
#

but yah, just close / reopen arduino

#

(maybe something cached?)

polar imp
#

I see there's sd and sdfat, is one of them a baddie?

leaden walrus
#

no. that looks ok.

#

dunno

#

close arduino

#

delete SdFat_-_Adafruit_Fork folder

#

run arduino

#

reinstall

#

also delete Adafruit_SPIFlash folder

#

and reinstall

polar imp
#

same error with deleting sdfat manually and reinstalling after reopening arduino ide.
I'll try deleting adafruit_spiflash, but I'm wondering if maybe it's hiding on the circuitpython side? maybe a bad version of it was installed on that side and that's why it's still giving errors?

leaden walrus
#

no arduino libraries would be in the circuitpy file system

#

maybe just delete all those folders and reinstall

#

just need to install three libraries (scroll back), others will come in as deps

polar imp
# leaden walrus just need to install three libraries (scroll back), others will come in as deps

I noticed that with spiflash, it said it needed to install sdfat since it was missing but it wasn't, at that moment I had just reinstalled sdfat and verified it was in the folder, so maybe that's a clue to the issue at hand?

spiflash needs sdfat adafruit fork but it doesn't recognize the sdfat adafruit fork that's installed separately.

and deleting sdfat adafruit fork and just letting spiflash install it along with itself gives the same error

polar imp
leaden walrus
polar imp
#

right but should it recognize that I already had that or would it still warn me it needs it and ask to install it again, because it did that

still going to delete all the libs and install just those 3 you mentioned

leaden walrus
#

hmm...yah...any pre-existing folder might confuse it

eternal cloud
#

you could also try to delete the project, and just create a new .ino

polar imp
#

Still getting this immortal error
In file included from C:\Users\convo\Documents\Arduino\gettingTheScreenToWork\gettingTheScreenToWork.ino:3:
c:\Users\convo\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:37:2: error: #error USE_BLOCK_DEVICE_INTERFACE must be defined to 1 in SdFatConfig.h. Make sure you use the Adafruit Fork at 'https://github.com/adafruit/SdFat'
37 | #error USE_BLOCK_DEVICE_INTERFACE must be defined to 1 in SdFatConfig.h. Make sure you use the Adafruit Fork at 'https://github.com/adafruit/SdFat'
| ^~~~~
c:\Users\convo\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:54:2: error: #error FAT12_SUPPORT must be set to 1 in SdFat SdFatConfig.h. Make sure you use the Adafruit Fork at 'https://github.com/adafruit/SdFat'
54 | #error FAT12_SUPPORT must be set to 1 in SdFat SdFatConfig.h. Make sure you use the Adafruit Fork at 'https://github.com/adafruit/SdFat'
| ^~~~~
exit status 1

Compilation error: exit status 1

eternal cloud
#

the code, it's in a .ino file and sits in the gettingTheScreenToWork folder ?

#

just delete the whole project and recreate it in the IDE (save your text code changes first)

polar imp
eternal cloud
#

yep

#

and when you save the new sketch, it will be in a folder with the same name as the sketch, cos that's how the IDE works 🤷‍♀️

polar imp
#

I just verified the code in a new sketch and it still gave the error. I could try saving it if there's a good reason you think that part of the process might fix it

leaden walrus
#

compare your file c:\Users\convo\Documents\Arduino\libraries\SdFat_-_Adafruit_Fork\src\SdFatConfig.h

#

check line 37

polar imp
leaden walrus
#

no idea

solemn cliff
#

I would look for where another SdFatConfig.h file might be ?

leaden walrus
#

try turning on verbose output

#

and check what library it actually uses

polar imp
leaden walrus
#

check both boxes there

#

then recompile

#

in the output, look for a line like Multiple libraries were found for "SdFat.h"

polar imp
#

compiling now...

leaden walrus
#

can also look for line like that

polar imp
#

I don't see a Using Library line. Just a lot of compiling libraries with 2 potentially interesting errors:
(the second one came before the first one pictured)

The lines for the libraries themselves are humongous but I don't see multiple sdfats in there.
... can't really tell what is sdfat in there actually. 3rd pic is showing the very end of the lines so you see it's not very obvious what's sdfat since a few mention it near the end but don't end with it

leaden walrus
#

how did this end up with a .cpp extension?

#

you made a new skech, and then saved it as gettingTheScreenToWork ?

polar imp
#

I went back to the original when the new sketch didn't show anything different.

leaden walrus
#

not sure what that means

polar imp
# leaden walrus not sure what that means

I went back to the gettingTheScreenToWork sketch instead of saving the new sketch with the copy/pasted code in it because it sounded like the new sketch didn't offer any solution to the problem and that saving it would just be another thing to delete later. If it makes a difference I could make a new sketch again and verify in there but I don't see what difference a new sketch makes, what are we hoping it does?

#

Because I already made a new sketch and copy/pasted and tested that and got the same error.

leaden walrus
#

try again with a new sketch. i'm not sure what you have for your current sketches.

#

and the sketch code, for now, should be same as from guide, no changes

eternal cloud
#

we were hoping it would delete all the potential cached data errors ... and it's better if you save it locally first

#

also, your sketch really should not have the .cpp extension

polar imp
leaden walrus
#

^^ yep. just give it a name when saving it

#

no extensions

polar imp
leaden walrus
#

arduino will make a foo folder and save it as foo.ino in that folder

#

foo = sketch name

polar imp
#

I copy/pasted straight from the website into a new sketch and verified that and got the same error. Saved as foo and verifying again now.
Same error.

leaden walrus
#

dunno. your arduino setup is in some weird state.

#

might be easeist to try starting over on a second PC

#

or trying to start from scratch on that PC

polar imp
#

are these libs stored on the pico ever or are they just on the pc? When it compiles and uploads, does it put them on there or does it compile it all together in a file that gets overwritten each time it gets uploaded to?

leaden walrus
#

just pc

polar imp
#

ok I'll try this on another pc and see

leaden walrus
#

remember to install the philhower core (not the mbed os one)

#

and then for the library install, same as was attempted above - those three with others brought in as deps

polar imp
#

i don't know what that is, i didn't see "philower" on there but Iremember you mentioned that was what something's sometimes called

leaden walrus
#

it's the authors name

polar imp
leaden walrus
#

looks like the Arduino IDE 2 hides that info

polar imp
#

yeah, didn't see it on there

leaden walrus
#

it's that one though

#

the other two (don't install) have "Mbed OS" in the name

eternal cloud
leaden walrus
#

what's shown in screen caps above

eternal cloud
#

i just tested on new install and i get same error 🤔

#

no other sdfat libraries

leaden walrus
#

hmmm

polar imp
leaden walrus
#

yah. i'm not getting the compile error.

#

but not sure whats different

#

afaict i'm latest version with everything. BSP and libs.

#

from my compile output:

Using library AnimatedGIF at version 2.1.1 in folder: /home/user/Arduino/libraries/AnimatedGIF 
Using library SdFat - Adafruit Fork at version 2.2.3 in folder: /home/user/Arduino/libraries/SdFat_-_Adafruit_Fork 
Using library SPI at version 1.0 in folder: /home/user/.arduino15/packages/rp2040/hardware/rp2040/4.2.0/libraries/SPI 
Using library Adafruit SPIFlash at version 5.0.1 in folder: /home/user/Arduino/libraries/Adafruit_SPIFlash 
Using library Adafruit GFX Library at version 1.11.11 in folder: /home/user/Arduino/libraries/Adafruit_GFX_Library 
Using library Adafruit BusIO at version 1.17.0 in folder: /home/user/Arduino/libraries/Adafruit_BusIO 
Using library Wire at version 1.0 in folder: /home/user/.arduino15/packages/rp2040/hardware/rp2040/4.2.0/libraries/Wire 
Using library Adafruit ST7735 and ST7789 Library at version 1.11.0 in folder: /home/user/Arduino/libraries/Adafruit_ST7735_and_ST7789_Library 
#

and this seems like some other issue. before it even tries to compile the libs. but could be related.

dusk orchid
#

It looks like you might be on an old core copy, maybe left over and you don't have the board manager urls added?
Earle Core's latest release should be 4.4.3 not 4.2.0.
There was a problem with Adafruit SDFat having conflicting defines for us on wippersnapper with v4.4.2, so we pinned at 4.4.1
My board urls are:
https://adafruit.github.io/arduino-board-index/package_adafruit_index.json,https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json,https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json

leaden walrus
#

oh...indeed. let me update that.

dusk orchid
#

We've not retested with latest 4.4.3, still building with 4.4.1

leaden walrus
#

i got the urls in 1.8.19....i haven't started using 2.x yet (it does not have the urls)

#

was using 2.x to match whats being done here

#

and didnt consider 2.x not having the bsp urls 😦

dusk orchid
#

The latest v2 allows you to abort compiles, about time one might say...

eternal cloud
#

was wondering why @polar imp changed core, and suddenly crazy error... 4.4.1 builds fine does NOT build fine, but gives different error 😅

leaden walrus
#

@dusk orchid is there an open issue for that?

polar imp
eternal cloud
#

different version

dusk orchid
leaden walrus
#

ok. i'm getting the error now.

#

so it's the bsp.

#

@polar imp try reinstalling the BSP but an older version

eternal cloud
#

uninstall 4.4.3 and you can select from drop down list another version ... 4.4.1 gives

polar imp
#

gives... ? so 4.4.1 is the one to use or should it be older?

eternal cloud
#
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007644 (most recent call first):
Multiple libraries were found for "SdFat.h"
  Used: C:\Users\\Documents\Arduino\libraries\SdFat_-_Adafruit_Fork
  Not used: C:\Users\\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\4.4.1\libraries\ESP8266SdFat

polar imp
#

oh, that's not good

eternal cloud
polar imp
#

so something older then

leaden walrus
#

(i was using 4.2.0 - no reason other than that was what i had)

#

but it compiled

dusk orchid
leaden walrus
#

it compiled OK for me with 4.4.1 BSP

#

@polar imp try that ^^

polar imp
#

going back to computer 1. I tried it on 4.3 on a different computer and it seemed to verify without errors. Will try 4.4.1 on main pc since being most up to date is probably best

eternal cloud
#

4.4.0 compiles for me

polar imp
#

4.4.0 gave me the sdfat error on my main pc

#

going to 4.3 since that worked on my other pc

#

hmm on main pc getting this error now

#

..I think I'll go back to the other computer and continue trying to make this work from there since we got at least passed the verification stage on there

eternal cloud
polar imp
eternal cloud
#

if you select different versions from the drop-down, it will say either "install" or "update" if that version is not installed

#

"remove" if it is

polar imp
#

I'll check that out when I'm back on the main computer. Since I got the verification to work of the tutorial script on this pc, I'll just try to get this working on here for now.

Now, when putting back the code modification of specifying the SPIs (Since there's no point uploading to it as-is straight from the tutorial since it won't know the spi connectors, right?) it just gives this error for each of the SPI designation lines:
"error: 'SPI' does not name a type; did you mean 'PI'?
66 | SPI.setSCK(18);
| ^~~"

I had followed the suggestion of using SPI.setSCK(18); etc for each of the pins one after another, put right before the line that goes "Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);"

leaden walrus
#

my info on that was wrong

eternal cloud
#

you most likely need to add an #include <SPI.h> at the start, since it was not needed / used in the guide code

leaden walrus
#

those lines need to be in setup()

polar imp
leaden walrus
#

add before this line

  tft.init(DISPLAY_HEIGHT, DISPLAY_WIDTH);
#

line 244

polar imp
#

put them there. indented one indent over. compiling...
i'll try adding the include Snakey mentioned if this fails, but I assume that's another library to hunt down?

eternal cloud
#

no, it's included in the core

polar imp
#

oh! it compiled without error. the verification worked! so I guess all that's left to do now is upload and see if it works... holds breath

#

It said it uploaded successfully but the display isn't displaying anything (I know the display works after re-wiring it because I tested it this morning in circuitpython so I know I have the correct pins now and that the screen, at least on the hardware side of this, works).

The animated gif was put on it last night and according to the tutorial i didn't need to specify a file name or path in the code if put at the root when in circuitPy mode (idk what you call it, circuitPython... folder... drive... mode?)

Any way to check that's still there or is there something in the code that makes it so the gif actually does need to be specified?

eternal cloud
#

check the serial console, the code has some prints

polar imp
#

holy-! When I opened serial monitor, it popped up on the display! The width and height probably need to be tweaked but it's there and it's animating!

Why didn't that pop up earlier? Will there be any issues using this away from pc on a litho battery?

eternal cloud
#

oh, yea, it was probably waiting for the serial connection, that makes it look like it's frozen

#

you need to comment out the prints and reupload to run it on battery

#

and everything about serial

#

like Serial.begin(115200); while (!Serial);

solemn cliff
#

do you just need to comment out the while ?

polar imp
eternal cloud
#

try with the while first

solemn cliff
#

while (!Serial); waits for the PC serial monitor connection

eternal cloud
#

yea, this one

polar imp
#

ok so the one in setup

eternal cloud
#

yea

#

that's the one blocking the code

#

it just waits forever for a serial connection

polar imp
#

reuploading...

#

hmm hard to tell if that worked or if it was just playing cuz the serial monitor was still in the ide even if not open at that moment. I closed the monitor and am trying it again

#

ok awesome! now I just need to tweak either the gif itself or the display size to get the gif to display without cropping, right?

eternal cloud
#

yep!

polar imp
#

oh, to make changes to the gif to fix that size issue, how do I access it? I'd need to get back to circuitPy folder-mode right? how do I do that non-destructively?

eternal cloud
#

you just reinstall circuitpython, change the files as wanted

#

then come back and reupload the arduino code (which is why it's best to save the sketch on the computer, to have the code and settings for next time)

#

circuitpython and arduino installations do "destroy" each other, but the data on flash should be safe barring any errors

polar imp
#

if I could just rotate the gif 90 degrees in this script that might solve the issue too hmmm what would be easiest

eternal cloud
polar imp
#

I...was not

solemn cliff
eternal cloud
polar imp
eternal cloud
#

it needs to be adapted, for sure, but yea, it will work

solemn cliff
#

yeah just setup the display instead of board.DISPLAY

#

it uses a button too, so you can remove that or change it to a pin on your board

polar imp
polar imp
#

oh you mean under width and height put the pixel width/height?

solemn cliff
#

I'm talking about the Circuitpython one, if the board doesn't have a builtin display you have to set it up with the display's driver library

polar imp
eternal cloud
#

(with your pins defined,like you posted in CircuitPython channel earlier)

polar imp
sinful flare
#

Does anyone good c or c++ pfc RFID lib exist that doesn't get stuck

#

I think I found one actually nvm

noble gull
#

I'm trying to make my ESP32-S3 Reverse TFT Feather into a character LCD simulator using LVGL (and UnifontEX as the font. I chose the S3 so I could have the 2MiB of RAM that the font needs), but I installed CircuitPython trying to go for the Weather Station example to work from and can't reset the board

#

I last worked with Arduino IDE in 2014

#

(Also funny seeing you here but that's besides the point)

noble gull
#

Also the factory reset firmware doesn't work

solemn cliff
#

if you have trouble getting into UF2 bootloader mode with double pressing reset, you can press reset, then D0 (which is the boot button) when the LED is purple

noble gull
#

I can get to that mode, but the factory reset uf2 never works

stable forge
#

I loaded the factory-reset UF2 and got the above.

#

Make sure your board is a REVERSE TFT S3 and not the regular one, or an S2.

noble gull
#

It's the right board but it doesn't display anything

#

It almost seems stuck in bootloader mode

#

Unfortunately I'm at uni right now and can't do further tests until I get home in several hours

buoyant sphinx
#

Got a weird issue here that I could really use help decyphering. I'm trying to use the multi-core support within arduino-pico (https://arduino-pico.readthedocs.io/en/latest/multicore.html#communicating-between-cores), but I'm getting consistently unexpected values when popping from the fifo. Thought it may be some sort of bit shift/flip, but that doesn't seem to line up. Any idea why this would be happening?

core1:
rp2040.fifo.push(3000);
// 00000000 00000000 00001011 10111000

core0:
rp2040.fifo.pop() == 3758157184
// 11100000 00000000 11101101 10000000

(all variables I'm using in this process are uint32__t)

#

It must be something in the rest of my code. The following test works:

#
void setup() {
  Serial.begin(115200);
  while (!rp2040.fifo.available()) { }
  uint32_t value = rp2040.fifo.pop();
  Serial.print("Received = ");
  Serial.println(value);
}

void setup1() {
  delay(1000);
  uint32_t value = 3000;
  Serial.print("Sent = ");
  Serial.println(value);
  rp2040.fifo.push(value);
}

void loop() { }
void loop1() { }

// Result:
// Sent = 3000
// Received = 3000
#

Sorry 🤷

sinful flare
sinful flare
#

it doesn't work tho lol

#

it's busted

#

i think

#

whatever

sinful flare
inland gorge
buoyant sphinx
buoyant sphinx
red warren
#

hi, i recently flash circuitpython on my nano esp32 but i wanna go back to previous firmware is there any way to do it?

odd fjord
dawn verge
#

Hello, Has anyone tried to make the adafruit mini gif player from YouTube?

I have the code, it’s on their page and GitHub, you only have to download the libraries but it gives me an comp error, I think it is bc one drive

It uses circuit python for the gifs, sorry I’m new at this

solemn cliff
#

with the error your posted in the other channel, I believe the issue is the same as what was talked in that discussion: #help-with-arduino message (pointing to the end)

odd fjord
#

That was messy....

solemn cliff
#

there's like 2 issues I believe ? one is to make sure you have the adafruit version of the SDFat library, the other being that the RP2040 earphilower board support package needs to be set to 4.4.1 because .2 and .3 have an issue with those defines

#

that's my take from it, I might have it wrong

dawn verge
#

Thanks!!!!!

#

I’ll try it

#

It’s my first time doing this things

dawn verge
solemn cliff
#

that's fine

river yacht
#

I have a question... on the can m4 with the single on board neopixel, if I'm listening to a can network at 250k and I set the neopixel color before I process the message and again after I process the message how much time am I adding? Is it enough to potentially miss a message?

north stream
#

At 250k? It seems like it to me. The NeoPixels use a serial protocol too, 800k or so, and have to send at least 32 bits (maybe more?) even for a single NeoPixel. You might be better off with a separate direct drive LED or DotStar style one, which supports a much faster protocol.

gilded swift
magic vine
#

how do i fix my neopixels turning on with specific colors when my esp32-wrover-b starts up? im using ws2812 rgb leds with the type being NEO_GRB + NEO_KHZ800.
i can change the pixels just fine after the device started up, but everytime it starts up it turns on with specific colors, and i cant seem to stop it with clear(); or setPixelColor(0..2, 0, 0, 0, 0); then show();.

i also tried waiting for canShow() to be true before calling show();, but that didnt work
the only hacky solution that sort of works is that i need to call clear(); show(); 2 times, but i can see the light turn on for a split second when the device starts.

pixels = Adafruit_NeoPixel(LED_COUNT /* 3 */, LED_PIN /* 13 */, NEO_GRB + NEO_KHZ800);
pixels.begin();

for (int i = 0; i < 2; ++i) {
  pixels.clear();
  while (!pixels.canShow);
  pixels.show();
}
woven glen
#

How does it not find my sensor

#

BNO 055

north stream
#

Have you tried an I2C scan?

stable forge
# woven glen

It doesn't look like the headers are soldered. You won't get good connections without soldered headers

woven glen
# north stream Have you tried an I2C scan?

yes : I2C-apparaat gevonden op adres 0x74!
I2C-apparaat gevonden op adres 0x75!
I2C-apparaat gevonden op adres 0x76!
I2C-apparaat gevonden op adres 0x77!
I2C-apparaat gevonden op adres 0x78!
I2C-apparaat gevonden op adres 0x79!
I2C-apparaat gevonden op adres 0x7A!
I2C-apparaat gevonden op adres 0x7B!
I2C-apparaat gevonden op adres 0x7C!
I2C-apparaat gevonden op adres 0x7D!
I2C-apparaat gevonden op adres 0x7E!
I2C-scan voltooid.

woven glen
#

so I have to do this for the feather m0 and the bno055

stable forge
#

yes. There are also specific directions in the Learn Guide for each part about soldering the headers.

#

If you have not done soldering before, take it slowly. Use good electronics solder, not plumbing solder, a good iron, and don't use acid flux if you use flux

woven glen
#

thanks will look for it

#

pffff why isn't this already done in advance :'/

stable forge
#

the STEMMA/QT sockets are the things on each end of the BNO055

woven glen
#

But like this and can't connect on the feather

stable forge
#

so at least you don't have to use solder on both ends

woven glen
stable forge
#

buying which?

woven glen
#

Feather RP

stable forge
#

yah sure, if you want that form factor and the battery connector/charger circuitry

woven glen
#

Yeah. I chose feather m0 because for this data storage and battery feature

stable forge
#

note for Arduino the best is the philhower Arduino core

woven glen
#

When was this released?

#

Alsof cheaper than feather m0 😭

stable forge
#

august 2024 i think

#

and more capable

woven glen
#

Ah, 2 months before I bought

#

Atleast I did my research good

woven glen
stable forge
#

It's the "Board Support Package" you would download into the Arduino IDE to use RP2040 boards

#

also you can use CircuitPython to program these boards

woven glen
#

And is there a better motion sensor on the market? Now I have the BNO055

stable forge
#

that's fine to use for now

woven glen
#

Thx for the help!

woven glen
fickle ice
#

Hey, so after updating the adafruit GFX library after calling the drawRGBbitmap method the program crashes. The error i get is the following

Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core  1 register dump:
PC      : 0x4203ebf4  PS      : 0x00060530  A0      : 0x82009274  A1      : 0x3fca5580  
A2      : 0x00000010  A3      : 0x00000000  A4      : 0x000003c0  A5      : 0x0000000f  
A6      : 0x00000000  A7      : 0x00000040  A8      : 0x60024000  A9      : 0x00000000  
A10     : 0x00000000  A11     : 0x00000000  A12     : 0x000000f0  A13     : 0x00000010  
A14     : 0x00000040  A15     : 0x00000000  SAR     : 0x0000000e  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x40056f08  LEND    : 0x40056f12  LCOUNT  : 0x00000000  
Backtrace: 0x4203ebf1:0x3fca5580 0x42009271:0x3fca55b0 0x4200a0dd:0x3fca55d0 0x4200a20d:0x3fca55f0 0x420062cc:0x3fca5640 0x42011c1a:0x3fca56a0 0x4037d546:0x3fca56c0

Before updating the library the method worked fine, and i call it as follows:

tft.drawRGBBitmap(0,0, canvas.getBuffer() , 480, 320)

Any help is appreciated. The screen im using is the adafruit 3.5'' TFT screen

stable forge
stable forge
viral perch
#

i need help with feather rp2040 with usb host a on arduino when i upload a sketch for exemple a blink test the usb host a get disabled unless i factory reset it i need help

tame seal
leaden walrus
magic vine
#

it's in the message that i replied to, it's exactly the same code that my project uses

solemn cliff
magic vine
# solemn cliff you say they start with specific colors, is it before your code runs or even wit...

if i don't initialize the neopixels, the lights just stay off as intended, but when I initialize it, they start with random but specific colors (same colors every time it runs, but unknown why these colors are shown). my other code cant be interfering with it, cause when i set the type to NEO_RGB, the lights do stay off on start and they do turn on when i tell it to, but the colors are not right.

solemn cliff
#

so if you just do pixels.begin(); it does that ?

viral perch
#

I developed a HID mouse logger that directly forwards mouse reports from a USB host to a connected PC with minimal latency and fast response time but i cant get the scroll up and down working any contributors from main adafruit?

#

the serial prints.

#

tested on rp2040 with usb host.

gentle oyster
#

hi can someone help me with my sensor. It seems like it can detect invalid temperature

gentle oyster
gentle oyster
#

hello, can anyone help me?

north stream
#

Could be a communication problem

gentle oyster
#

cause I thought it is caused by the pins that I solder

north stream
#

I really don't have enough information to say. It could be a soldering/wiring problem, it could be a power supply issue, or interference, or something in one of the code libraries. My usual approach is to divide the problem into smaller pieces and get them to work individually.

gentle oyster
#

well I definitely used my esp32 power supply and it is connected properly, so I guess it's not it.

#

I'm not sure if I solder it properly. Is this okay?

#

I'm not sure if I accidentally make a mistake

leaden walrus
#

what is alphaa.py? what's the host controller? (looks like a pc?)

gentle oyster
#

are you reffering to the microcontroller I used?

leaden walrus
#

yes. or whatever is running alphaa.py and the MLX is connected to

gentle oyster
#

I use ESP32 the generic one

leaden walrus
gentle oyster
#

I run it in with command prompt

leaden walrus
#

the command prompt is where? that doesn't seem to be on the ESP32 itself.

#

your setup is confusing. need more info.

gentle oyster
#

I used thonny ide for running the esp32, adafruit mlx90640, my sim800l module and relay module. For the alphaa.py, I used command prompt to run the code so I can view the thermal image from the sensor through using my pc

leaden walrus
#

whats running on the ESP32?

gentle oyster
#

wait I think it's beyond my knowledge, what do you mean by that?

leaden walrus
#

some form of software must be running on the ESP32 to interface with the MLX

#

and you would have loaded that program onto the ESP32 at some point

#

are you using arduino? or circuitpython? or something else?

gentle oyster
#

I program my esp32 with micropython

leaden walrus
#

is arduino being used at all?

gentle oyster
#

wdym by that?

leaden walrus
#

well. that's probably a no. if you were using arduino, you would have installed the arduino ide and other stuff.

#

asking since we are currently in an arduino channel

#

let's move this conversation to #help-with-projects (since you using micropython and not circuitpython)

fair horizon
#

A while ago I told you about an ESP32-2424S012 watch
It keeps giving me errors because I spent several days trying to put an image or something similar and I wasn't able to, I was only able to print a Hello world and that's something that's fine, but I want to do more things

magic vine
#

also sorry for the late reply

viral perch
#

if anyone have a solution to read mouse scroll wheel up down for rp2040 with usb host post it.

north stream
#

What fields are in the mouse report frame?

viral perch
#

A standard USB mouse report frame usually contains the following fields:
Button states
X-axis movement
Y-axis movement
Wheel movement (scroll wheel) but cant get it working

north stream
#

So what happens? Are the wheel values set in the frame?

viral perch
north stream
#

Hmm, so it may be a mouse problem, not a decoding problem

viral perch
#

i tested with 5 diffrent mouse including dell old mouses

tardy iron
#

does the mouse wheel work when plugged directly into the host?

viral perch
#

yes

#

examples/DualRole/HID/hid_mouse_log_filter in windows

tardy iron
#

it might depend on whether the USB host mode on the RP2040 is putting it in boot mode

viral perch
#

its not about boot mode. the mouse moves all perfect even scroll click except scroll up and down.

#

i dunno

tardy iron
#

so HID reports theoretically have to be interpreted according to what the device reports as its report descriptor, unless it’s in boot mode. i wouldn’t be surprised if a host mode report descriptor parser had some quirks

viral perch
#

The report descriptor parser has quirks, like not properly reporting scroll up/down events even though the data updates.

#

try to test it and if you find a solution let me know.

north stream
#

To test it, I'd need a Pico, a USB mouse with a scroll wheel, a USB wiring adaptor, and some time and energy. I lack at least one of these.

tardy iron
#

sorry, probably won’t get to it for a while. i lack the relevant hardware. i could probably find such bugs by inspection if i had additional reasons to be looking at that code

north stream
#

That boot comment may be relevant: it could be the mouse needs to be sent some sort of configuration command to enable scroll wheel reporting

viral perch
#

uh i thought you had an Adafruit RP2040 with USB host to test it.

atomic prairie
#

Any chance someone here has has success making an esp32-s3 a composite hid device with CDC communications? I have only been able to get one or the other working not both together through the same port

safe shell
#

CDC uses two of the four pairs, each composite HID uses one pair. Perhaps something else is configured, or present by default and needs to be explicitly disabled?

viral perch
#

who made adafruit tinyusb library?

safe shell
#

31 contributors

viral perch
viral perch
#

the probleme persist with adafruit tiny usb it doesnt send the full correct mouse data of scroll wheel

fickle ice
#

Hey, i'm trying to create a GFXcanvas16 object on My arduino code globally (outside of setup) but i get a null pointer when i try to access it during the setup section. Do i need to do something else to access it on setup?

eternal cloud
fickle ice
mortal ridge
#

If I am trying to power my ESP32 from a battery (3.6v or 7.4v). I have both buck and boost for whatever battery I use. What is the general concensus for which power bus I should inject the power into? On arduinos it had a default VIN, but esp doesn't. Is it best practice to regulate my voltage to 5v and go on the 5v bus, or 3.3v and inject on the 3.3v? Also what are the specs on regulation for each system and is more robust in terms of spikes or fluctuation?

stable forge
livid osprey
mortal ridge
#

ESP32-E devkitC

#

Official model

#

The one on the buck or boost I'll say is inevitable because you need to regulate somehow.

livid osprey
#

The devkit doesn't need 5V, that's just what it typically gets from the USB port. The port is diode protected, so there's little risk of backpowering, and the only place the 5V goes to after the diode is that pin and the AMS1117-3.3.

#

Oh, and an LED, which could be a problem for 12V....

#

Looks like the current limiter is 2k, so even with 8.4V into the 5V pin, you get (8.4-2)/2000 = 3.2 mA? Doesn't seem to be a problem.

#

I'd generally use the more efficient regulator to 5V, and connect that to the 5V pin, but honestly the 7.4 may very well just work directly as well.

north stream
solemn cliff
buoyant sphinx
#

Any advice on a decently accurate and efficient FFT library for Arduino? I'm working with rp2040/2350 using arduino-pico, and I'm currently working with ArduinoFFT, but I'm aware of Adafruit_ZeroFFT. Is ZeroFFT completely M0+ specific? I tried installing the library from the library manager, but it required a lot of dependencies that I'm not interested in.

#

My current goal is root frequency detection, btw.

north stream
buoyant sphinx
forest granite
#

Hi All,

I have a matrix portal s3 I'm using to run 2 32 LED matrices. I'm seeing some weird behavior in arduino IDE. It will start on one COM port, I will be able to upload, then it will switch to another COM port after the upload and I'm unable to upload.

On win11 x64
IDE 2.3.4

Assume I've tried everything but a factory reset/firmware update because I can't get webserial to connect. Happy to share all the troubleshooting I've done so far, it's just a long list

buoyant sphinx
# north stream Depending on what you want to detect, something like the Goertzel algorithm migh...

I've been reading up more on this algorithm, and I think I better understand its purposes. I don't actually think it will work for me, because I am looking to identify a tone with an unknown frequency rather than a pre-determined one. However, if the algorithm could be modified to be sensitive to the octaves of a base frequency as well, then I could potentially find a use for it. Ie: a tone at 220, 440, 880, etc would all produce a similar magnitude if the base frequency is 110.

eternal cloud
# forest granite Hi All, I have a matrix portal s3 I'm using to run 2 32 LED matrices. I'm seei...

There are always 2 com ports, one for code loading mode, and one for code running. Usually arduino IDE can swap between modes automatically, but sometimes it doesn't work -- and there seems to be more issues with esp32-s3 in particular

north stream
forest granite
buoyant sphinx
runic quarry
#

In an effort to debug some issues on my MatrixPortal S3, I'm trying to run my code on different boards, including the ESP32-C6 DevKitC1. Unfortunately, when I select that board in the Arduino IDE, it fails to compile:

In file included from /Users/rmann/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.4-bcb3c32d-v1/esp32c6/include/esp_system/include/esp_task.h:24,
                 from /Users/rmann/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.4-bcb3c32d-v1/esp32c6/include/lwip/port/include/lwipopts.h:20,
                 from /Users/rmann/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.4-bcb3c32d-v1/esp32c6/include/lwip/lwip/src/include/lwip/opt.h:51,
                 from /Users/rmann/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.4-bcb3c32d-v1/esp32c6/include/lwip/lwip/src/include/lwip/ip_addr.h:40,
                 from /Users/rmann/Library/Arduino15/packages/esp32/hardware/esp32/3.2.0-RC1/cores/esp32/IPAddress.h:25,
                 from /Users/rmann/Documents/Arduino/libraries/Async_TCP/src/AsyncTCP.h:10,
                 from /Users/rmann/Documents/Arduino/libraries/RESTServer/src/ESPAsyncWebSocketClient.h:10,
                 from /Users/rmann/Documents/Arduino/libraries/RESTServer/src/ESPAsyncWebSocketClient.cpp:3:
/Users/rmann/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.4-bcb3c32d-v1/esp32c6/include/freertos/FreeRTOS-Kernel/include/freertos/FreeRTOS.h:139:6: error: #error Missing definition: configNUMBER_OF_CORES must be defined in FreeRTOSConfig.h
  139 |     #error Missing definition:  configNUMBER_OF_CORES must be defined in FreeRTOSConfig.h
      |      ^~~~~
/Users/rmann/Library/Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.4-bcb3c32d-v1/esp32c6/include/freertos/FreeRTOS-Kernel/include/freertos/FreeRTOS.h:153:6: error: #error configNUMBER_OF_CORES must be defined to either 1 or > 1.
  153 |     #error configNUMBER_OF_CORES must be defined to either 1 or > 1.
      |      ^~~~~

That's defined in Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.4-bcb3c32d-v1/esp32c6/include/freertos/config/include/freertos/FreeRTOSConfig.h:98, which depends on CONFIG_FREERTOS_NUMBER_OF_CORES, which is defined in Arduino15/packages/esp32/tools/esp32-arduino-libs/idf-release_v5.4-bcb3c32d-v1/esp32c6/qio_qspi/include/sdkconfig.h:911.

runic quarry
#

I've spent a couple of hours trying to track down why this error ocurs; it's baffling. FreeRTOS.h include FreeRTOSConfig.h includes sdkconfig.h, and I don't see any conditional compilation statements. I wrote a dead-simple file test.cpp that only has #include "freertos/FreeRTOS.h", and put some #error statements in various places in the code, like before and after the #include "FreeRTOSConfig.h" statement. The #error directives next to the include generate output, but not the ones inside the included file. wut.

#

I think I've figured it out. For some reason, the Arduino IDE is adding an include path to the SAMD21 version of FreeRTOS.

runic quarry
#

I think having the slightly broken FreeRTOS installation was avoiding another problem, as now I'm running into an IDF run-time error with code that was working fine before. A while back I added PDM input support on ESP32-S3 to CircuitPython, but then had to switch my project to Arduino because of performance issues. I implemented a new PDM input library based on what I learned doing the CP implementation, and it was working great. Then I cleaned up my Arduino installation (last few messages), and now all of a sudden I get run-time errors in my ESP-IDF PDM setup calls:

22:21:46.702 -> E (2938) gdma: gdma_register_rx_event_callbacks(513): user context not in internal RAM
22:21:46.702 -> E (2939) i2s_common: i2s_init_dma_intr(809): Register rx callback failed
22:21:46.702 -> E (2939) i2s_pdm: i2s_channel_init_pdm_rx_mode(485): initialize dma interrupt failed
22:21:46.702 -> i2s_channel_init_pdm_rx_mode() failed with 258: ESP_ERR_INVALID_ARG

This is happening in the i2s_channel_init_pdm_rx_mode() call (code here), which is internally setting up some DMA callbacks (this is before my own call to the queue overflow callback). I can't figure out how to get it to put things in the right RAM.

Any ideas?

GitHub

A simple asynchronous PDM input library for ESP microcontrollers. - JetForMe/esp-pdm

tardy zealot
#

Anyone have LVGL insight? I have an issue with my Arduino code with LVGL 8.3 libraries. https://forum.lvgl.io/t/objects-was-not-declared-in-this-scope-error-esp32s3-arduino-ide-lvgl-8-3-eez-studio-0-15-1/20480

viral perch
#

help mouse scroll up and down not working using hid_mouse_tremor_filter.ino exemple of Adafruit_TinyUSB_Arduino

dusk orchid
# viral perch help mouse scroll up and down not working using `hid_mouse_tremor_filter.ino` ex...

Try this, it works for me, it's a modified version (lines 119-124 plus include on line 33) of the HID Device Report example in the parent folder where your tremor one came from (link in file comment). examples/DualRole/HID/hid_device_report/hid_device_report.ino Running on Adafruit RP2040 Feather with USB Host, I'm using a logitech M150 mouse, and I see the W value change when scrolled.
https://gist.github.com/tyeth/8f1ad51c3616e7e22a91d4596a897cfe

I had to install pio-usb library (https://github.com/sekigon-gonnoc/Pico-PIO-USB), or an error about missing pio_usb.h, but presumably you may already have done so.
Also I'm on latest for everything, i.e. 4.5.0 of Earle Philhower arduino core for rp2040, and v3.4.3 of Adafruit TinyUSB Arduino.

viral perch
dusk orchid
# viral perch

Ah what a shame, there may be issues with some types of (composite?) devices etc. Can't offer much more advice I'm afraid.
I half read about a boot version for HID devices, like a boot mouse mode and keyboard mode for when your pc is starting up (like for BIOS setup screens), maybe it mentioned it in the tremor one or another example.

#

You also might not see the wheel and x/y change at same time necessarily so check the logs carefully (or avoid moving the mouse in x/y)

viral perch
#

i checked all working and the scroll shows 0 always

#

i tried also in diffrent computer and it does not work

dusk orchid
#

You could change the code to print something if the new_report.w is not equal to zero

viral perch
dusk orchid
#

Might be worth trying a different style of mouse, if they were still easily around I'd say buy a logitech M150 mouse (wireless with dongle), and test it. You might be able to find the difference, or at least have a project working with one mouse.
Otherwise you need to get into more complexity (what and how I don't know), which is unlikely to be done for you already.

viral perch
dusk orchid
#

Can't offer anything else sadly...The only other interesting thing was my mouse appears to connect/mount twice, and I did hear some devices connect first as one type then if not interacted with by host within set period they reconnect as second style of same device.
You might be able to go deep down the rabbit hole and see about such things

#

Curious, and you've updated the libraries and arduino core to latest?
Maybe some remapper or something like that could better show what your devices are doing. Todbot linked you to a good one worth playing with: https://github.com/jfedor2/hid-remapper

viral perch
#

yes i updated it to lastest, i guess it only works on 1 out of 50 mices

#

yes it works with hid remapper

dusk orchid
#

ok great!

viral perch
#

but its just .uf2

dusk orchid
#

now you can look at the code there on github and explore how it does the recognition, or ask in that repository maybe (but you will need to eventually get your hands dirty and understand if you then want to fix it for tinyusb or circuitpython)

dusk orchid
viral perch
#

can you link me the c++ code

#

ok i guess i need to port that code to arduino and see if it works

viral perch
#

i made an entire project for mouse and still cant find the solution for it the root cause seems to be the reported data i think its filtered.

tawny sage
#

hi, ive been trying to display text on 2 8*16 matrix displays but it always appears jumbled up

#

not sure why, data in is going to data out

#

im using an arduino mega

#

im also new to this so help would be appreciated

livid osprey
tawny sage
#

#include <Wire.h>
#include <RTClib.h>
#include <Adafruit_NeoMatrix.h>
#include <Adafruit_GFX.h>

#define LED_PIN 53
#define MATRIX_WIDTH 32 // 2 matrices side by side (16 + 16)
#define MATRIX_HEIGHT 8 // height is 8 for both matrices

RTC_DS3231 rtc; // Initialize the RTC module
Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(MATRIX_WIDTH, MATRIX_HEIGHT, LED_PIN, NEO_GRB + NEO_KHZ800);

int countdownMinutes = 10; // Set the countdown minutes
int countdownSeconds = 0; // Set the countdown seconds

void setup() {
matrix.begin();
matrix.setBrightness(10); // Adjust brightness for visibility
matrix.clear();

// Initialize RTC
if (!rtc.begin()) {
matrix.fillScreen(matrix.Color(255, 0, 0)); // Red if RTC is not connected
matrix.show();
while (1);
}

if (rtc.lostPower()) {
rtc.adjust(DateTime(F(DATE), F(TIME))); // Set the RTC to the time the code was compiled
}

matrix.setTextWrap(false); // Disable text wrapping
matrix.setTextColor(matrix.Color(255, 255, 255)); // Set text color to white
}

void loop() {
// Check if the countdown is over
if (countdownMinutes == 0 && countdownSeconds == 0) {
matrix.fillScreen(matrix.Color(255, 0, 0)); // Red screen for "TIME'S UP!"
matrix.setCursor(0, 0);
matrix.print("TIME'S UP!");
matrix.show();
delay(2000); // Display for 2 seconds
return; // Stop the countdown
}

// Format the countdown time as mm:ss
String countdownString = String(countdownMinutes) + ":" + String(countdownSeconds);

matrix.fillScreen(0); // Clear the matrix
matrix.setCursor(0, 0); // Set cursor to top-left corner
matrix.print(countdownString); // Display the countdown

matrix.show(); // Update the matrix display

// Decrease the countdown time by 1 second
delay(1000); // Wait for 1 second

// Update the seconds
if (countdownSeconds > 0) {
countdownSeconds--;
} else {
if (countdownMinutes > 0) {
countdownMinutes--;
countdownSeconds = 10; // Reset seconds to 59
}
}
}

tawny sage
#

don't know if that's of any help

leaden walrus
#

set LED_COUNT to 128 and verify the first panel lights up entirely

tawny sage
#

yes, both panels light up entirely ive checked them both

#

patterns run perfectly its just when i try to display time

leaden walrus
#

is there info available on the panels?

tawny sage
#

it scrambles it up

tawny sage
leaden walrus
#

product page? schematic?

tawny sage
#

they're custom made

#

by my lab ta

#

dont have a schematic but i do know what each pin represents

leaden walrus
#

do you know how the rows are connected?

eternal cloud
#

not just the end pins

tawny sage
#

ah i see

leaden walrus
#

"progressive" vs "zigzag" layout using the terms from that guide

tawny sage
#

yeah ive come across those terms before

#

would i need the schematics or could i just test it using code?

leaden walrus
#

you could test with code

#

could loop lighting up one LED at a time and watch progression

#

or light up some specific indexes

#

like 0 and 8

tawny sage
#

do i test just the one matrix or both matrix

leaden walrus
#

just work with a single panel for now

tawny sage
#

got it, thanks

#

ok its a zigzag

leaden walrus
tawny sage
leaden walrus
#

nope, just use it

#

idea is you logically OR the various options to describe the physical layout of your specific panel

#

like shown in the guide:

Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(5, 8, 6,
  NEO_MATRIX_TOP     + NEO_MATRIX_RIGHT +
  NEO_MATRIX_COLUMNS + NEO_MATRIX_PROGRESSIVE,
  NEO_GRB            + NEO_KHZ800);
#

and guide has some discussion about that as well

#

scroll down to where it says "The next argument is the interesting one."

#

the code is using + , which is effectively same as ORing

tawny sage
#

so by ORing all of those, it determines the location of the first pixel?

leaden walrus
#

it determines various things. like how the rows are connected.

tawny sage
#

oh yeah the zigzag too

leaden walrus
#

but also orientation, pixel color order, frequency, etc.

#

so you'd want to add NEO_MATRIX_ZIGZAG to your code

#

and possibly others

#

but at least NEO_MATRIX_ZIGZAG so it knows how the rows are connected

tawny sage
#

got it ill mess around with it using those

#

yeah

#

Thanks!

leaden walrus
#

neopixels (ws2812b, etc) are always just one long string of LEDs

#

all the work to treat the string as a 2D matrix is done in code

#

by that library

tawny sage
#

would you suggest to get it working on one of the matrix first before adding the other?

leaden walrus
#

i think knowing that helps to understand what's being done via the library options

#

yah, work with one first, then move to the tiled setup

tawny sage
#

alright, thanks again

tawny sage
#

Ive got it working on one display, thanks cater!

#

issue im facing now is when i tile them it jumbles up again, do i continue doing the same thing with the args? also it turns out i didnt need the NEO_MATRIX_ZIGZAG

leaden walrus
#

and may need to play around with the various options that are added up

tawny sage
#

ty

viral perch
leaden ruin
#

I am losing my mind and could use some help. This should be super simple but I cannot for the life of me figure it out. I've created a matrix out of a strip of neopixel LEDs. When I use the Adafruit_Neopixel.h library, this code works just as expected:

  strip.fill(strip.Color(255, 215, 0));
  strip.show();                          
  setMode(NOOP);
}

However, when I switch to using Adafruit_NeoMatrix.h and try using:

  matrix.fillScreen(matrix.Color(255, 215, 0));
  matrix.show();                          
  setMode(NOOP);
}```
I get random colors.  The first is always a fill of the expected color, but subsequent calls can fill it with something entirely different.  This is using an ESP32 and the Arduino programming environment.  Any ideas?
livid osprey
leaden ruin
#
  NEO_MATRIX_BOTTOM     + NEO_MATRIX_RIGHT +
  NEO_MATRIX_ROWS + NEO_MATRIX_ZIGZAG,
  NEO_RGB            + NEO_KHZ800);```
cursive crescent
#

I copied this code from a video where it was How to control a servo motor with a joystick. The code does indeed work really well, but in the video he doesn’t explain how it works. So can someone explain the code to me.

stable forge
cursive crescent
#

Thanks

stray apex
#

Hello, Im working on my first C++ project including a SCD30 CO2 Sensor board (from Adafruit) that's controlled by an ESP8266 wroom02 over I2C (I2C Ports are getting switched between a display and the Sensor). Currently Im trying to implement a solution for the fact that the first reading is not giving back a real value and that there is no reading before the whole interval is over (Which in my case is 60 seconds). My plan to solve this is by just setting the the interval for the first 2 readings (Or alternatively the first 5 Seconds) to 2 seconds and afterwards to the normal interval of 60 seconds automatically. And that would work, the problem now is, that it does not work when I do a "Cold-start" of the Controller, it only works when I'm uploading the compiled code and having a soft start. I tried many different things now, delays, different function call orders etc. and nothing seems to work, it feels like the Sensor is set to the speed of 60 seconds even before that function is called. Maybe somebody here has an Idea why this might be the case and maybe even knows a way to solve this (Or at least can tell me if its a hardware defined 'difficulty'). Thank you in advance 🙂

solemn cliff
#

it does not work when I do a "Cold-start" of the Controller
It's unclear to me what the bad behavior is
is setting the interval to 2 seconds what doesn't work ? (as in the interval isn't 2 seconds)

#

or are you getting a bad value when you expected a good one ?

stray apex
#

Exactly the interval cannot be set

#

Well it looks like its set (the command goes through) but the sensor doesn't use it (as it would be visible by the shining light)

eternal cloud
stray apex
#
#include <Arduino.h>
#include <SensorDataReceiver-CO2-Temp-Hum.h>
#include <DisplayDriver.h>
#include <Wire.h>
#include <string>

// put function declarations here:
//int myFunction(int, int);
std::string OldData = "Test";
bool Coldstart = true;
int MeasurementIntervallInSec = -1;
int DesiredMeasurementIntervallInSec = 60;

void setup() {
  Serial.begin(115200);
//  while (!Serial) delay(10);     // will pause Zero, Leonardo, etc until serial console opens
  InitializeSensor();
  OtherSettings();
  delay(200);
  DisplayInitialize();
  delay(200);
}

void loop() {
  if (Coldstart == true)
  {
    SetSpeed(2);
    delay(5000);
    Coldstart = false;
    MeasurementIntervallInSec = GetSpeed();
  }
  else if (!Coldstart && MeasurementIntervallInSec != DesiredMeasurementIntervallInSec)
  {
    SetSpeed(DesiredMeasurementIntervallInSec);
    delay(200);
    MeasurementIntervallInSec = GetSpeed();
  }

  // put your main code here, to run repeatedly:
  std::string Data = ReadData().c_str();
  if (Data != OldData && Data != "FALSE") {
    Serial.println("IF DATA TRUE");
    DisplayValues(Data);
    OldData = Data;
  }
}

I tried it here even with the if else statement
I hope it doesn't look too messy, like I said, its my first C++ project 😅

#
void InitializeSensor() {
  Wire.begin(4, 5);
  delay(50);
  Serial.println("Adafruit SCD30 Sensor adjustment test!");
  // Try to initialize!
  if (!scd30.begin()) {
    Serial.println("Failed to find SCD30 chip");
    while (1) { delay(10); }
  }
  Serial.println("SCD30 Found!");
}
void SetSpeed(int IntervallinSec){
  Wire.begin(4, 5);
  delay(50);
  /*** Adjust the rate at which measurements are taken, from 2-1800 seconds */
  if (!scd30.setMeasurementInterval(IntervallinSec)) {
    Serial.println("Failed to set measurement interval");
    while(1){ delay(10);}
  }
  GetSpeed();
  Serial.println("(SetSpeed)");
}

int GetSpeed() {
  Wire.begin(4, 5);
  delay(50);
  Serial.print("Measurement interval: ");
  int Speed = scd30.getMeasurementInterval();
  Serial.print(Speed);
  Serial.println(" seconds");
  return Speed;
}
stray apex
sinful flare
#

Either give it time to heat or ignore the first couple readings till they return a nonzero value

eternal cloud
viscid trail
#

Hoi, will esp32 be strong enough to be a midi "instrument" processor for piezo elements? As i got an idea for a whack project, but need to find out if it would be able to process a full drumkit, and maybe power a loudspeaker.

sinful flare
sinful flare
#

If you optimize

#

Just used fixed point

sinful flare
#

You'll be fine

viscid trail
#

Cause i was more thinking of not using garage band on a mac, but a software i install on top that handles the processing and translation to midi drums being all on-device. And need to find out how beefy device i'd need :P

sinful flare
#

But otherwise you're probably fine

viscid trail
viscid trail
#

Gotcha. Also, for esp32's, i see a good few different looking ones on ali, what's the main difference between them? Just different components? Or some being able to handle higher power and such?

sinful flare
#

Don't get the 2666 it sucks

viscid trail
#

Sounded like a threat, but just a random joke x)

#

Holy hecc, esp32's has tensorflow now? o.O

sinful flare
viscid trail
# sinful flare But should it lamfo

If it wasn't for the uber smol storage and ram, i'd be tempted to install a super tiny llm/image gen kek Image gen as in capable of a few pixels sprite xD

viscid trail
#

I mean, give it enough ram and storage to hold a model, with time, it could lol

sinful flare
#

waits 200 h
Output: " Your code sucks"

viscid trail
#

Yep xD

sinful flare
#

Pain but funny

viscid trail
#

Yep lol. Could you link to the esp32's you'd recommend? Can only seem to find 20+ buck ones.

sinful flare
#

Buy a 3pack

viscid trail
#

Ah, as the ones on ali are 2-5 buck range :P And wanna also find out what makes them that cheap, as well as what makes adafruit's cost 20.

#

Oh nvm, gpt provided the answer lol. QC, support, no shady components/manufacturer rejects and whatnot

sinful flare
#

Buy sensors from them

#

No Chinese lie sensors

viscid trail
#

What?

#

And why not chips?

sinful flare
viscid trail
sinful flare
#

Amazon prime lol

viscid trail
#

Ah, no prime eligible for me lol

sinful flare
#

What are you

woven temple
#

Hello ! I have a problem with my arduino nano 33 ble rev2.
I am new to arduino, and I encountered a problem with trying to simply light on a led.
I appears that I am able to trigger all the pins on one side (from D13 to D21) but not on the other side (D2 to D12)

Here is my code :

import machine
import time

p15 = machine.Pin(15, machine.Pin.OUT)

p15.on()

When I put "15" it works, but when I put "12" my led does not emit light

solemn cliff
woven temple
#

Well if it is the case then the pins on one side are delivering the opposite of the other side

#

Seems strange to me

solemn cliff
#

can you show your wiring maybe ?

woven temple
#

I can

#

Mmh wait

#

Now it does not work on pin 14

#

I have 2 questions then

#

1 ) are my numbers correct (am I suppose to type "14" to control D14)
2) does just executing "pin.on()" without a loop puts on the pin on just for a short moment or for a long time ?

#

Just to be sure that my tests are fair

solemn cliff
#

that's a good question, I believe that Micropython will keep the pin in the same state until you reset, as for the pin numbers I don't know

woven temple
#

Well in fact the 13 triggers the pin D13

solemn cliff
#

I think you can use pin names with strings ? like Pin("A1")

woven temple
#

Oh I will try that

#

But I'm not sure

woven temple
#

It works

#

I mean the string naming works

#

That's practical

#

And now it works fine !

#

Thank you !

sick aspen
#

hii, I have this feather esp32-s2 with the stemmaqt ano rotary encoder with buttons, and I'm trying to make a USB HID device. The default sketch for the rotary encoder works fine, and it recognizes the stemmaqt input but when I try the sketch below, it triggers the "seesaw not found at default address" error. I can't figure out what I'm doing wrong, code below 🙏🏻

#

#include "USB.h"
#include "USBHIDMouse.h"
#include "USBHIDKeyboard.h"
USBHIDMouse Mouse;
USBHIDKeyboard Keyboard;

// set pin numbers for the five buttons:
#include "Adafruit_seesaw.h"

#define SS_SWITCH_SELECT 1
#define SS_SWITCH_UP     2
#define SS_SWITCH_LEFT   3
#define SS_SWITCH_DOWN   4
#define SS_SWITCH_RIGHT  5

#define SEESAW_ADDR      0x49

Adafruit_seesaw ss;
int32_t encoder_position;

void setup() {  // initialize the buttons' inputs:

  Serial.begin(115200);
  while (!Serial) delay(10);

  Serial.println("Looking for seesaw!");

  if (! ss.begin(SEESAW_ADDR)) {
    Serial.println("Couldn't find seesaw on default address");
    while(1) delay(10);
  }
  Serial.println("seesaw started");
  uint32_t version = ((ss.getVersion() >> 16) & 0xFFFF);
  if (version  != 5740){
    Serial.print("Wrong firmware loaded? ");
    Serial.println(version);
    while(1) delay(10);
  }
  Serial.println("Found Product 5740");

  ss.pinMode(SS_SWITCH_UP, INPUT_PULLUP);
  ss.pinMode(SS_SWITCH_DOWN, INPUT_PULLUP);
  ss.pinMode(SS_SWITCH_LEFT, INPUT_PULLUP);
  ss.pinMode(SS_SWITCH_RIGHT, INPUT_PULLUP);
  ss.pinMode(SS_SWITCH_SELECT, INPUT_PULLUP);

  encoder_position = ss.getEncoderPosition();

  Serial.println("Turning on interrupts");
  ss.enableEncoderInterrupt();
  ss.setGPIOInterrupts((uint32_t)1 << SS_SWITCH_UP, 1);

  Keyboard.begin();
  USB.begin();
}

void loop() {
  // use the pushbuttons to control the keyboard:
  if (! ss.digitalRead(SS_SWITCH_UP)) {
    Keyboard.write('u');
  }
  [ETC ETC]

  int32_t new_position = ss.getEncoderPosition();

  if (encoder_position != new_position) {
    if (new_position > encoder_position) {
      Keyboard.write(']');
    } else {
      Keyboard.write('[');
    }
    encoder_position = new_position;
    delay(100);
  }

  delay(5);
}
eternal cloud
#

are you using the Stemma QT connector ?

stable forge
stable forge
sick aspen
#

and i basically just mashed together that example script verbatim with the keyboard & usb libraries

#

but yes headed to studio & will start by trying an i2c scanner sketch, but its still confusing that it would have no problem finding the device with the example script but once i add the usb / keyboard it cant find it

stable forge
sick aspen
#

ahhhh ok!!

stable forge
#

I don't know why the ANO sketch worked if that wasn't included. But that is to turn on the power at the STEMMA_I2C socket. If you were wiring it up not with STEMMA, but powered separately then that might work

sick aspen
stable forge
#

What board are you choosing in Arduino? Adafuit Feather ESP32-S2?

sick aspen
#

im flashing to the dev module

#

in the docs it said dont ever flash firmware on anything but that?

stable forge
#

could you point to where it says that? You should choose the board in the drop-down