#help-with-arduino

1 messages · Page 8 of 1

lament dune
#

i do think i figured it out tho, i found an old arduino forum post about it

covert vigil
#

Any suggestions to correctly connect the data point with the expected pin?

#

Im a bit clueless at the moment 😅

cedar mountain
north stream
#

The pin to bit mapping presumably would depend on the port mapping, but I haven't looked into it.

thorny cedar
#

It doesn't work..

byte data = SERCOM4->SPI.DATA.reg;

tacit jewel
#

what ethernet shields are compattible with the arduino zero

west stone
#

I am trying to upload arduino code to my ESP32-S2 Feather using PlatformIO in Visual Studio Code but I always get the following error after the script is 100% uploaded:

WARNING: ESP32-S2FNR2 (revision v0.0) chip was placed into download mode using GPIO0.
esptool.py can not exit the download mode over USB. To run the app, reset the chip manually

I tried playing around with the reset and the boot button but I never got it working, only showing up as a drive in windows or having all leds blinking or with no lighting at all (in this mode it also shows up as COM port)

north stream
#

Perhaps you need to change the level on GPIO0?

whole dagger
#

Mystery arduino problem: I'm programming a weather station board, and it's supposed to record the wind speed every x minutes (set to 1 for testing). The problem is that the program will print the number of wind clicks (since the wind speed sensor outputs one click per cycle) correctly, but it won't print the actual wind speed. Instead it just prints 0.00 as the value of windSpeed. Code

wind[0]=wind[0]+windClicks;
  Serial.println(windClicks);
  windSpeed=(windClicks/((millis()-lastTime)/1000))*2.4; //km/h=(clicks/(elapsed time(ms)/1000))*conversion factor
  Serial.println(windSpeed);
  rain[0]=rain[0]+rainClicks;
  rainfall=rainClicks*0.2794; //mm
  rainClicks=0;
  windGustSpeed=(1/windGustTime)*2.4;```
cedar mountain
cedar mountain
#

Easiest way would be to multiply by 2.4 first and then divide afterwards.

whole dagger
#

OK

lament dune
#

I am using the SoftWire library to use software i2c with a bme680, i saw in an adafruit forum post that you have to modify the library in order to get them to work together, i tried to do that and now i am getting “error: expected primary-expression at end of input”

cedar mountain
quick maple
lament dune
#

i changed it from Adafruit_BME680(TwoWire *theWire = &Wire); to Adafruit_BME680(SoftWire *theWire = &SoftWire);

#

does that look right?

cedar mountain
# lament dune does that look right?

No, that looks suspicious if SoftWire is both the class name and the object name. You probably should leave off the = &SoftWire part and pass in your own software I2C instance when you initialize it in your code.

slate badger
slate badger
# slate badger

tldr: Compilation error: 'Adafruit_Arcada' does not name a type; did you mean 'Adafruit_SPITFT'?

slate badger
#

@stable forge sorry for the ping but earlier you said the chips were almost identical. What am i missing? the code seems very different.

stable forge
tardy verge
#

Hiya! I need help with Arduino’s IOT Cloud - I searched, but didn’t see this answered: When are the onVariableChange functions called? When I put a magnet up to this hall sensor, the connected “led” on the dashboard lights up, but onHall1Change() isn’t firing, and i don’t understand why.

#include "thingProperties.h"
const int hallPin1 = 7;
int hallState;

void setup() {
  // Initialize serial and wait for port to open:
  Serial.begin(9600);
  // This delay gives the chance to wait for a Serial Monitor without blocking if none is found
  delay(1500); 
  
  pinMode(hallPin1, INPUT_PULLUP);
  pinMode(LED_BUILTIN, OUTPUT);

  // Defined in thingProperties.h
  initProperties();

  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
  
  /*
     The following function allows you to obtain more information
     related to the state of network and IoT Cloud connection and errors
     the higher number the more granular information you’ll get.
     The default is 0 (only errors).
     Maximum is 4
 */
  setDebugMessageLevel(2);
  ArduinoCloud.printDebugInfo();
}

void loop() {
  ArduinoCloud.update();
  // Your code here 
  hallState = !digitalRead(hallPin1);
  if (hallState) {
    hall1 = true;
  } else {
  hall1 = false;
  }
}


/*
  Since Hall1 is READ_WRITE variable, onHall1Change() is
  executed every time a new value is received from IoT Cloud.
*/
void onHall1Change()  {
  // Add your code here to act upon Hall1 change
  digitalWrite(LED_BUILTIN, hallState);
}


slate badger
#

I apologize. I misremmebered what you had said: "The ESP32-S2 and -S3 feathers are basically identical"

#

Any idea on how I adapt the code?

slate badger
#

you need to have a local variable tied to the hallfx sensor

stable forge
#

I think may have meant that the TFT Feather and the Reverse TFT Feather are basically identical. They differ physically, based on how the display is mounted.

slate badger
#

is there any way to adapt this code without completely rewriting it?

#

it uses tons of arcada.display and similar functions

stable forge
# slate badger it uses tons of arcada.display and similar functions

you'd have to see if you can adapt the arcada library to the TFT feather, or just dispense with it and use the lower level things it provides. You would want to read the librayr. The display has a different resolution and there are other differences. You may want to look at the example programs for the sensor, which won't use the aracada library

stable forge
#

i have to be afk in a minute, sorry

slate badger
#

👍

slate badger
#

So i have gotten to work adapting

#

Im not sure how i would draw pixels

#

the arcada version has this

int colorTemp;
  for (uint8_t h=0; h<24; h++) {
    for (uint8_t w=0; w<32; w++) {
      float t = frame[h*32 + w];
      // Serial.print(t, 1); Serial.print(", ");

      t = min(t, MAXTEMP);
      t = max(t, MINTEMP); 
           
      uint8_t colorIndex = map(t, MINTEMP, MAXTEMP, 0, 255);
      
      colorIndex = constrain(colorIndex, 0, 255);
      //draw the pixels!
      arcada.display->fillRect(displayPixelWidth * w, displayPixelHeight * h,
                               displayPixelHeight, displayPixelWidth, 
                               camColors[colorIndex]);
    }
  }
#

i dont know which function to replace arcada.display->fill rect() with

slate badger
#

pls ping me if you have any info or questions

kind shore
#

hey, so im trying to use a bmp180 atmospheric pressure sensor with my esp32, the thing is that due to gpio availability issues i had to use gpio 14 and 15 for i2c, and i cant get it to work using those pins, could anyone help me with this?

kind shore
#

okay noe its working, but it is making the esp32 crash whenever i try to read anything because of a DivideIntegerByZeroException

livid osprey
stable forge
slate badger
#

im confused

#

so i just use tft.display?

#

i have a line in the code: // Use dedicated hardware SPI pins Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);

stable forge
slate badger
#

but i am having a problem with max temp

#

let me show you my code rq

#
t = min(t, MAXTEMP);
t = max(t, MINTEMP); 
slate badger
#

line 119

stable forge
#

#define MINTEMP 20.0f

#

and similar for MAXTEMP

rancid patio
stable forge
#

20 is an int, by itself. Or you could cast it t = min(t, (float) MAXTEMP);, but if you are not going to use it as an int, don't bother

#

const float MAXTEMP = 20.0f; is somewhat better form

slate badger
#

take it from somone who spent 4 days and abandoned a project they had put over 12 hours into over a pair of esp 32 boards from amazon that were buggy garbage

#

the adafuit brand esp feathers are a little more expensive

#

but they are not trash

slate badger
#

verifying

stable forge
#

@rancid patio if you want to run CircuitPython maybe, consider an ESP32-S2 board, because the S2 has native USB. Or ESP32-S3, but its I2C can be flaky.

rancid patio
rancid patio
# stable forge <@527335564589006858> if you want to run CircuitPython maybe, consider an ESP32-...

My friend I want to keep things super simple, and want to follow the playlist: https://www.youtube.com/watch?v=JmDxP4O4Trk&list=PLzvRQMJ9HDiQ3OIuBWCEW6yE0S0LUWhGU&index=2

Before you can program the ESP32, you need to install a driver for the USB-to-UART chip. Depending on your board that might be the CH340 or CP210x chip.

🔗 Driver download links:

▶ Play video
slate badger
#

it is saying it wasnt declared

#
//low range of the sensor (this will be blue on the screen)
const float MINTEMP 20.0f

//high range of the sensor (this will be red on the screen)
const float MAXTEMP 35.0f
#

should i replace the const with #define

rancid patio
stable forge
#

const float MAXTEMP = 35.0f; need = and ;

slate badger
#

you will go down the rabbit hole

#

its best just to accept it

slate badger
rancid patio
#

The tutorial is not out of date, and never will be as long as I use the parts in the tutorial.

slate badger
#

every technology tutorial is out of date

#

and following exactly what they say will not work

#

there is nothing simple in electronics

#

but the bliss when you figure it out

rancid patio
#

Hence my desire to spend $5 on this.

slate badger
rancid patio
#

Trouble shooting is part of the process, you don't seem to comprehend that.

rancid patio
#

Yep.

slate badger
#

WAIT THE SKETCH DIDNT HAVE COMPILER ERRORS

#

if this works ima lose it

slate badger
# rancid patio Yep.

so you saying "troubleshooting is apart of the process" but are also saying it doesnt happen if you follow magical instructions

rancid patio
#

Trouble shooting is part of the process. What don't you understand?

stable forge
#

let's not escalate, folks. Yes, some people who bought cheap boards found they had issues, because the boards were missing parts, had bad parts, or incorrect parts, or were poorly made.

#

sometimes the cheap boards are fine, sometimes they are not

rancid patio
#

Agreed.

slate badger
#

t

#

good news: IT COMPILED

#

bad news: only one pixel is working

#

good news: ONE PIXEL IS WORKING

rancid patio
slate badger
#

the pixel changes based on what it is looking at

#

hopefully just a resolution error

stable forge
#

progress is being made

slate badger
#

could it have to do with the frame variable being set to 32 by 24?

#

float frame[32*24]; // buffer for full frame of temperatures

#

the device res is set on line 83 displayPixelWidth = 240; displayPixelHeight = 135; //Keep pixels square

stable forge
#

i don't know - I'm pretty unfamiliar with the sensor and library you're using

slate badger
#

ah ok

stable forge
#

but I think you got over the hurdle of the arcada library, so now you want to figure out what is different about your display initialization and setup vs the PyBadge one.

#

i am going offline - it's late here, good luck

slate badger
#

sleep well

#

i flipped the display pixel width and height

#

the pixel takes up the whole screen now :D

#

wait no it's two pixels

#

:DDDDDD

slate badger
#

I am getting output :DDDDDD 🙌

#

it is either too small or zoomed in

#

but i am getting there

#

uhhh the camera only works if i am holding teh cable

#

i have tried wrapping some tape on the qwiic cable to hold the cables in place like i was but it doesnt do what my hand does

slate badger
#

if i am not almost strongly gripping the cable it is all red

#

re seated the qt cable and tried the second qt connector to no avail

kind shore
# livid osprey Could you share your code and the error message? That particular exception shoul...

Sorry for the delay, it was really late at my time zone, this is my code:

#include <Adafruit_BMP085.h>

TwoWire I2CBus = TwoWire(0);
Adafruit_BMP085 BMPSensor;

void setup ()
{
    Serial.begin(115200);
    I2CBus.begin(14, 15);
    if (!BMPSensor.begin(&BMPSensor))
    {
        Serial.println("error initializing bmp sensor");
        while (true) delay(1);
    }
}

void loop ()
{
    Serial.println(BMPSensor.readTemperature());
    delay(200);
}
next parrot
#

Hey guys sorry bothering you, I got a problem here using a arduino D1 wifi, I try using the pin D6 and use the simple howdy code and it is just white

#

got a 8x8 led matrix and all is going white

next parrot
#

I added a delay and i notice that he writes the text and then puts everything white and so on

#

I know i made some mistake with the orientation but i for now want the code to work

#

I dont know why this is happening 😦

north stream
#

I don't either. I doubt you need both .clear() and .fillScreen()

next parrot
#

I didn't had the clear before and still the same 😦

#

maybe it is the arduino

#

I wanted to use one with wi Fi and got this, I managed to create a webserver and get data, but the LEDs are not working

#

now I just used this simple code to test why it is not working

slate badger
#

My mlx90640 thermal camera only works if I tightly grip the qt cable. I have tried two qt cables so far and it only works with my hand, I tried a metal tweezer in the same position to no avail.

livid osprey
slate badger
#

Both are from adafruit

#

Could it be the solder points? They look like they have too much solder

next parrot
umbral zinc
#

I got a motor shield for an arduino and i am testing it with adafruit motor shield library. I am getting this strange noise from the shield, what can it be?

slate badger
#

great

#

now it is stuck in bootloader mode

slate badger
#

i factory reset it

#

now when i upload a script the screen shuts off an the ide erros out of uploading

#

com11 was the port for it i am 100% sure

#

now it shows up as an esp32s2 dev moduile

#

it worked fine last night

#

i mess around with the frame resolution

#

now nothing works

#

why does every project have everything go wrong right at the end

livid holly
#

I am trying to understand HardwareSerial vs Uart. On my SAMD21 boards, Serial is class Serial_ and Serial1 is class Uart. When I look at the Arduino Mega, (not SAMD21, but has a Serial1) it uses HardwareSerial for both Serial and Serial1. (This is what the Arduino Editor tells me when I change boards). When I look at the Uart class it looks like it extends HardwareSerial, is that right?

I am trying to use a library that is expecting a type of HardwardSerial and use Serial1 on a SAMD21 board. Not sure the best way to get that. Unless I rewrite the library to use Uart?

slate badger
#

camera still doesnt work unless the cable is held close to the qwiic connector on the camera

#

it will just be all red otherwise

thorny lintel
#

Having a bit of a weird issue, I use 28BYJ-48 stepper motors for a couple of products I sell, I usually use an ATTINY88 to drive a ULN2003 driver

I'm waiting for a bulk order of ATTINY88's to arrive from China so I had to Amazon Prime some Digisparks to get some orders out, but I'm running into some odd issues whilst using the Digispark

Regardless of what code I use to drive the motors, the motor doesn't feel smooth at all, rotates as it should but it feels jittery and vibrates on surfaces and I'm unsure what's going on

ULN2003 hooked up to pins 0,1,2,3 and I'm powering the driver off of a VIN and not from the Digispark so I'm really confused what could be causing this

north stream
#

I'd look at the outputs of the (probably clone) digisparks and see if they're right.

thorny lintel
#

Seems to all be fine

#

Amazon listing also has many good reviews

#

I'm using 0,1,2,3 purposely as Pin 5 is reset, I just can't figure out why it works, but very poorly

stable forge
#

support will send you to forums first for diagnosis.

next parrot
#

Just to update something, I can use the FastLED but the adafruit neomatrix does not work for me 😦

#

kinda strange what happens. Maybe it has something to do with the arduino

slate badger
elder hare
#

weird! why can't my desktop computer connect to my ESP32?

Computer cabled connection
ESP32 Wifi

what router settings do i have to change ?

stable forge
slate badger
stable forge
stable forge
#

could you fill in more details in that forum thread, including the ESP32-S2 board you're using, and upload your program? Also closeup view of the board head on (as opposed to the side views) showing the connectors. I don't have one of these cameras (yet), but someone who does can try to replicate the issue. Are the cables you're using from us?

slate badger
#

I'll add some more details

slate badger
slate badger
#

How long does the forum usually take?

winter venture
livid osprey
#

Same subnet*

leaden walrus
#

although not seeing it in that repo either, so not sure

slate badger
terse smelt
#

Is it possible to include a .dat or .bin file in a sketch? I have some raw image/video data in a .dat file that I need to read bytes from.

#

I guess maybe making it into a header file would work

cedar mountain
terse smelt
#

I might be able to use an SD card if i can find a spare one

#

I don't know how well it would perform in a header file though, it's a 544kb file

cedar mountain
#

I mean, the obvious question to ask is whether your microcontroller has more than 544K of flash to begin with.

terse smelt
#

I think it has 8MB

#

It's the Feather ESP32-S3 No PSRAM

cedar mountain
#

Gotcha. The ESP32 IDF has SPIFFS support for embedding a lightweight filesystem in the flash, though I don't know if that's surfaced in the Arduino libraries.

tribal oxide
#

I'm having annoying uploading issues--my new Gemma M0 was working great, but now nothing will upload to it. I used to get a Windows popup as if it detected a new drive while it uploaded, now it doesn't do that. I didn't change anything that I can think of...

stable forge
terse smelt
#

How can I define a byte array in a header file and reference it in my Arduino sketch? I've tried every possible solution I could find and it hasn't worked.

valid hazel
#

Define the array as arduino external byte[number]; In the header so things can "see" it.

#

Then

#

Create it arduino byte[number]; In the .cpp file so the compiler will build it and hook you up.

terse smelt
#

Is there a way I can add it in the header or another .cpp file? It's a rather long variable so I'd rather not add it to my actual code.

valid hazel
#

It's only added once. The extern one is just kinda' the sales ad for it. The one in the .cpp file is the actual variable.

#

IF you don't want it in your code, why are you adding it at all?

terse smelt
#

I just need to reference it from a different file as to not clutter the main file

terse smelt
#

Alright, I got it to work but the array was too big anyway lol

raven perch
#

Hi, I just finished and ordered a PCB design with an AVR chip. While I'm waiting for it to arrive, I'm trying to read up on programming it. I plan to make a little WiFi-enabled debug clip with a Pico W and this guide: https://learn.adafruit.com/stand-alone-programming-avrs-using-circuitpython, but I'm a little confused by the references to "fuses". My understanding is that they're basically little tiny ways of storing super basic data about the program/hardware/something like that, but I'd love to learn more and refine that knowledge. Can someone explain, or drop a link to a resource? Thanks!

north stream
raven perch
#

Thanks, I'll take a look!

winter venture
leaden walrus
winter venture
#

I dont know where exactly I would find the keypad.h in the files but I browsed through the oder Versions a little bit (around the time the tutorial Was released) and couldn't find it there either

#

I found this in a different discord about this problem, can you identfy the error with the help of this conversation?

leaden walrus
tribal oxide
stable forge
tribal oxide
stable forge
#

the reset button on the Gemma M0

tribal oxide
#

Yep, but I missed the double-click! I was single-clicking! That was all it was, thank you so much!

steel wharf
#

Soo, this isn't exactly arduino related, but since there's no "help with microcontrollers" channel, I figure this is the most applicable spot.

I've got a board with a SAMD21 (specifically SAMD21G18A). I'm using all of the TC & TCC peripherals to generate PWMs on a pair of wave outs each. (That is, each of TCC0, TCC1, TCC2, TC3, TC4, and TC5 each make use of two wave out channels. The TCx are in COUNT8 NPWM mode, while the TCCx are in NPWM and RAMP1 mode, simply using a period of 255 so the behavior across TC to TCC is the same.) Through rapid DC adjustments, I'm generating PWMs that generate a sine wave via a half-bridge driver. While any channel pair is in use, the peripheral is left disabled, only enabled as it's needed. (Here's details on how my clocks & generators are setup: https://pastebin.com/6Jg4MSUe)

The issue I've run into seems to crop up around waiting for register synchronization, specifically after enabling any of the peripherals. It never occurs on the first enabling after POR, but occasionally on subsequent enables, the SYNCBUSY flag for that register gets "stuck" as 1, leaving the code running in an infinite loop.

Even attempting to read any of the TC registers via a debugger at this point, causes at at least the debugging session to fall apart. (I imagine the whole chip might fall over, but it's difficult to tell.) If the issue occurs with a TCC, the result of inspecting the TC register is the same! (That is to say, I'm able to inspect the TCC registers, but trying to look at any of the TC registers causes the debugging session to fail/etc.)

Things I've tried:

  • Keeping the TC[C]s enabled and just "soft" disabling them by using 0 duty cycles. (The issue then manifests as getting stuck on the SYNCBUSY for the CC registers.)
  • Narrowing use to only a single TC or TCC peripheral. (The end application will need to use all of them, but I'm able to reproduce the issue with just using one.)
  • Underclocking the CPU/APB/peripherals
  • Inserting a handful of NOPs before the register sets. (the sets themself come after a BLX branch instruction due to what i'm guessing is coming from C++ code to C code, but the CPU never leaves thumb mode.)
  • Ritualistic sacrifices in the name of Hecate

Trying to cut down the code to just a reproducible example seems to suppress the issue from occurring as regularly (to the point of seemingly not occurring in some cases,) so this has been incredibly infuriating to track down. Any thoughts or ideas would be very helpful! (Or if you can point to other good places to ask questions like this, too.)

stable forge
steel wharf
#

Yeah, the errata says that the SYNCBUSY issue should have been cleared up from HW revision E and later (I'm on G). That said, I'm not using any low power states (not even so much as a WFI,) and do issue SWRSTs during initialization. The fact that it's listed at all is what has me really worried that it may be a silicon issue of sorts.

I'll take a look at ciruitpython's impl now.

I did search there the other day, and did find at least one post that was relevant … but now when I'm trying to open the page, it's just redirecting me to /error (even though the content starts to load (https://www.avrfreaks.net/s/topic/a5C3l000000UhxNEAS/t182080)

stable forge
#

yes, I'm finding that pretty confusing

#

maybe search in the new forum above?

#

or post your query

#

I looked for that URL in archive.org, but didn't find it. Does Google have a cached version?

steel wharf
#

Not that I could get it to pull up; I'm guessing because their forum software is one of those that loads the posts after the page via javascript rather than actually rendering the pages. 🙃

I guess I should try this new microchip forum. I never had much luck with their old forums but maybe they've found some new life in this restructure.

stable forge
#

i have found it very variable; if someone happens to see it and know what you're talking about, it can be great, but I have often ended up answering my own question

steel wharf
#

Haha, too true. It does look like they've imported (at least a large portion of) avrfreaks posts, which just reads odd when people reference it.

#

So I did just notice this in the errata, which the behavior described is effectively exactly what I see when my issue happens. But for the life of me I've got no idea what would kill off the APB clock 👀

stable forge
#

i don't know either. Are you using an external crystal? Any messing around with the clock sources or the PLL's? Is there any chance noise from your I/O pins is getting into the power supply? (e.g. switching transients?) Do you use the USB clock as a synchronization source?

steel wharf
#

Here's the clock setup:

- XOSC32K is in use, providing a 32,768 Hz crystal input to XIN32 & XOUT32. That crystal is used as the input to GCLK Generator 1 with no divider.
- The FDPLL uses XOSC32K as it's selected input with a DPLL Loop ratio of 2928 (integer part) 11 (fractional part,) providing a 96,000,000 Hz output.
- GCLK Generator 0 (GCLK_MAIN) uses FDPLL as input, with a divider of 1, keeping the output as 96,000,000 Hz.
- The Main CPU clock uses a divider of 2 (CPUDIV reg value 1), providing a 48,000,000 Hz clock to the CPU.
- APBA, APBB, and APBC all have their dividers as 2 (APBxDIV reg value 1), sharing that 48,000,000 Hz clock.
- GCLK Generator 7 uses FPDLL as the input, with a divider of 2, producing a 48,000,000 Hz clock.
- TCC0, TCC1, TCC2, TC3, TC4, and TC5 all use GCLK Generator 7. (According to 37.6, TCC0, TCC1, TCC2, and TC3 are capable of clocking at 96 MHz, but 48 MHz was chosen to keep parity with TC4 and TC5.)

I do worry about power on the board in general, because of the voltages I'm dealing with. (my halfbridge drivers are between a +9v rail and a +48v rail, the chip's +3.3v comes from a LDO on the +9v) I've tested and found the issue happening with both the higher voltage rails shut off via mosfets before they get to the output stages, so I'm relatively sure it's not the cause, but can't completely rule it out yet.

USB pins are exposed but unconnected.

stable forge
#

do you have some board like an Arduino Zero or an Adafruit SAMD21 board that you could just test the code on, with the pins unconnected? (Sounds like doing that on your custom board might require desoldering or something)

#

maybe not with the right crystal

steel wharf
#

I've got one on order, should be here Friday I think 🙂

stable forge
#

yah, Metro M0 and Arduino Zero both use 32kHz crystal

#

same for SAMD21 XPlained Pro

steel wharf
stable forge
#

we have a zillion, hopefully it is one with a crystal (on some we don't have a crystal for cost reasons)

steel wharf
#

I sent him a message to ask, but even without one it should prove useful if nothing else just to have a completely different environment to test in!

terse smelt
#

I'm trying to edit the "ssd1306_128x32_i2c" example to use with the 64x32 0.49" SSD1306 and it doesn't seem to want to cooperate. I'm using the Feather ESP32-S3 No PSRAM board to test it and my guess is the wiring or pins I'm using are wrong? SDA and SCL are connected to the SDA and SCL pins on the board, which I think are pins 3 and 4. Here's my code to try to initialize it:

TwoWire wire = Wire.begin(3, 4);
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &wire, OLED_RESET);
#

I also changed the resolution accordingly

leaden walrus
#

no need to call Wire.begin() like that

#

Try this:

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
terse smelt
#

That's what the example had by default and it didn't display anything, maybe the address is different for 64x32?

#

The examples show 0x3C and 0x3D

terse smelt
#

Also for some reason my computer can't send or receive serial info, it can only upload code. I don't see any output. Last time i used Arduino I remember i had to change the IDE's baud rate but i can't find that option.

#

I'm also not sure it's able to hard reset my board after uploading code, so maybe that's why?

winter venture
leaden walrus
slate badger
#

@stable forge after going back and fourth with support over my thermal camera, we have determined it was the software, not the hardware.

#

now the fun part that everyone loves
✨ debugging ✨

winter venture
slate badger
#

has anyone ever heard of whether or not a person is touching a qt cable affecting an I2c protocol??

livid osprey
north stream
#

Touching a cable having an effect is usually due to mechanical issues (poor solder joint, etc.), an impedance problem (weak pull-ups in the case of I2C), or a timing problem (going too fast for the length/impedance, often)

gilded swift
#

You can manage bus capacitance issues by using stronger pull ups

#

Well, up to a certain point

#

If combined parallel pull ups down to 1k don’t fix issues, use a buffer to break up the line

urban tapir
#

I am using arduino-cli to hack an adafruit:samd:adafruit_feather_m4_can. When I set up with "arduino-cli core install adafruit:samd --additional-urls https://adafruit.github.io/arduino-board-index/package_adafruit_index.json" it installs about 1.5 Gb of files in ~/.arduino15/. Much of it is in ~/.arduino15/packages/adafruit/tools, especially 500 Mb each in arm-none-eabi-gcc/ and CMSIS/. Do I need all this? Is it possible for me to trim the install? (or am I installing too much stuff to begin with?)

#

I guess there's a bunch of files in ~/.Arduino15/staging/ too (about 400 MB) that probably aren't needed after initial install. I am wondering how I can do the equivalent of a "make clean" after I install arduino-cli so I can only keep what I need to do my work.

slate badger
#

i could only find two possible lines that could be the problem

#

mlx.setRefreshRate(MLX90640_8_HZ); is set to 2 hz in a test program that doesnt have the touch issue
Wire.setClock(1000000); // max 1 MHz no clue what this line does but it isnt in the test script that i got to work without touch

livid osprey
slate badger
#

ill try that after i lower the mlx refresh rate 👍

livid osprey
slate badger
#

this could help with my fps

#

thanks!

#

ill update you when i get back to my pc

frozen light
#

Could someone possibly help me with trying to wire a Tft display to my mkr 1010wifi?

#

This is the tft display I am using. Everything I find online about hooking these up have differences in the pin outs and with the boards they use. Most use Arduino uni but for what I’m trying to do I need to use the 1010wifi. If anyone has any ideas please let me know

#

lots of tft displays I see wired online have an SDA off the display and mine doesn't have that for example

gilded swift
#

It’s not great nomenclature using SDA but it’s basically your serial data from your microcontroller or host going to the display

livid osprey
#

SDA is a lot more confusing in the context of an SPI device like this one. Looks like the mkr wifi1010 has default spi pins on d8 (MOSI) d9 (SCK) and d10 (MISO). VCC and gnd evidently go to your +3v3 and GND pins, and everything else can be assigned a gpio of your choice.

#

LITE is best connected to a PWM-capable pin if you want brightness control.

slate badger
#

wait

#

it works now

#

i commented out the line

#

it finally works

#

LETS GOOOOOOOOOOOOOOOOOOO

#

it is stable at up to 4hz

slate badger
#

any clue on how to horizontally flip the image coming from the mlx 90640 thermal sensor?

shy oasis
#

I believe that invert it horizontally

slate badger
real monolith
#

Anyone have a good link to a guide for getting the feather huzzah to appear on a Mac?

slate badger
real monolith
#

I’m on a recent so build and I have an Intel chip. So as far as I can tell the legacy concerns with arduino are not a concern

#

But, alas, no com port in the arduino IDE

slate badger
north stream
real monolith
real monolith
real monolith
#

I have tried “the driver” solution again today. Where are @north stream you seeing CH340 as the driver?

leaden walrus
#

@real monolith that feather is probably using the CP2104. is the mac responding at all when the feather is plugged in?

real monolith
#

I’m just looking at the desktop and my finder window - should I be doing anything else?

leaden walrus
#

look for a COM port to show up in device manager (whatever that is on mac)

#

that part has nothing to do with the arduino ide

#

the mac only sees the CP2104, so if driver is good, cable is good, etc. - should at least get a COM port to show up

zinc mortar
#

On Mac in the terminal, you can use ioreg -p IOUSB to show your USB device tree

#

They're not COM ports on a Mac- they'll be in /dev like on linux/unix

leaden walrus
#

there have been some known issues with the CP201x VCP driver and some version of mac os

zinc mortar
#

Not surprising heh

leaden walrus
#
If you are using Mac OS 10.12.6 (Sierra) and you cannot upload with the latest Mac OS VCP driver, please try the legacy v4 driver below. Note you will need to uninstall the v5 driver using uninstall.sh (in the driver package)
#

but seems probably dated at this point

zinc mortar
#

Ah, yeah that's a pretty old one. And @real monolith said they're on Ventura

real monolith
real monolith
leaden walrus
#

it is. in the warning call out above.

real monolith
#

I don’t read that sentence the way you do

zinc mortar
#

Here's what I would do:
Run ioreg -p IOUSB with the device unplugged, then plug it in and run the same command to see if the device tree changed

real monolith
#

That reads “if you are on this specific version (maybe could be interpreted to be mathis version or before) then you will have an issue - use legacy driver”.

#

I’m using newer-

zinc mortar
#

So then the CP2012 either isn't getting power, doesn't have the data lines connected, or is nonfunctional

leaden walrus
#

do you have access to another PC as a quick way to test?

real monolith
#

I have a Ras pi 4

leaden walrus
#

that'd work

real monolith
#

Okay give me a min to set it up

leaden walrus
#

don't really even need to worry about drivers

zinc mortar
#

Yep, dmesg will show it plugging & unplugging on the Pi

leaden walrus
#

^^ yep

zinc mortar
#

dmesg -wH if you want to be fancy

leaden walrus
#

the dmesg output will help

#

run that before plugging in the feather

real monolith
#

Okay I’m booting it up -

leaden walrus
#

the -w makes it sit and print new msgs

real monolith
#

Step 1 run > dmesg from terminal with no device connected

#

And then run it again?

#

With it plugged in?

leaden walrus
#

nope. just run with -w

#

before plugging in

#

then plug in

#

and watch output

#
[Apr14 21:27] usb 1-1.1: new full-speed USB device number 3 using xhci_hcd
[  +0.137332] usb 1-1.1: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[  +0.000029] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  +0.000020] usb 1-1.1: Product: CP2104 USB to UART Bridge Controller
[  +0.000019] usb 1-1.1: Manufacturer: Silicon Labs
[  +0.000016] usb 1-1.1: SerialNumber: 0136E377
[  +0.099417] usbcore: registered new interface driver usbserial_generic
[  +0.000064] usbserial: USB Serial support registered for generic
[  +0.007199] usbcore: registered new interface driver cp210x
[  +0.000082] usbserial: USB Serial support registered for cp210x
[  +0.000120] cp210x 1-1.1:1.0: cp210x converter detected
[  +0.003350] usb 1-1.1: cp210x converter now attached to ttyUSB0
real monolith
#

nothing

leaden walrus
#

that's what i got

#

hmm...nothing

real monolith
#

as in the command runs and i get a long response, and when i plug in the 'feather' i dont get anything new

leaden walrus
#

ok. should have printed new stuff. like above.

real monolith
#

can confirm it updates for usb 3 and usb 2 ports

leaden walrus
#

is anything plugged in to the feather other than usb cable?

real monolith
#

no

#

and i have two

#

i'm only testing this on one at this momen however

leaden walrus
#

two feather esp8266's?

real monolith
#

yes, correct

leaden walrus
#

if you have access to the other one, go ahead and try this same check

#

with that one

real monolith
#

i get a message with the second!

#

it has a lipo batter pack on it - i have it inside it's project enclosure already

leaden walrus
#

should be ok, as long as you got some messages, it at least means the feather is being seen

#

this was with same USB cable between the two tests?

real monolith
#

yes correct

#

but no "com" ports in arduino ide

#

but i now get a SLAB_USBtoUART appear

leaden walrus
#

based on the pi dmesg test, getting no messages, it seems like there's a hardware issue with that one feather

#

not getting COM ports could be for something else - like driver issues

#

but it should have at least generated messages on the pi as the other feather did

real monolith
#

Okay that makes sense re one board being seen by the pi and the other not (one of them is defective)

leaden walrus
real monolith
#

okay i will jump over there in a moment

leaden walrus
#

you can ping me with link to post when it's up and i'll respond there

real monolith
#

On Mac OS 10.13 and higher, in addition to installing, you will have to give the CP2104 kernel driver permission to load. You can find out if you need to give additional permission by visiting your Security & Privacy settings system preferences screen after installing and looking for the message that says, 'System software from developer "SiLabs" was blocked from loading', like in the picture below.

#

that clearly states "on mac OS 10.13 and higher"

#

which is why I don't think your reading of the lower text, regarding the legacy driver is correct

#

I am definitely okay being corrected though.

#

@wise stone are you still there?

#

this says to use version 2.5.1

leaden walrus
real monolith
#

however, it does not say to what software this is refering

#

if it's referencing the arduino IDE - the latest stable build is 2.0.4

leaden walrus
#

probably the Adafruit IO library

real monolith
real monolith
#

Just checking back on my last question - if the adafruit site is saying "be on 2.5.1 or above," how can this be done if the arduino IDE is 2.0.4? (assuming the 2.5.1 is referencing the arduino IDE and not something else that i'm missing)

leaden walrus
#

it's referring to the version of the Adafruit IO Arduino library

real monolith
#

I don't want this to sound rude - because I don't mean it to be - but it could be written clearer on the site

#

instead of
If you want to use this board with Adafruit IO Arduino - make sure you're on version 2.5.1 or ABOVE.

#

it could say
If you want to use this board with Adafruit IO Arduino - make sure you're on version 2.5.1 or ABOVE of the Adafruit IO Arduino software.

leaden walrus
#

good thing to submit a guide feedback - can do for any guide

#

see link in left hand nav

real monolith
#

I think this is confusing because no where previously, or immediately thereafter is there any mention of Adafruit IO

#

I have submitted several blatant errors there, and I have not received a reply, nor are there updates to the guides

leaden walrus
#

there is no reply mechanism. but guide author will get notice.

real monolith
#

I don't want to seem as rude, because I'm not, and I think this can get lost in typing... but that part of the guide for example is just clearly out of place

#

and it seems ... weird that it's there

#

regardless, I'll submit feedback. I see that this guide is currently maintained so maybe someone will read it 🙂

#

thank you so much @leaden walrus and @zinc mortar

north stream
real monolith
#

I think I'm heading in the right direction - thanks everyone who chimed in 🙂

crystal pawn
#

Hi all. I have a weird scenario. A client is asking to retrofit a project that uses 9 photo-resistors. Due to the nature of the existing setup, switching to another sensor type is not possible, so we have to stick with photo-resistors. I’d like to use a Leonardo but there are not enough analog inputs to cover all 9 sensors. Is there a way to bus them all together in series and read the collective value across all 9 from a single analog pin? We don’t need to know the value of each sensor, just the collective value of all 9.

mild cave
crystal pawn
mild cave
#

You do need analog value right ?

#

If yes , then you do need an ADC somewhere to make measurement , even if you want a collective measurement

mild cave
crystal pawn
mild cave
crystal pawn
#

That’s more along the lines of what I was thinking! Much appreciated!

cedar mountain
quartz furnace
#

Looking for help with this board

#

Have Mac Arduino 1.8.19… the latest RP2040 board package…. The library for Pico-PIO-USB

#

But getting an error when trying to compile

#

Ahhh figured it out .. you have to make a selection in Tools to make a change

crystal pawn
north stream
#

I did think of putting a comparator on each photosensor to provide a fixed voltage, then using resistors to encode each sensor with a different voltage (allowing all the sensors to be queried at once with a single analog pin), but that's a lot of chips, and will give confusing results if more than one sensor is triggered at a a time. Therefore I think a shift register or GPIO expander is likely a better solution. While such an approach is slower than directly reading GPIO pins, ordinary cadmium sulfide photoresistors are fairly slow devices anyway, so that doesn't seem like much of a drawback.

gilded swift
cold lagoon
#

Can someone tell my why my arduino nano sometimes calls the UpdateRGB(FadeDelay); before the NRFSendFeedback() function? there is a Serial.println() line in NRFSendFeedback(), which tells me when the function is called (for debug) but it seems like sometimes its called after the LED's got updated (faded to the new value, which takes a sec or two) if (ReceivedMessage[0] == 301) { NRFSendFeedback(99); if (ReceivedMessage[4] == 0 && LEDstate == 1) { RGBVals[0] = 0; RGBVals[1] = 0; RGBVals[2] = 0; UpdateRGB(FadeDelay); LEDstate = 0; } else if (ReceivedMessage[4] == 1 && LEDstate == 0) { RGBVals[0] = NewRGBVals[0]; RGBVals[1] = NewRGBVals[1]; RGBVals[2] = NewRGBVals[2]; UpdateRGB(FadeDelay); LEDstate = 1; }

#

}

mild cave
#

cant help without full code.

cold lagoon
mild cave
#

Ok , I cant see any obvious problem.

What i think might be happening is, say you receive a message which satisfies the else if() condition , at which point

 else if (ReceivedMessage[4] == 1 && LEDstate == 0) {
      RGBVals[0] = NewRGBVals[0];
      RGBVals[1] = NewRGBVals[1];
      RGBVals[2] = NewRGBVals[2];
      UpdateRGB(FadeDelay);
      LEDstate = 1;
    }

this block will get executed
and after that you receive a new message immediately which satisfies the above if condition and then this block gets executed

if (ReceivedMessage[0] == 301) {
    NRFSendFeedback(99);
    if (ReceivedMessage[4] == 0 && LEDstate == 1) {
      RGBVals[0] = 0;
      RGBVals[1] = 0;
      RGBVals[2] = 0;
      UpdateRGB(FadeDelay);
      LEDstate = 0;

#

Try adding that int variable in your serial.println() in the NRFSendFeedback() so that you can see which condition is calling that function

cold lagoon
#

ok seems like you're right. it only happens if i press on ReceivedMessage[4] == 1 right after off ReceivedMessage[4] == 0. which wont happen often so no problem. Thanks

mild cave
#

np 👍

valid hazel
crystal pawn
mild cave
#

yeah, mega wont work as an hid.

mild cave
#

wouldnt pi pico be a cheaper alternative ? Because a whole teensy for reading some photo resistors sounds kinda overkill

valid hazel
#

Whatever, just saying there are a lot of choices.

tacit jewel
#

can you get rid of the bootloader on a arduino zero

north stream
#

You should be able to use the SWD connection to write the entire flash with your own code if you like. You would presumably build it with a different tool set than Arduino (although you could leverage its internal tool chain)

vagrant quartz
#

quick question, I found that Arduino IDE use different programmers for different avr chips, is there any reason for that ?

#

for example, programer arduino for 328p; wiring for mega2560; avr109 for mega32u4

north stream
# vagrant quartz quick question, I found that Arduino IDE use different programmers for different...

It basically boils down to the protocol used to program the chips, which in turn depends on which bootloader is installed. As the ecosystem evolved, adding new chips and designs, along with improvements in bootloaders, different chips generally started with whatever bootloader (and protocol) was current at the time of introduction, and then often stayed that way, so as not to break older designs. You can, of course, install a newer bootloader into an earlier chip, and shift to the matching protocol. Generally this is more trouble than it's worth, but for an early chip like the mega168 with its 2kB bootloader and limited flash, it might be worthwhile to install one of the 512-byte bootloaders in order to free up some flash for your program.

mystic raven
#

I have a bunch of older Adafruit 5 volt and 3.3 volt Trinkets laying around (with the older micro USB connector). I was using a 5volt Trinket and uploaded the blink sketch, and set the on and off delay to 250 milliseconds. This should give me a LED blink rate of 2x per second. From within the Arduino IDE, I set the board to "Adafruit Trinket (ATtiny 85 @ 16Mhz). The blinking rate of the LED seemed too slow, based on the frequency I set the blink rate to. I changed the Arduino IDE board to "Adafruit Trinket (ATtiny85 @ 8Mhz) and then, the blink rate seemed correct. Is the default running frequency for the 5volt Trinket 8mhz? And if it is, how can I set the board to run at 16mhz? For the older 3.3volt Trinkets, what is the default frequency and what is its maximum frequency that it can run at.

north stream
#

Did you set the delay() times to 250ms? Note that since there are 2 delays per blink, that would yield a blink period of 500ms (2 per second)

frozen light
#

@livid osprey @gilded swift thank you both for you’re replies and sorry for not getting back to you sooner. I did end up getting the tft to work so thank you both for the help and replies! Much much appreciated 😊

mystic raven
#

When I choose the 8Mhz Trinket board setting in the Arduino IDE, I get the 2 blinks per second, since I set both the on and off delay to 250msecs (which is correct visually). But, when I choose the 16Mhz Trinket board, the speed is half. I believe the 5 volt Trinket is supposed to be a 16Mhz version, according to the Adafruit store. Hence the confusion.

north stream
#

I don't think those Trinkets use crystals, so I guess you'd have to read the fuses to see how the chip is configured

livid osprey
#

The 5v Pro trinket with the atmega328 would default to 16MHz, if that’s what you’re using.

livid osprey
#

Speed being halved when selecting double frequency is normal, as your delays are counted by clock cycles, and with less speed than expected, your compiler is asking for more clock cycles than you’re supposed to have with your settings.

main gull
#

Howdy all. A much as I really do enjoy Arduino/CP/Adafruit (love it), you sure can have frustrating days. Just spent all day after church trying to make CP work with a ATTiny1616 and ESP32 Feather S2 TFT - but the Learn guide pins definitions are wrong (I guess). So, let's do Arduino. Fine. Kept getting "esptool.exe" not found. ESP32 WAS working before in Arduino. And, of course, on my PC, a simple compile takes like 3 minutes...So I finally found where someone in the forums said ESP32 quit working after upgrading the Arduino IDE, which I had to 2.0.4. My mistake... So, another 10-15 minutes uninstalling and reinstalling the ESP32 Board. Upload works now.

solemn cliff
#

if you think there's an issue with the pins in a guide, could you explain the issue ? It should be fixed or clarified in the guide

viral spade
#

which language is recommended for ESP32 circuit python or arduino ide

cedar mountain
livid osprey
main gull
main gull
#

Well, never mind... after getting back to trying CP again on the ESP32, I did circup update --all which updated adafruit_seesaw, now it works fine. Should have known... I'm just dumb. I did the circup update on the board maybe a month ago, so I thought it was good. Oh well. All works great now, even my neo strip.

solemn cliff
#

yeah I was looking at the library and was thinking that might be the issue, the pin mapping for the attinyx16 boards was fixed last week

main gull
#

Cool thanks!

loud mural
#

I am looking for some information on the pinouts and pin labeling on the tft display on the pyportal, the pinout page "https://learn.adafruit.com/adafruit-pyportal/pinouts" says this "YD on board.TOUCH_YD or Arduino A4
XL on board.TOUCH_XL or Arduino A5
YU on board.TOUCH_YU or Arduino A6
XR on board.TOUCH_XR or Arduino A7", however it says I can measure between X+ and X- (xl and xr here) but the pinout diagram picture thing says the pins are A2(YD),A3(XL),A4(YU),A5(XR), I got so many different choices and all I want to do is be able to somewhat map my touch on the screen in one of four quadrants

pine shell
#

Hi! I'm having some trouble with my AirLift Coprocessor breakout board where after I have uploaded new sketch code on my Arduino several times without powering down, the AirLift gets stuck in a constant rebooting mode when it tries to reconnect to WiFi. I am using the latest firmware (1.7.4) and WiFiNINA library (1.3.0). All Adafruit versions. I wrote a little sketch, which is Teensy microcontroller specific, and I have a detailed post on the Adafruit forum (https://forums.adafruit.com/viewtopic.php?p=969038#p969038). I'm wondering if anyone is experiencing something similar?

pine shell
#

I tried a few more tests here just now, and I have found that it is related to the voltage supplied to the AirLift. In my previous tests I was powering everything at 3.3v, and after the 3rd-4th sketch upload/reboot the AirLift would go into a continuous reboot. However, if I change to powering everything at 5v, then all the problems disappear. The AirLift will connect to the WiFi with every reboot. So, even though the AirLift product page (https://www.adafruit.com/product/4201) seems to suggest that 3.3v or 5v can be used, it appears that only 5v can be used when restarts are required. I can't explain why, I can only report what I am seeing. I'd love to know if anyone else is experiencing this issue when using the AirLift at 3.3v. Even though my sample sketch is Teensy specific, you can use it for any microcontroller by removing the reboot code, and then uploading it to the microcontroller multiple times using the Arduino IDE.

north stream
#

I was vaguely wondering if it was a power supply issue, but I too don't know why it only appears in that situation. Perhaps some additional power supply stiffness (capacitance?) might help it ride through the usage spikes. Thanks for following up and explaining what you found!

dry quiver
pine shell
#

Interesting. I don't know why 3.3v would not work only after several reboots though.

loud mural
#

how man ma is your power supply for 3.3v

safe shell
#

regulator data sheet does say it will operate on 2.5v - 6.0v

#

but if the input 3.3v supply voltage is sagging, that could be trouble

deep hazel
#

anyone had any luck reprogramming the ATTiny1616-based seesaw breakouts with megaTinyCore's SerialUPDI programmer? i've got a 2.2kohm resistor wired between a USB-to-Serial cable's RX and TX, then connected the cable's RX to the breakout's UPDI pin through a 470 ohm resistor and when trying to flash a basic blink sketch, it just tells me it's failing to sync with the programmer

#

granted i did try getting that figured out late last night and haven't had time after waking up to play with it more today since i've got to run to work, but still figured i would ask in case someone who's done it before notices anything dumb with my setup that asleep-me didn't catch

pine bramble
#

I have a problem, when the ws2812 5v strip is turned off for a while, the first leds turn on. install a 10v 2200uf capacitor. how can I solve that?

#

in the video I turn on the light in another room and ring the doorbell. It affects the led strip.

cedar mountain
#

Possibly the data line is left floating if the LED controller is powered off, so the strip is picking up noise on that pin and interpreting it as a control signal. Maybe a pulldown resistor would be helpful?

pine shell
#

@loud mural @safe shell I'm using this Sparkfun power supply (https://www.sparkfun.com/products/13032) to power my breadboard to run my Teensy and the AirLift. Specs say it provides 800mA current. I've never had a problem with power using it before.

loud mural
#

my only other concern that I was wondering was if the regulator is after vin on the airlift and the voltage drops a little through the regulator, i couldnt tell if its bypassed under a 3.3vin or not.

dry quiver
#

The schematic seems to suggest that you could try powering through the 3vo pin and bypass the regulator but it's probably not a good idea if the input isn't stable.

#

And it might act weird because some parts aside from the regulator is connected to VIN

#

My guess is that there's a significant enough voltage drop that just crashes the airlift once it draws enough power at 3.3v. Enough to keep it awake, but not working.

#

And I know these airlifts (or esp32s in general) draw quite a bit at startup that tests flaky or unstable power connections.

main gull
#

Pretty sure after looking thru the PicoDVI Adafruit Fork examples, that there is not a way to implement the DVI breakout board with the Pico. Only the Feather, Pimorini, Sock... seem to be tested, but not with the breakout of course.

shy oasis
#
static const struct dvi_serialiser_cfg pico_sock_cfg = {
    .pio = DVI_DEFAULT_PIO_INST,
    .sm_tmds = {0, 1, 2},
    .pins_tmds = {12, 18, 16},
    .pins_clk = 14,
    .invert_diffpairs = false
};```
#

    GP12 to D0+
    GP13 to D0-
    GP14 to CK+
    GP15 to CK-
    GP16 to D2+
    GP17 to D2-
    GP18 to D1+
    GP19 to D1-```
#

Since it's pio, the tmds pairs only list the first pin. 12/13, 18/19, 16/17 and for clock 14/15. I'd have to go back and look into the code, but I believe invert_diffpairs false is correct. If it doesn't work, you can create a local instance and change it to true and pass that to the constructor.

coarse furnace
#

hello! I get this when trying to upload to my adafruit ESP32 feather board. Does anyone know what might be wrong?

#

I only have one RESET button on it so I get confused when I search for a solution on the internet and it tells me to hold the BOOT button and then pressing the RESET button?

#

Other tutorials with boards with only one button tells me to just press that only button and then it should work, but it still don't

north stream
coarse furnace
# north stream It seems like it gets started, but then the data stream gets lost. I'm guessing...

Ah ok, I dont think it is connection or power problems since my ESP8266 boards work fine. But I know the ESP32 draws more power, but uncertain that this jump in power draw is big enough to cause the problem.

I have not confirmed or denied the fact that another process could be stealing the data as u mention, but I have read that this could be the case aswell. Have just not yet manage to figure out how to track this down if it were to be the case:/

shy oasis
#
Serial port /dev/ttyUSB1
Connecting.....
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c8:f0:9e:4b:6d:88
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x0005dfff...
Compressed 18960 bytes to 13073...
Writing at 0x00001000... (100 %)
Wrote 18960 bytes (13073 compressed) at 0x00001000 in 0.4 seconds (effective 365.9 kbit/s)...
#

To me it looks like the chip isn't going into boot mode. That is supposed to be done by one of the transistors next to the CP2104 chip. They are the three pin devices next to the square chip. One is connected to reset and the other is connected to GPIO0 (Boot).

#

The reason I ask about pin 12, is that can cause the module to fail to boot if it is pulled high...

coarse furnace
stable forge
coarse furnace
stable forge
#

you might try the same thing with plain arduino

stable forge
coarse furnace
# stable forge note that there is Feather ESP32 V2, and Feather HUZZAH32. These are different b...

Yes, I have selected ”Adafruit ESP32 feather” in platformio. I have also tried getting help from this discord server before regarding the same issues I had back then (about 5 months ago). And then I used the normal arduino IDE. Now I’m trying again with visual studio since someone from either this server or arduinos own discord server mentioned that it had worked for them when using VS and not arduino IDE

#

Ever since I bought the boards about 2 years ago I have not managed to get them to work (first I bought 2 adafruit esp32 breakout boards https://www.adafruit.com/product/4172 and when they didn’t work I thought it was due to the external usb serial hub so I bought 2 adafruit ESP32 feather boards https://www.adafruit.com/product/3405 )

main gull
hollow moon
#

im trying to connect a tp4056 to a 3.7 battrery so thaat i can then connect it to my wemos d1 mini. stupidly i ordered the tp4056A instead though which dont have pads to connect to an output. is there anyway to modify it to connect to my wemos d1

main gull
stable forge
#

If you have another computer to try, even a Raspberry PI, you could try Arduino on that, to see if the issue is your particular Windows computer.

coarse furnace
hazy hollow
#

I'm using a Joy Featherwing with a Teensy 4.1 and when I run the example "joy_featherwing_example" arduino code: the analog stick works fine and prints out coordinates when moved, but the buttons are acting like they are constantly being pushed and spam print messages stating as much

#

Anyone know how to fix?

fallow vapor
#

Hey All, not exactly an Arduino question, but I'm not sure if there is a better channel here. I'm trying to find a working example for Raspberry Pi Pico W MQTT client, using the lwIP libraries included with the C/C++ SDK. Does anyone have a resource I can reference?

#

This is the gist of what I have, but I think I'm doing something wrong.

#

I get a success result from mqtt_publish for 4 iterations, but then start to get a failed result, and the messages never make it to the broker.

rich coral
#

does Adafruit have separate reference doc for standard Arduino functions?

#

because Arduino reference doc has board-specific info

north stream
#

Generally the functions that aren't tagged by board are the standard ones.

rough torrent
rich coral
#

SAMD51 has 12bit DAC

#

but analogWrite only goes to 256

rough torrent
north stream
#

analogWrite() works fine with 12 bit data on a SAMD51, at least on the DAC ports.

wooden bobcat
#

i'm trying to get the Adafruit-MCP23017-Arduino-Library working with platformIO and a pi pico. are there any examples using this library with hardware addressing that i can be pointed to? i'm using the MCP23S17 device. thanks!

leaden walrus
wooden bobcat
sturdy plover
#

Trying to follow the guide and am getting and error with the default example, https://github.com/SwiCago/HeatPump, https://chrdavis.github.io/hacking-a-mitsubishi-heat-pump-Part-1/

north stream
#

Apparently whatever target CPU you have has USBCDC as the type of Serial, and the library expects a type of HardwareSerial *. It's odd for the library to have such as specific type (I would have expected a generic type such as Stream), and I'm unsure what USBCDC presents. You could, I suppose, try casting it and seeing what happens: hp.connect((HardwareSerial *) &Serial);

sturdy plover
north stream
#

I don't think that's an error, it's just saying that setup can't start the chip automatically for you, so press the reset button to restart it.

sturdy plover
#

Under tools there are also options for USB CDC on boot and USB DFU on boot. Do you know what these are?

north stream
#

CDC is "communications device class", basically supporting a serial port via USB. DFU is "device firmware upgrade", which is presumably used to flash a new program onto it.

wooden bobcat
#

i'm struggling with docs while using busio and the mcp23x17 library with the pi pico. i need to change the MOSI, MISO, and SCK pins used, but i'm not getting it. i can't find any examples demonstrating this. i've been through the githubs with the libs. is it possible to change these pins with the pico and the adafruit libs? thanks!

wooden bobcat
obsidian raft
#

Helloooo, I could not decide which channel to post to, but I am quite the noob and trying to design a simple circuit for controlling 12V LEDs with an arduino nano.

I believe I will be using a 12v power supply to power the lights and arduino. The 12v will be stepped down using a L7805cv voltage regulator to power the arduino. The 12v power will go straight to the LEDs. This will need to fit in a nice little case (3d printed) and I was wondering how I should physically be splitting the 12v power from the power supply? Since the 12v will power the LEDs and will also go to a step down for the arduino, I will need to split this somehow. Obvious solutions are to solder two wires from the 12v DC connector, or perhaps splice a wire to the 12v and send it to the step-down? Though these seem messing and even potentially a heat/fire hazard. Anyone have better suggestions?

north stream
#

I'd probably just solder two wires to the connector.

obsidian raft
#

Yeah, that seems reasonable

#

Thank you! I mostly just need reassurance that I am not doing something terribly wrong haha

solid zenith
#

Hello,

I am using the Adafruit sh1107 screen and looking to remove the splash screen.
https://github.com/adafruit/Adafruit_SH110x/blob/master/Adafruit_SH1107.cpp

I can see there is this #ifndef SH110X_NO_SPLASH so at the top of my code before the includes, I have put #define SH110X_NO_SPLASH yet the splash screen still shows. I feel I am missing something rather obvious, any pointers?

Thanks

GitHub

Arduino library for SH110x based monochrome OLEDs. Contribute to adafruit/Adafruit_SH110x development by creating an account on GitHub.

north stream
#

You may need to put the #define before the #include

pure axle
#

Is it possible to screenshot/get a pdf of my code on the IDE?

sinful saffron
#

Is anyone familiar with the w5500 ethernet shield library? There was a mention to use the standard Ethernet library since the Ethernet2 library is deprecated. The Ethernet library does not have the utilities functions however. I'm trying to make a controller that will have several sockets/ports and would like to see if there's any way to do that with the Ethernet library where it'll close a socket if no data is sent/received for a certain period of time. Any help would be appreciated

north stream
sinful saffron
#

looks like the W5100 utilities also seems to work with the w5500 board, at least from initial testing

sinful saffron
#

I'm trying to figure out how to manually close a socket and found this datasheet: https://cdn.sparkfun.com/datasheets/Dev/Arduino/Shields/W5500_datasheet_v1.0.2_1.pdf . Not exactly sure how/if I can use the commands there in the Arduino utility library: Sn_CR 0x08 looks like the right command, but how would I actually write that in code for say, socket 0, or socket 1? Would it be something like W5100.writeSnCR(0 , 0x08);

shy oasis
#

Why not call stop() on the EthernetClient object?

sinful saffron
#

that didn't appear to work

#

but the writeSnCR did make the socket go to 0x0

#

now I just need to figure out how to have 3 timers or so

#

I know the Mega has 6, but not sure if they're usable for this

#

and if that's even the best way to go about it

#

basically going to have 3 sockets, but if the client has some issue and fails to close them remotely, I want if no data is received for a few seconds to close the socket

zinc mortar
#

Timers might not be your best bet- you can't call things like millis() in an ISR. If it were me, I'd check the time of last receipt and handle closing sockets in the main loop

sinful saffron
#

does the time rollover affect that or is that not something to worry about?

zinc mortar
#

It won't affect you- it rolls over at 49 days

#

Even if it rolls over, your deltas still work

sinful saffron
#

yeah, it'd have to be at the exact few seconds of the rollover and even then, it'd just close a socket to then be re-opened anyways

zinc mortar
#

It'll still work even during a rollover

sinful saffron
#

gotcha, that's good to know

#

which method is the one that isn't millis?

zinc mortar
#

The key is to make sure you are always subtracting the "last received" time from the current millis time

sinful saffron
#

oh, use millis

#

kk

zinc mortar
#

So you'd do like unsigned long last_rx = millis(); when you get a packet, then in the loop you'd do unsigned long delta_ms = millis() - last_rx;to get the time in milliseconds since you last got a packet

#

Because of binary arithmetic, that will work for rollover

sinful saffron
#

I gotcha

#

and then just reset last_rx every time a packet/character is received

zinc mortar
#

Yep!

sinful saffron
#

I'll give that a go, the next hurdle after this will be trying to figure out how to use an IR emitter/codes for a couple TV's ha

zinc mortar
sinful saffron
#

awesome!

#

thanks for the help

ruby shale
#

Hello all, does anyone have any idea how I can display static text and also then display scrolling text on a P4 rgb matrix panel? Seems that whenever I enable double buffering my static text doesn’t display and when it’s disabled my scrolling text looks like crap? Any ideas?

#

Other problem I have is this block is not running when called through the setup function```c++

void keep_left_arrow(){
for (int i = 0; i==1; i++) {
// Clear background
Serial.println(i);
matrix.fillScreen(0);

// Draw big scrolly text on top
matrix.setTextColor(matrix.Color333(255, 0, 0));
matrix.setCursor(textX, 1);
matrix.print(F2(str));

// Move text left (w/wrap), increase hue
if((--textX) < textMin) textX = matrix.width();

#if !defined(__AVR__)
// On non-AVR boards, delay slightly so screen updates aren't too quick.
  delay(20);
#endif

// Update display

matrix.swapBuffers(false);
}``` if I place everything inside the for loop function in the void loop() it runs perfectly

pure axle
mortal bay
#

I have a Feather M0 that I was happily uploading test code from vscode to, but now after a few cycles ( and I tried to get serial working ) it will not be detected by my windows PC, I get USB device not recognised. Any hints on how to get back to baseline

mortal bay
mortal bay
vivid mesa
#

I want connect this LED Driver Module to Arduino but i the board is clustered and i cant seem to figure out which pin in where, cant even find he vcc and gnd pins in it. Are there any other methods to find the correct pins cause i cant buy a new board now and im running on a deadline so the sooner the better

sage lichen
#

Looks like some of those solder connections are bridged? 😅

#

Also is there any sort of datasheet for that or anything?

tame topaz
vivid mesa
vivid mesa
#

Is is a switched-mode AC-DC constant current driver i wanted to use as a LED Driver Module to control the brightness of my LED Strips but looks like my deadlines is done for lol 😂 but yeah thanks for the replies @tame topaz @tame topaz

tame topaz
north stream
# vivid mesa I want connect this LED Driver Module to Arduino but i the board is clustered an...

That looks like a mains powered LED driver. In order to control it with an Arduino, you'd need to either switch mains voltage (either with something like a PowerTail or directly with a triac if you have the necessary experience and precautions to work safely with mains voltage), or get creative and modify its feedback circuitry (near the optocoupler) to let the Arduino override it. What are you looking to do? Just on/off functionality, or dimming, or what?

vivid mesa
#

So the LED Diver is used to control the brightness of the LED after getting the information through Arduino from the sensors

north stream
#

I don't think that LED driver is capable of that

vivid mesa
#

What do u suggest i could use instead?

north stream
#

Since you're on a short timeline, maybe just leave the driver alone and PWM the LEDs with a transistor?

rich coral
#
  uint32_t val;
  for (uint16_t i = 0; i < 128; i++) {
    val += analogRead(A0);
  }
  val = val / 128;
  //Serial.println(val);
  float val2 = val / 4096.0 * 3.3 * k;  
  Serial.println(val2);
  return val2;
}```
#

strange problem... it outputs 71233.54

#

if the Serial.println is uncommented, it returns 2066 and 20.09, which is correct

#

how can Serial.println change the value of variables?

zinc mortar
#

Don't you have to include something special on Arduino to make Serial.println handle floats?

rich coral
#

IIRC Arduino Serial.println handles floats since like forever..

cedar mountain
#

Note that you are not initializing val to 0, so it probably is starting with a different value depending on subtle compiler differences between the two code versions.

rich coral
#

the initializer... I must had too much python recently

zinc mortar
#

It'd be nice if the compiler had that warning enabled by default

raven perch
dim tree
#

Hi~! I have a question I am using a Arduino for the software and using a ProTrinket 5V device to program it with, trying to make two different pins have two different effects and I have the code that I will type down below, the Arduino software says its fine but when i upload it doesn't work. Hope someone can help with it. Thanks

livid osprey
north stream
#

The nested loops may not be doing what you're looking for, that will multiply the delays

crystal sail
#

hey, i might have posted about this in the wrong channel before 😅 i’m trying to get a tft spi ILI9341 screen to accept my commands i’m sending with an uno, but even after requesting the power mode (which i thought should return 0x08) i get all zeroes. it still doesn’t send a single 1 if i send the command to disable sleep mode

#

i drive a 1 to the reset pin, CS is 0, DCX is 0 and then i set it to 1 to read commands

#

i read/write on the negedge of the clock

#

is there something i’m forgetting or something specific i’m supposed to do before i send commands?

north stream
slender idol
#

Hi, I need some quick help... I'm trying to connect an SG90 servo to my UNO and the board is shutting down instantly, is the servo making a short circuit? Or can I fix it by using an external power source?

north stream
#

I generally run motors (like servos) on a different power supply than my logic for that sort of reason.

clear flax
#

I was gifted a bunch of these single color LED panels. 2 8x8 LED matrix on each panel, with 24 pins on the back.
I'd like to learn how to interface these with an Arduino. My GoogleFu has failed me, I'm apparently not asking the right questions. Any info is appreciated!

crystal yacht
#

Since the back of the PCB has no matrix driver you might need to add your own.

#

Looks like they only make the display, there's no multiplexer chip on the PCB. You need a multiplexer to drive that many LED's.

clear flax
crystal yacht
#

@clear flax Here's an example of an Adafruit 8x8 backpack. Notice it has a chip on the back to drive the display. The chip will have an Arduino library associated with it. Since your board has no driver chip there's no library to be used without a controller chip. https://www.adafruit.com/product/1048

clear flax
crystal yacht
#

The HT16K33 chip is used in many Adafruit products and has great library support.

dim tree
crystal sail
#

i’ve also read through the docs

#

i actually used some of that code

livid osprey
#

Your second for loop in void loop() appears to be incrementing leds; did you mean blueLeds?

pulsar fractal
#

hello, i have a quick question: i'm using an oled screen, and it doesn't work with the sh1106 library, it uses only the sh110x, and i've had a couple of problems using it, mainly from the lack of documentation,
my question is; how do you lower the contrast / brightness of the screen using the sh110x library, and if someone has the sh110x commands, please link them and thank you

candid wren
#

Hi everyone, quick product question, im trying to find a microcontroller with on board lipo charging like the feathers but at 5v, using it as something that will be plugged in wall power long term but could be unplugged to be wireless temporarily.

livid osprey
#

Closest thing I can see would be an Arduino Uno (or similar) with a lipo shield

candid wren
#

didnt know a lipo shield was a thing, if I can wire the shield with a arduino micro that would be ideal

#

thank u

livid osprey
#

Cytron has one for an uno from factor, not sure if there’s anything in a smaller form factor for the micro

#

If you’re okay with external wiring, there are other products like adafruit power boost or seeed lipo rider

livid osprey
pulsar fractal
livid osprey
#

Which commands did you use? I believe sh1106 contrast is 0x81, but I can’t speak for all sh110x…

pulsar fractal
candid wren
#

@livid osprey I started to look at the lipo breakout (backpack) and found one for a trinket which has the 5v , thank you for your input it greatly helped

mortal bay
#

I am attempting to implement a post request to a https url with ignore certificates.

I have a working proof of concept in python from a pc, so I know how to construct the url / headers / payload and see a correct response. Using requests lib.

But I am struggling to work out which libs I should be using to achieve the same on arduino C, in my case an adafruit M0 wifi. I have it happily connected on my wifi, making NTP time requests etc, so I know that it is generally working, I have shifted the wificlient up to WifiSSLClient and it all still works, but just not sure what lib to import etc to get my HTTPS post capability.

Noting I am coding in VSCode

Any pointers would be greatly appreciated, been grinding this for a few hours, just need pointing in the right direction...

pine bramble
#

Hello, question for the most professionals. I want to include a button_2. but i want button_1 to do case 0 and case 1 and button_2 to do case 3 and case 4. help thanks!

#

how can I do it?

lilac ginkgo
#

You wouldnt want a switch, but a couple of ifs over the bools (state of each button)

#

Also, thats far from a "most profesionals" type of question, and sending text is easier (at least for the people helping) than a pic

#

Typing on phone errors to be expected (also, never used arduino). I would do something like this```c
pin_t buttons[2]; // no idea what this type is
bool states[2]; // remember previous state

// loop over the buttons
for (uint8_t i=0; i < 2; ++i) {
bool state = digitalRead(buttons[i]);

if (state == states[i]) {
// no change, nothing to be done
continue;
}

// we only get here on presses/releases, add a delay for debounce
delay(20);

//update state
states[i] = state;

// do whatever
if(i == 0 && state) { // 1st button pressed
...
}

#

Could maybe delegate into a different function for each button, specially if you add several ones or their logic becomes longer, as in ```c
switch (i) {
case 0:
button0(state);
break;
...
}

mortal bay
#

Well did a lot of digging and convinced myself to try to use the WiFiSSLClient implementation from wifi101, went and got my cert from the site of interest, and understood I needed to try to load it to the m0 wifi via the wifi 101 Firmware Updater. Made sure I changed the pins for my board. Upload the updated sketch, But launching the firmware updater from the Arduino IDE, and it just shows "no supported board connected". Tried everything iI can think of. Is there any experience out there on updating the firmware / uploading certs to the Feather M0 wifi? this is a little frustrating 😦

#

If I can't get the WifiNINA Firmware Updater to work, then I can't update the certs and I can't get this to work for my HTTPS post...

balmy coral
#

Sup, I bought an arduino pack and wanted to know what this is and how I can use it?

shy oasis
#

It is a 3.3/5v power supply for a breadboard. You plug it in to the breadboard and set the jumpers to provide power to the outer rails of the breadboard. Then you attach either a usb cable or barrel adapter to power your project. For USB you need a type A to type A cable (probably came with it)

wild cedar
woven lintel
#

Hey! Does anyone know of a small analog timer for Arduino projects? I’m working on some automation that works on battery and I only want it to work during the day. I’m trying to figure out a way to connect the battery to the Arduino via a timer without using up any additional battery.

#

Preferably something like this for a small circuit

cedar mountain
# woven lintel Preferably something like this for a small circuit

That sort of device actually uses AC power to run a motor to move the dial, I think, so it's not particularly low-power. You might consider something like a real-time-clock chip, as those can use very low currents and will often have an alarm interrupt output that you could use to wake up the Arduino from deep sleep mode, or to kick on a load switch.

woven lintel
#

I’ll check that out thanks!

sage lichen
#

Not sure if this is the right place to ask or not, but I've been having some issues with STM32 code

#

I previously wrote a library that can initialize and read from a bmp581 sensor over i2c, and it was working well. I recently had a new version of my pcb come in, and it works great, except for the fact that this library no longer works 😅 . In my function for initializing the power mode, I am able to read the current power mode, but when I write the new power mode and read again to verify that it switched, I just get "0"...

cedar mountain
sinful saffron
#

I'm trying to use the IR remote library https://github.com/Arduino-IRremote but can't seem to get the example for it working. I'm trying to use these hex codes from https://support.justaddpower.com/kb/article/250-vizio-ir-control/ to put in the SimpleSender program but it's throwing an error "Compilation error: invalid digit "9" in octal constant". This looks like it's because I have 0's in front of each value throwing it off?

GitHub

Arduino-IRremote has 2 repositories available. Follow their code on GitHub.

#

not quite sure that's the right program to use either/command type

cedar mountain
sinful saffron
#

is there any way to convert them with a function?

#

I suppose I could do it manually too

cedar mountain
#

I'm not quite sure what you mean by "convert". The base just affects how you type them, but once they're in the code, they're just numbers (integers) you can calculate with.

sinful saffron
#

I'm just wondering how to take and change the codes from the ir database/website to something that the IRremote library can utilize

#

I imagine I would have to remove the spaces at the very least

cedar mountain
#

I'm not sure at a quick glance. The website seems to be doing some weird "hex in ASCII format" protocol.

halcyon vale
#

Good morning, fine feathered friends! I'm looking to get some help/advice with SWD on a Feather RP2040. Is this a good channel for that? Or is there somewhere more specific?

halcyon vale
# sour tide What about SWD?

I soldered an SWD header on and plugged it in to a Segger J-Link Mini. My computer is seeing the J-Link, but it says it can't find a connected board. Also, GDB seems to be crashing or closing. Not sure if hardware or software problem. I'm on an M1 Mac. Wondering how best to proceed.

#

Oh, and I also get this

sour tide
#

I use the gdb server directly usually and it has to specify the core to connect to too

#

I don't see it specifying it there

#

@halcyon vale for example JLinkGDBServer -if SWD -device RP2040_M0_0

halcyon vale
#

OMG

#

btw, is it normal that the J-Link doesn't show up here?

#

hmm, I think the Terminal version of this got a little farther, but the Arduino IDE is still having issues where GDB is closing

#

When I run in Terminal, it hangs waiting for GDB connection 🤔

sour tide
#

I don't use Arduino at all

halcyon vale
#

I don't suppose there's a way to do this with lldb?

sour tide
#

I use gdb

#

that's pretty much my workflow for rp2040 too

#

(and all cortex-m)

halcyon vale
#

oh huh, I may not have GDB installed because everything on the Apple side is lldb these days

sour tide
#

you'll want the arm gdb too

#

arduino may have installed it somewhere but I think you can brew it too

halcyon vale
#

mm, this one? brew install --cask gcc-arm-embedded

#

already installed, apparently. I think I did this before, because it was in my zsh history

#

do I need OpenOCD? Or is that just for this one tutorial?

sour tide
#

so you can connect to it from gdb directly

halcyon vale
sour tide
#

ya, launch it yourself and then tar ext :2331 to connect to the jlink gdb server

#

gdb will need to know the elf file as well

halcyon vale
#

k, just gotta figure out to launch gdb, since it's apparently not in my $PATH

#

also, the what file

#

wait, is an elf file like a DWARF file? Is this stuff just infected with Tolkien memes? 😆

solemn cliff
#

yup "Extensible Linking Format", from what I read the other one was indeed named as a joke

halcyon vale
#

how do you launch GDB?

#

also how do I give it the elf file? I don't know about an elf file on disk

halcyon vale
#

aha! Had to watch the installer closely. It installed a bunch of stuff, one of which was /opt/homebrew/arm-none-eabi-gdb, which is in my $PATH

#

It worked! I launched gdb in one Terminal and the j-link debug server in the other, and used the tar command above to connect

#

now I just need to figure out how to do all the things with GDB (or, preferably, get it working with the IDE)

#

What do I do with the elf file? I found it after compiling.

#

Also, I'm not able to just run the program normally via the j-link, never mind debugging. Should I be able to?

#

I get this:

Scanning for RP2040 devices
No drive to deploy.
Failed uploading: uploading error: exit status 1

#

oooh, I think the default program running on these things is CircuitPython. Going to try uploading a sketch the normal way first to jog it into the right mode. (I bet I could do something with the boot select switch, but I dunno)

#

No dice 😢

halcyon vale
#

ChatGPT helpfully told me about JLinkCommander, which I used to verify that I was able to connect to the Feather and identify the Cortex-M0 core, so I think that rules out a hardware/connection problem, right?

sour tide
#

you give it the elf file on the command line. my guide above covers the basics of gdb

halcyon vale
#

Is there a better venue to get help directly from Adafruit?

sour tide
#

The forums are the official avenue.

#

It sounds like you need Arduino help

old token
#

Dose anyone know of any code that works with a Arduino pro micro for a 9 key macro pad

lilac ginkgo
halcyon vale
# sour tide It sounds like you need Arduino help

I think you're right. I posted on the forum: https://forum.arduino.cc/t/gdb-server-quit-unexpectedly/1122761

novel igloo
#

Hi, I was wondering if anyone knows of a low-cost projector. The cheapest I could find was DLPDLCR2000EVM which is quite expensive ($100). I'm trying to make my own HUD with an Arduino. I see HUDs and projectors on the market that costs less than $50 which means the projector module they use costs much less than that. Thanks in advance for pointing me in the right direction.

north stream
#

Often it's easier to use a small LCD or OLED display and some optics

novel igloo
cedar mountain
#

OLEDs generally would not be great outdoors. With LCDs, it would depend on the backlight. Note that even commercial AR displays are still struggling to get sunlight readability, so set your expectations for what you can do with $50 appropriately.

novel igloo
cedar mountain
#

I don't have any recommendations offhand, I'm afraid. Have you considered a smartphone-based system? I've seen some products which reflect a phone screen up into the driver's line of sight.

novel igloo
north stream
#

For that kind of brightness, you may be better off with a CRT display

karmic cape
#

I have this mic preamp board and I saw online that you're better off using a "clean" power source like a battery for powering the board itself so it isn't influenced by noise from your main power supply

#

But having to change out a 9V battery with a regulator in a circuit to make sure the preamp works is kind of lame, plus batteries in general are just eh.

#

Is there a circuit or a module or something I can use to turn the power coming from my main supply into a cleaner form that I can give the preamp?

#

I found some people talking about capacitors online, and also something about a "low dropout regulator"

north stream
#

Yes, filtering/decoupling (resistors, capacitors, and inductors) can help, as can regulators (linear regulators, not switching regulators).

#

You can also use isolated power supplies to avoid "ground loop" and noise pickup from wiring issues.

karmic cape
#

The board I'm using actually has a linear regulator on it, which I just noticed

#

But in order to test if it's working, I need to get this SD card working

#
void setup() {
    Serial.begin(9600);

    pinMode(A0, INPUT);

    Serial.print("Checking for SD card... ");
    while (!SD.begin(4));
    Serial.println("done!");

    wavFile = SD.open(filename, FILE_WRITE);

    while (!wavFile);

    Serial.print("Writing header... ");
    writeWavHeader();
    Serial.println("done!");

    Serial.print("Recording... ");
}
#

It gets stuck at Checking for SD card

#

I have CS to pin 4, SCI (or CLK as written in the docs) to 13, MOSI to 11, MISO to 12, and VCC and GND wired up.

karmic cape
#

Got it, had to format as FAT32 instead of exFAT

raven perch
karmic cape
#

I have a program that should allow me to record data to a WAV file on an SD card

#

And at the very end I have Serial.println(SD.exists("data.wav")); which prints 1

#

But when I plug the SD card into my PC, it's blank

#

What gives?

#

Oh, I got it to work once, and now the SD card isn't even recognized by my PC

#

And now it's recognized but it's corrupted...?

#

I think something is not working

#

My end goal is just to write this to a file

hazy socket
#

Hello, I just got my hands on some light modules on a wire that I'm trying to get working with an Arduino Uno R3. The light modules are half spheres with what seems to be 4 RGB Pixels controlled by a LPD8806S 14120 chip. They have 4 input wires for 12V, CI, DI & GND, as well as output wires 12V, CO, DO & GND. I tried using the Adafruit LPD8806 Arduino Library found on github with no luck. Some of the lights turn on when connected, but I'm not having any luck programming anything.

#

Any help would be much appreciated.

#

If I remember correctly, there should be 24 half sphere modules across the wire.

leaden walrus
#

try CircuitPlayground.strip.getPixelColor(n);
where n is the pixel number

#

np. a little weird that its not exposed at the CircuitPlayground level, like setpixel is

#

but luckily strip is public, so can just access directly

hazy socket
north stream
hazy socket
opal hemlock
#

I’m building a project with the Adafruit Trellis MIDI keypad that’s also going to include a looper station (which I needed an Arduino DUE for). I decided to just use the DUE for both because it has two SCL and SDA pins. Buuut the Wire.h file included in the code for the Trellis is apparently incompatible with the DUE? Anyone run across any similar problems or know of any fixes?

north stream
#

There are a few slightly different I2C/TWI implementations. They all do approximately the same thing, but it can take some poking around in files to figure out how to adapt from one to another, or tell a particular peripheral how to use a particular bus.

raven perch
north stream
raven perch
#

Sounds about right, but I can't find any docs on it.

north stream
#

What in particular are you trying to accomplish? Build a version for a new CPU with a particular boot mode?

small trellis
#

hello, quick question:

how can I have two separate instances open of the Arduino IDE? Need to read two serial comms because im testing a client/server project with ESP32s, thanks in advance!

literally clicking on "New Sketch"

wheat condor
#

Hi, I have an ESP32S3 TFT board, that I can't upload sketches to any more. I can still boot into the filesystem mode and copy the factory firmware that way, but even if I do, the micro doesn't boot into the default sketch. I also can't connect to the device via serial tools or the JTAG bridge and the LED is full brightness white. Any ideas, why that may be the case and hints on how to fix this?

wheat condor
#

I also just tried to upload the factory firmware .bin (not the .uf2), same result

wheat condor
#

Never mind, I was finally able to recover the device, I'm not exactly sure which try, order or how

foggy anchor
#

I everyone, recently I have discovered the new W5300 toe shield from Wiznet, it's a shield for rj45 and I was wondering if it is possible to use it with an esp32 such as the seeed studio esp32-c3 or the firebeetle esp32-e ?

#

as far I can see we can use parallel bus interface to control it but I don't know how does it work and if it is possible to use this with my boards

safe shell
raven perch
north stream
#

Are you using an already-supported chip, or adding a new one?

raven perch
#

I think I'm gonna go with a different solution, but thanks for the help.

uncut coral
#

I think I was in the wrong support chat.

I'm having trouble with a tutorial I was following on the website.
I have a pre-written project designed to work with ST7735 and ST7789 SPI LCDs.
I thought using an ILI9341 would be plug and play, but it's proven to be pretty tough to figure out 😅

livid osprey
uncut coral
livid osprey
# uncut coral Hi! Thank you, this is the tutorial. Presently my code is essentially the direct...

Ah, this. The main changes that have to happen include 1) the inclusion of the Adafruit ILI9341 library, 2) the DISPLAY_WIDTH and DISPLAY_HEIGHT, and 3) the “tft” object, which in this example is type ADAFRUIT_ST7789, but needs to be ADAFRUIT_ILI9341 and use its own constructor.

Aside from that, just make sure your wiring matches that of the tutorial, and understand your frame rate may be slower than the original project intended due to more data per frame. I don’t know of anything else in the code that would be an issue, but if you do run into errors, feel free to share those here as they appear.

uncut coral
#

Oh awesome!
So I've been picking through the ILI9341 library to make sense of things.
I swapped over all of the values, when you say the ILI9341 needs it's own constructor is that the issue on line 243 where tft.init is called but doesn't exist in the 9341 library?

livid osprey
# uncut coral Oh awesome! So I've been picking through the ILI9341 library to make sense of th...

I was thinking the line defining what the object tft is. In the code, the method Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST); is what we call in programming a constructor, as it’s a function that “constructs” the object for the first time. You’ll need to replace this line with the appropriate code for the ILI9341.

As for the lack of an init() function, I’d be surprised if that was the case, but I can’t say for sure offhand.

karmic cape
#

How could I pass a file stored on an SD card by an Arduino to a raspberry pi?

#

Oh I can plug the arduino to the pi via USB and do serial stuff, duh.

uncut coral
livid osprey
#

Did it work?

uncut coral
#

Yup! Everything is excellent. Thanks a ton Hem!

runic lichen
#

Hello can anyone help me im using a MAX 4466 connected to an Arduino uno as input, the microphone doesn't pick up any sound unless I tap on it. is there any way to fix that as im using this microphone for locating the position of the person who is speaking.

north stream
#

Digital input or analog?

#

To locate a person, you'd need more than one microphone and some software to capture the timing

runic lichen
#

Analog and im using 4 microphones

#

The code functions as intended but only when you tap the microphones as it rotates towards the stronger signal, sorry I didn’t mention this before it’s a robotic head that faces the person speaking using servo motors

north stream
#

Weird, there's not much to it, just power, ground, signal, and a gain adjustment. How are you reading the data?

olive vault
#

Hello, I am trying to identify the model of this TFT LCD and use it, any help will be apriciated

shy oasis
olive vault
#

Thank you though!

olive vault
#

Can anyone help me? I am struggling to get the touch portion working correctly

north stream
#

What happens? Does it work at all?

low mirage
#

Hey there, was hoping I could get some pointers here for getting Serial1 to work the way I need it to on a Feather M0

#

How all do I set SERIAL_8N1 and inverted logic for the port?

#

not super familiar with working with M0/SAMD stuff

north stream
#

I'm unsure if Arduino supports details like that, you might have to crack open the data sheet, find the appropriate registers, and write to them directly.

low mirage
#

Ah dam. The ESP32 stuff supported it super easy but the SAMD stuff seems to be slightly different.

low mirage
#

SAMD doesn't seem to like it though.

olive vault
jaunty fox
#

does anyone know what pin i should try to use to read battery voltage on the rp2040 feather with dvi?

solemn cliff
fathom summit
#

Does anyone know why my ESP8266 is timing out? It works fine with AT commands I was able to connect to my network but doing it within the IDE only returns timeouts?

north stream
#

Power supply? Flow control?

cold lagoon
#

whats the max recommended cable length between MCU and NeoPixel?

#

cause i have a 1m ribbon cable that carry's + - and Data to the NeoPixel and for some reason the NeoPixel is flickering when changing the color a lot (fading colors)

north stream
#

If the lead carrying the 0 volt reference between the MCU and NeoPixel is also carrying the power return, an effect called "ground bounce" can corrupt the data. I like to run a separate return wire from the strip to the MCU (for a clean data reference) and another to the power supply (for the power return). Additionally, you can add capacitance at the NeoPixel end to absorb power spikes, and include a small amount of resistance (100-1000 ohms) in series with the data line to absorb reflections.

thorny lintel
#

I found some code ages ago for the 28BYJ-48 motors and it was running PWM and the movement was really smooth and quiet

I've somehow lost the code a few months later and I cannot find it online at all, anyone have any ideas?

#

Also I've seen that you can drive the motors with A4988 drivers

Any advantage? For my projects my motors just rotate, under barely any load

north stream
#

They're low power motors, so you can drive them fairly easily with ordinary TTL gates as "drivers". But of course, using drivers specifically for stepper motors will work too. Some of the fancier drivers give you some handy options which may or may not be useful to you in any particular application.

thorny lintel
#

Yeah I'm looking into using TMC2208's

Smoothness is the goal and that ties in with silence too

#

I've just had a bunch of these PCBs made which is bad timing

#

But will make the same shield but for TMC2208's

#

I've noticed what code you use really dictates the volume/smoothness of the motor, and they are decently quiet with the code I am running with the ULN2003's but it could be better

#

As you can see I've got a blank space where a decoupling cap could go, I haven't noticed any difference with or without one, is this naughty???

north stream
#

That's Earl "Madman" Muntz's approach to engineering: delete a component, and see if it still works. Frighteningly, it's often a valid way to do things. The chips are pretty tolerant to noisy power, so as long as your controlling logic has clean power of its own, it's probably fine. You may be rounding off the drive waveforms to the motor slightly, which could reduce torque, speed, vibration, and noise. Since you may not care about the first two, doing without the capacitors might actually be an advantage.

#

With more delicate circuitry, you do need to pay more attention to power quality, noisy power can slowly degrade some circuitry. But stepper drivers? Those have to be robust to spikes, surges, brownouts, and the like.

mystic walrus
#

Hi

I am using your library to connect VL53L1x to an ESP32

After connecting the sensor to the ESP32 I upload your library with no error message, but I can't get any measurements.

I am connecting the SDA to GPO21 and the SCL to GPO22 and of course the V5 and the GND

I can't figure out what is wrong. Do I have to declare the IC2 different in your library?

Can you please give me some advise. I am using arduino IDE

leaden walrus
#

the default pins used for i2c will be set by the board being selected in the arduino ide

#

there's unfortunately no real standard for specifying alternate pins in user sketches

mystic walrus
#

In the esp32 data sheet they the following

#

Then this does not work because of the code ?

leaden walrus
safe shell
#

@mystic walrus (sorry I directed you to the wrong place)

mystic walrus
#

When I run the I2c scan this happens

#

@safe shell not a problem, hope I am in the right place now

leaden walrus
#

looks like its returning something for every address. could be a wiring problem. can you post photos of the setup showing how everything is connected.

mystic walrus
#

The 5v goes to 5v
GND to GND
Green SDA goes to GPO21
Hello SCL goes to GOP22

leaden walrus
#

try powering with 3V instead of 5V

mystic walrus
#

Still the same

#

I check and the correct power goes in

#

It is so frustrating looks like everything is ok, I even tried with different esp32 and still the same,l

mystic walrus
#

Can someone give me an advise ? What should I do ?

north stream
#

Basically what people said: that "answering on lots of addresses" either points to a hardware issue (stuck signal, missing pull-up resistor, voltage mismatch, bad connection, etc.) or a broken chip.

mystic walrus
#

@north stream I purchased an arduino uno r3 and the problems is till the the same. The connection are checked and they are fine. I guess the only thing now is to replace the Vl53 sensor

north stream
#

If you have any other I2C devices handy, it might be worth trying it with one of them to verify the wiring

mystic walrus
#

Unfortunately I don’t. It’s the first sensor I bough. I would be incredible unlucky to spent two day to work it out and then at the end the sensor is faulty

north stream
#

That doesn't happen often, but it has been known to occur. And yes, it's supremely frustrating.

mystic walrus
#

The only other option is the pull up resistor, but I saw plenty of videos without the pull up resistor

cedar mountain
mystic walrus
#

I will order them one TOF sensor from adafruit. Do you know how I can get them in UK

gilded swift
mystic walrus
#

My sensor is from pimoroni. Does it say in the data sheet if requires pull-ups

gilded swift
#

This one?

mystic walrus
gilded swift
mystic walrus
#

This is how I have it connected

gilded swift
#

Looks like you have 3.3V connected to 5V

mystic walrus
#

The sensor has from 3 to 6

cedar mountain
#

I think the sensor has a "3-6V" input pin, so it probably has an onboard regulator.

gilded swift
#

Ah my brain replaced 3-6 with 3.3

#

Okay, that’s sorted..

mystic walrus
#

This what is happening when I run the scanner

gilded swift
#

And it doesn’t print out found for any?

mystic walrus
#

No, I will make a shot video for you

gilded swift
#

Okay 👍🏻

mystic walrus
gilded swift
#

Very strange..

#

Maybe the sensor is dead

#

It appears that pull ups are present on the board, so the only other thing I could this is maybe swap the pins for SCL/SDA on the incredibly unlikely chance they are backwards

mystic walrus
#

Which one are the pull ups ? When I swap the SCL/SDA

#

Tell you what, this is really annoying 😂😂😂

gilded swift
mystic walrus
#

Got it

#

Then I guess the only alternative is to order another sensor and try

gilded swift
#

Might be worth picking up a $25 usb logic analyzer

#

You can then see what the Arduino is sending, verify the frames being sent

mystic walrus
#

I will have a look. I will post here when a new sensor comes is an I will try it

#

I hope is that

spring sand
#

I am using the Round rect screen from the store, and I am trying to get a pic from a sd card to wirte to the screen. I keep getting"Initializing filesystem...SD begin() failed
" in the serial monitor. Does anyone know what I am doing wrong

#

I have the SD CS pin hooked up to Digital 4 and I am using the pinout provided on the learn guide.

DC -- 8
RST -- 9
TFCS -- 10

#

The power is connected to 5v and ground

spring sand
#

Sure

gilded swift
#

For the sake of maybe the speed is too fast, change SD_SCK_MHZ from 10 to 1. Im not sure how fast spi on the atmega328p on the uno can do.

#

It says 16MHz the clock speed so never mind on that idea.

gilded swift
spring sand
#

So sorry for the late response! Let me change that setting

#

That did not work like you said. I don't think I have formated it. How could I check that? I am new to the sd card code and everthing. Because you know about my watch, this is what will hold all of the icons that will be used, just like an Apple Watch.

gilded swift
#

Don’t worry about the display yet, just try and get the sd card working. You’ll want to make sure the sd card is formatted properly and that you. An at least write and read from it

spring sand
#

Ok I have downloaded the formatter fro the learn guide and formatted it but iot is still not working

gilded swift
#

And the SD card is properly inserted into the slot?

#

I’m not sure if yours is a push to secure/release or the other kind

spring sand
#

It is a San disk that I bought Mandy a month ago from Walmart so I guess it is the most recent

gilded swift
spring sand
#

It is like the one in the picture from the learn guide that you sent

#

I have been using all of the formaters and it is only formating it to exFAT or NTFS. Is this because I am using a Sandisk ImageMate sd card.

This is a pic of what my card looks like

gilded swift
livid osprey
#

Fat32 is the upper limit for most, and if your on an arduino uno, ideally you find something small enough for Fat16 or Fat12.

#

When arduino uno was the big kid on the block, SD cards were still in the megabytes haha

spring sand
#

Ok do you have an SD card you would recommend that is from Amazon or something so I can get it faster than ordering it from adafruit

gilded swift
spring sand
#

Thank you, would it be possible to use a 7,6,5,4 gb sd card. My files are fairly small, but I plan on using a ton of icons

north stream
#

I don't recommend any SD cards from amazon, but Microcenter and other reputable sellers have nice 8GB Sandisk cards for affordable prices.

spring sand
north stream
#

Usually they're powers of two, I haven't seen 5, 6, or 7GB. 4GB is getting harder to find, but there's probably stock available somewhere, possibly in bulk for an attractive price.

spring sand
#

I think I found the problem
In the store they say that you need to use this type of sd card(pic 1) which is not a SD card it is a SDHC card.
In the card that I have, not only does it have to big of storage, It is SDXC (pic2).

north stream
#

I think HC is "high capacity", and XC may be even more. I doubt you'd find 4GB HC cards.

spring sand
#

I found a 8gb that they recommend I will just order it from Adafruit

spring sand
#

I found this one that looks like Adafruit’s one, and it is already formatted to FAT32 which means I can go back and program it to FAT16. Think this is good?

north stream
#

That looks like an amazon listing, and amazon is full of fakes.

mystic walrus
#

@gilded swift @north stream
I just got a new sensor and worked beautifully.

mystic walrus
#

How can I decrease the amount of measurement that the Vl53l0X
If I want to make a ruler and the target is completely static the dimensions keep bouncing a lot

north stream
#

One thing you can do is take several measurements and average them, that will tend to smooth out the variation

edgy ibex
#

Looking at the page for the feather 8266, I don't see any mention of PWM in the bullet list of specifications. Is the ESP8266 capable of hardware PWM, even on a single pin?

gilded swift
#

The 8266 is fairly outdated. You could get more features from the new Feather Huzzah esp32, plus I believe you’d get hardware PWM

tacit jewel
#

is there a way to remotely upload code to the arduino we have a vpn thats connects us to the local network somewhere else

charred jacinth
#

Has anyone know about connecting the adafruit PDM MEMS Microphone to a ItsyBitsy nRF52840.

#

I wired it all up and it just reads -8 the whole time

#

I used the pdm serial monitor exapmle code and it just reads -8. Says they’re a device

#

This is my wiring diagram for it

#

Everything in the diagram is wired and everything but the microphone works

#

Not sure if this is the channel for it. If not tell me where

north stream
manic jewel
# charred jacinth

According to your diagram, the GND on the microphone is connected to Strip2 ground. Both of these should be source from the ItsyBitsy G pin.

green thunder
#

Using a Neo Trinkey M0, I'm trying to analogRead() either of the pins used for touch sensing to seed a random number generator. Seems like this should work based on the pinout diagram, however the code seems to hang in the analogRead() function. Has anyone experienced this before, or otherwise might know why this wouldn't work? It works fine on the QT Py M0. Also, I tried this on 2 different Neo Trinkey M0 boards and the result is the same on both of them 🤔

leaden walrus
#

should just work. are you testing with a simple sketch to verify it's hanging on just the call to analogRead()?

charred jacinth
charred jacinth
charred jacinth
#

Is the thing probably damaged then?

charred jacinth
north stream
charred jacinth
#

guess ill try to wire it up and see

#

thats so much for the help

green thunder
leaden walrus
green thunder
manic jewel
charred jacinth
#

They’re dotstats

#

They have another power and ground that’s not on here

median current
#

Hello, i need help,
i have 2 servos hooked to same power source (4aa in series)
(like seen in the image below) and it is causing trouble (when it didn't before)
The servos start to jitter (and wont play an animation, sometimes one will begin spinning 360 even tho is a 180 servo)(the same problem happens when i try to connect a servo to the other power source which only has one servo)
How can i fix this?

livid osprey
median current
#

Red=positive
Brown/black =ground
Yellow=PMW

livid osprey
#

Can your system run one servo just fine?

median current
livid osprey
#

If you have a scope, try measuring the voltage at the power source. I imagine AA batteries might be having trouble delivering enough current to two servos and the voltage is sagging as a result?

leaden walrus
median current