#help-with-arduino

1 messages · Page 17 of 1

tame raptor
#

yes

#

it is

#

thanks i'l look into it

merry cargo
#

Pretty sure it's DHT dht; instead of dht DHT;
(type followed by variable name rather than variable name followed by type)

north stream
#

Like double trouble; or float boat;

north osprey
#

#include <Wire.h>
#include <Adafruit_MLX90614.h>
#include "MAX30105.h"
#include "heartRate.h"

Adafruit_MLX90614 mlx = Adafruit_MLX90614();
MAX30105 particleSensor;

const byte RATE_SIZE = 4; // Increase this for more averaging. 4 is good.
byte rates[RATE_SIZE]; // Array of heart rates
byte rateSpot = 0;
long lastBeat = 0; // Time at which the last beat occurred

float beatsPerMinute;
int beatAvg;

void setup() {
Serial.begin(9600);
Wire.begin();
mlx.begin();

Serial.println("Initializing MAX30105...");
if (!particleSensor.begin(Wire, I2C_SPEED_FAST)) {
Serial.println("MAX30102 was not found. Please check wiring/power.");
while (1);
}
Serial.println("Place your index finger on the sensor with steady pressure.");

particleSensor.setup();
particleSensor.setPulseAmplitudeRed(0x0A); // Turn Red LED to low to indicate sensor is running
particleSensor.setPulseAmplitudeGreen(0); // Turn off Green LED
}

void loop() {
float body_temp = mlx.readObjectTempC();
float ambient_temp = mlx.readAmbientTempC();

Serial.print("Body Temperature: ");
Serial.print(body_temp);
Serial.println(" °C");

Serial.print("Ambient Temperature: ");
Serial.print(ambient_temp);
Serial.println(" °C");

long irValue = particleSensor.getIR();

if (checkForBeat(irValue) == true) {
long delta = millis() - lastBeat;
lastBeat = millis();

beatsPerMinute = 60 / (delta / 1000.0);

if (beatsPerMinute < 255 && beatsPerMinute > 20) {
  rates[rateSpot++] = (byte)beatsPerMinute;
  rateSpot %= RATE_SIZE;

  beatAvg = 0;
  for (byte x = 0; x < RATE_SIZE; x++)
    beatAvg += rates[x];
  beatAvg /= RATE_SIZE;
}

}

Serial.print("IR=");
Serial.print(irValue);
Serial.print(", BPM=");
Serial.print(beatsPerMinute);
Serial.print(", Avg BPM=");
Serial.print(beatAvg);

if (irValue < 50000)
Serial.print(" No finger?");

Serial.println();

delay(1000); // Delay for 1 second
}

#

can someone help me with this code because the code is error the output its says nan

eternal cloud
pastel hemlock
pastel hemlock
#

@eternal cloud There's a code-of-conduct that includes "Engaging in behavior that creates an unwelcoming or uninclusive environment" ... giving your 🚫 with zero explanation on a useful suggestion qualifies. Explain what you mean, or take that away.

eternal cloud
north osprey
eternal cloud
north osprey
eternal cloud
north osprey
#

is it correct the wired like this?

eternal cloud
scarlet pollen
#

Please help:
// Try Everything! Happy Hacking 🙂

#include <Arduino.h>
#include <Servo.h>

Servo servo_9;

void setup() {
servo_9.attach(9);
}

void loop() {
Serial.begin(9600);
if (Serial.available()) {
servo_9.write(receivedDataFromSerial);
}
}

modern dawn
#

Assuming that the data coming from serial is binary values (0 to 190), replace receivedDataFromSerial with Serial.read()
if it is text values instead, it will need something like Serial.readBytes or Serial.readString plus processing to convert to a value that Servo.write() can handle. Better would be to write a separate function to do the read, validate the result, and provide the value as it's result. See https://www.arduino.cc/reference/en/language/functions/communication/serial/ for options and details for serial reads.

terse smelt
#

I'm trying to use a cheap PCM5102 I2S DAC with an ESP32-S3 feather and for some reason it's not outputting anything, here's my setup code:

I2S.setDataInPin(DIN_PIN);
  I2S.setSckPin(SCK_PIN);
  I2S.setFsPin(LCK_PIN);

  if (!I2S.begin(I2S_LEFT_JUSTIFIED_MODE, 44100, 16)) {

    Serial.println("Failed to initialize I2S!");

    while (1); // do nothing

  }

DIN_PIN is connected to the "DIN" pin
SCK_PIN is connected to the "SCK" pin
LCK_PIN is connected to the "LCK" pin, but I'm not sure if it's just the "FS" pin with a different name like I assumed.

#

I think I found the problem, it should be I2S.setDataOutPin, not I2S.setDataInPin

obtuse mist
#

Any idea why declaring a NeoPixel strip on a RP2040 USB Host Feather would hang the chip and/or the USB stack?

#

I don't have to do anything but this declaration:

#

Adafruit_NeoPixel pixels(NUMPIXELS, PIN);

#

NUMPIXELS is 1 and PIN=PIN_NEOPIXEL

#

I'm starting to think it has something to do with using multiple cores

deep grotto
#

Adafruit TFT LCD Arduino -- File not found issues.

obtuse mist
#

Ok, I understand - the Neopixel library uses a PIO so if I enable Pico-PIO-USB, they conflict. Big Bummer. Anyone know if the NeoPixel library can revert to bit-banging?

true olive
#

Hey Ya'll, I am testing out my little model rocket payload that i wrote. It is using a feather m4 express. It was all working yesterday, but now I am running into an issue where it always fails to write to the file using the onboard storage and I cannot for the life of me debug why!

Here is my repo: https://github.com/deibeljc/rocket-telematics/tree/main
And here is explicitly where it is failing: https://github.com/deibeljc/rocket-telematics/blob/main/FileHandler.cpp#L62

I have confirmed it successfully creates and opens the file, just dies when it tries to write to it. This same code had worked awhile ago, but I was wrangling with the GPS module for a long time.

Here is what the output looks like:

09:36:42.057 -> Trying to get GPS Fix 0
09:36:56.232 -> Got GPS Fix10
09:37:01.851 -> Calibrated Ground Level Altitude: 243.00
09:37:20.952 -> State changed to LAUNCHING
09:37:44.373 -> Error writing to file
09:37:44.373 -> Error writing to file
09:37:44.373 -> Error writing to file
09:37:44.373 -> Error writing to file
09:37:44.373 -> Error writing to file
09:37:44.405 -> Error writing to file
09:37:44.405 -> Error writing to file
09:37:44.405 -> Error writing to file
09:37:44.405 -> Error writing to file
09:37:44.405 -> Error writing to file
09:37:44.405 -> Error writing to file
09:37:44.439 -> Error writing to file
09:37:44.439 -> Error writing to file
09:37:44.733 -> State changed to DESCENDING
09:37:44.764 -> State changed to LANDED

Any help or direction would be greatly appreciated! I banging my head against a wall atm!

plush timber
#

I was using the Trinkey Neo as a rubber ducky, and was wondering if i could still use the rgb lighting when using the ducky scripts and features

#

Maybe have one led as a status indicator and the other 3 as rgb fading in and out...possible?

inland gorge
terse smelt
scarlet pollen
#

Can someone find pinout for this ir sensor?

delicate cairn
#

PLEASE HELP! im trying to get a range value from this maxbotix XL sensor, its works with the UNO i have but the UNO is too big, ive been trying to get it to work on an itsy bitsy 5v and even with the SCL and SDA pins pulled high i am getting 0s in the serial monitor

stable forge
#

did you set the board to Itsy?

delicate cairn
#

maxbotix thinks it has something to do with the processor

stable forge
#

are you looking at the serial monitor? It will print "Device found at:" or "Couldn't start"

#

did you set the board to the right board in Arduino IDE?

delicate cairn
#

14:39:21.660 -> 222
14:39:21.751 -> 224
14:39:21.843 -> 226
14:39:21.913 -> 228
14:39:22.031 -> 230
14:39:22.114 -> 232
14:39:22.249 -> 234
14:39:22.343 -> 236
14:39:22.420 -> 238
14:39:22.529 -> 240
14:39:22.654 -> 242
14:39:22.749 -> 244
14:39:22.842 -> 246
14:39:22.915 -> 248
14:39:23.031 -> 250
14:39:23.156 -> 252
14:39:23.250 -> 254
14:39:23.250 -> Address polling complete.
14:39:23.343 -> Sensor range: 0
14:39:23.435 -> Sensor range: 0
14:39:23.559 -> Sensor range: 0
14:39:23.651 -> Sensor range: 0

delicate cairn
#

it should be the default address at 224

stable forge
#

are you sure SCL and SDa are not swapped?

delicate cairn
#

I have the pull up resistors going through the push button bc I wanted to see if it made a difference when it was pulled high or left alone.

stable forge
#

the soldering on the SDA pin and some others doesn't look that great.

#

does the maxbotix already have pullups?

delicate cairn
#

No it doesn't

#

They told me it would need pulled up

delicate cairn
#

I can get this board to work with other I2c elements like the OLED screen and the rotary dial

stable forge
#

is that a DPST pushbutton? or just a regular tactile button? If you have a meter make sure there is 5v on both resistors when pressed

#

what value resistors are you using?

#

those ones have pullups already

#

could you give me a link to the maxbotix?

#

measure the resistors with your multimeter and make sure they're the right value

#

also looks like the scl one is not connected

delicate cairn
#

1kohm

delicate cairn
stable forge
#

yah, depending on the rotation of the button, you might not be connecting anything

#

with a tactile button, it always works to use diagonally opposite corners. You don't need separate 5v wires to the resistors here. but in any case, you don't need the button, because you do need pullups

delicate cairn
#

same issue with the sonar, everything else works as expected.

stable forge
# delicate cairn

is that a long breadboard? Many have a split in the middle: the power rails only go halfway across. Make sure there is 5v on the resistors

delicate cairn
stable forge
#

what is the color code on the resistors. I am color-deficient

#

it's a bit fishy to me it says 4.5v instead of closer to 5v

#

though if the display is working the pullups are probably ok

delicate cairn
#

Honestly I had the display working a few weeks ago without the pullups so that's what had me confused. It could be my Kline I've had it for a few years but it's consistent along the rail

delicate cairn
stable forge
#

brown black black is 10 ohms. but they measure 1k ohms??

#

ok never mind, I read the reading

stable forge
#

if you have resoldered you could try swapping SCL and SDA just to the Maxtronic. I don't have any other suggestions. The i2C code they supplied is very low level. I looked for a better library but I didn't find it. The chip used on this is a 32u4, which is the same as on the Leonardo. Do they have any experience with that?

delicate cairn
#

works great on the uno with the SoftI2c

stable forge
#

how about with regular Wire?

#

you could try 100kHz here instead of 400

delicate cairn
#

I havent tried on the uno with regualr wire

stable forge
#

they are using low-level I2C operations

#

I think there might be a softi2c for 32u4 also

delicate cairn
#

is there?

delicate cairn
# stable forge <https://www.arduino.cc/reference/en/libraries/softwire/>

same behavior... 16:21:32.752 -> 220
16:21:33.856 -> 222
16:21:34.981 -> 224
16:21:36.136 -> 226
16:21:37.269 -> 228
16:21:38.387 -> 230
16:21:39.530 -> 232
16:21:40.610 -> 234
16:21:41.772 -> 236
16:21:42.860 -> 238
16:21:44.029 -> 240
16:21:45.135 -> 242
16:21:46.238 -> 244
16:21:47.391 -> 246
16:21:48.511 -> 248
16:21:49.633 -> 250
16:21:50.783 -> 252
16:21:51.886 -> 254
16:21:52.913 -> Address polling complete.
16:21:53.055 -> Sensor range: 0
16:21:53.179 -> Sensor range: 0

stable forge
#

Did you resolder the SCL and SDA pins?

#

Try just detaching the wiring from the Itsy board and plugging it into an Arduino, without disturbing anything else, using the existing breadboard wiring, and retry with the Arduino. Make sure your source code is the same on the two boards.

#

inspect the soldering on all the pins

delicate cairn
delicate cairn
#

So after messing around a bunch it seems like i can only get the sensor to give me a reading when this code is intact, on the uno. i tried to just change the 2 pin definitions to the itsy bitsys (SCL 3 SDA 2) and that didnt work. changing the Library to add the OLED didnt help either, pretty sure i cant get a reading without it set up just like it is in the example. at least so far. I will return to this because i really wanna solve it but im pretty sure i am way out of my league

delicate cairn
stable forge
#

Not at all. This is somewhat mysterious. The I2C code is pretty fragile.

signal dome
#

I'm trying to use the adafruit motor shield v3 with a Arduino Mega2560 to run a stepper motor, but none of my motor outlets showing voltage when I run my code. There is power getting through to the shield though since if I put my multimeter probes on the 5v and Gnd circles it shows 5V. Could I please get help?

Here is the code I used for the motor (testing with a DC motor rn for troubleshooting purposes):

#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_MS_PWMServoDriver.h"

Adafruit_MotorShield AFMS = Adafruit_MotorShield(); 

Adafruit_DCMotor *myMotor = AFMS.getMotor(1);

void setup() {
 AFMS.begin();
  myMotor->setSpeed(150);
}

void loop() {
myMotor->run(FORWARD);
}
eternal cloud
# signal dome I'm trying to use the adafruit motor shield v3 with a Arduino Mega2560 to run a ...

You don't need "power getting through to the shield", that is not enough to make motors work.
Motor shields have their own VIn and GND pins, and need to be powered separately, from a good, high current, power source, in the voltage indicated in the board datasheet.

(if you have this board https://docs.arduino.cc/hardware/motor-shield-rev3/ the voltage supported is 5-12V , and there is a tutorial there too)

twilit jackal
#

Hello, I'm doing my own LED strips using IR receiver, transmitter and WS2812b. Everything went well until I tried to do some effect with adafruit_neoPixel.h library (the official one). I opened examples and tested it on 8 led diodes, tried to add effect from examples and found out, it blocks my arduino. I have IR read in void loop, so if I press any button for example 2, it will recognize it and tell it to be red color, but when I do some effect where is delay(), it blocks my arduino and I wanna ask, is there any possibility to do it with millis() instead?

void colorWipe(uint32_t color, int wait) {
  for (int i = 0; i < strip.numPixels(); i++) {  // For each pixel in strip...
    strip.setPixelColor(i, color);               //  Set pixel's color (in RAM)
    strip.show();
    //  Update strip to match
    delay(wait);  //  Pause for a moment
  }
}
stable forge
# twilit jackal Hello, I'm doing my own LED strips using IR receiver, transmitter and WS2812b. E...

millis just tells you what time it is. So you can use it to see if a certain time has elapsed.

The problem above is that colorWipe is "blocking": it doesn't return until the wipe is completely finished. You'll have to break up what it's doing and do each step in the main loop(), checking the time (with millis() ) to see if it's time to do the next step.
https://learn.adafruit.com/multi-tasking-the-arduino-part-1 (and parts 2 and 3)
https://www.programmingelectronics.com/tutorial-16-blink-an-led-without-using-the-delay-function-old-version/
https://www.reddit.com/r/arduino/comments/13otfza/psa_youre_probably_using_delay_when_you_want_to/

twilit jackal
#

Also it's blocking here, when I do it with the while function @stable forge

stable forge
#

it's blocking there because colorWipe is blocking, yes

twilit jackal
#

I only know with millis the base if(currMillis - prevMillis > interval) do something

stable forge
#

The "Multi-tasking" guide (first link) includes neopixel exmaples

#

that's the point of millis, it's just saying what time it is. So you can see how much time has elapsed. It's not really comparable to delay except that both deal in time

twilit jackal
#

and how to implement it in colorWipe?

#

ended up with this, but in the end, it doesn't work and skip all colors to the end and it's blue, don't see the animation

stable forge
stable forge
stable forge
#

unfortunately one of your comments in the code contains a substring that is a blocked words

signal dome
leaden walrus
eternal cloud
#

Also, what cater said, please solder your headers **AND **the block terminals - it doesn't show in the pic if you soldered those or not, but they **must **be

twilit jackal
stable forge
signal dome
#

Wait the block terminals are the green bits right? That came attached when I bought it.

tardy iron
signal dome
#

Here is my current setup the headers are soldered along with the logic bridge, I still can't get the motor to run.

code:
#include <Wire.h>

#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_MS_PWMServoDriver.h"

Adafruit_MotorShield AFMS = Adafruit_MotorShield(); 

Adafruit_DCMotor *myMotor = AFMS.getMotor(1);

void setup() {
 AFMS.begin();
  myMotor->setSpeed(150);
}

void loop() {
myMotor->run(FORWARD);
}
signal dome
tardy iron
tardy iron
signal dome
tardy iron
signal dome
#

mega 2560

tardy iron
signal dome
#

it says adafruit motorshield v3 on the front, it's not the rev3 motorshield though

tardy iron
signal dome
#

sorry I'm new to this. wdym by rev of the mega board. The pins are lined up properly though

tardy iron
signal dome
#

the SCL and SDA pins of the shield are lined up with the SCL1 and SDA1 of the mega board

tardy iron
signal dome
signal dome
#

I'm trying to load it, but my serial monitor is stuck on loading

tardy iron
signal dome
signal dome
# tardy iron that looks like the Arduino web IDE. people have reported lots of problems with ...

It says there are no I2C's
I ran

//
// SPDX-License-Identifier: MIT
// --------------------------------------
// i2c_scanner
//
// Modified from https://playground.arduino.cc/Main/I2cScanner/
// --------------------------------------

#include <Wire.h>

// Set I2C bus to use: Wire, Wire1, etc.
#define WIRE Wire

void setup() {
  WIRE.begin();

  Serial.begin(9600);
  while (!Serial)
     delay(10);
  Serial.println("\nI2C Scanner");
}


void loop() {
  byte error, address;
  int nDevices;

  Serial.println("Scanning...");

  nDevices = 0;
  for(address = 1; address < 127; address++ )
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    WIRE.beginTransmission(address);
    error = WIRE.endTransmission();

    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.print(address,HEX);
      Serial.println("  !");

      nDevices++;
    }
    else if (error==4)
    {
      Serial.print("Unknown error at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.println(address,HEX);
    }
  }
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  else
    Serial.println("done\n");

  delay(5000);           // wait 5 seconds for next scan
}

But this is what my serial monitor outputted:
Scanning...
No I2C devices found

tardy iron
signal dome
signal dome
vivid rock
#

and looking at your photo, looks like not all header pins are soldered

#

this is the most likely cause

tardy iron
# signal dome

most of those solder joints look cold, with the pad barely wetted by the solder. they’re likely not making good connections. they need to be reflowed, and some might need more solder

tardy iron
tardy iron
supple turret
#

The pins on the left need a going-over too...

#

Looks like you might have a little (potential) bridging going on there.

tardy iron
signal dome
#

I can probably unsolder the logic jumper later, as the stepper motor I have is 12V.

eternal cloud
#

It cannot work straight from Arduino

signal dome
#

I have a 5V motor i'm using to test it rn. I can get a 12V source though.

eternal cloud
#

Powering the shield is still necessary.

#

Either the motor won't work, or you will burn your Arduino.

signal dome
signal dome
#

My motors work now, thank you all for the help. I really appreciate it

edgy ibex
#

Any interest in a bug report for the Airlift Breakout running with the WiFiNINA package downloaded from the link in the Learn guide for the breakout. MCU in use is a Pi Pico, and while I very much doubt it's causing the problem, it's using a userdefined set of pins for SPI rather than whatever the default is on the Pi Pico.

terse smelt
#

Hey so I'm having problems with an ESP32S3 board, the compiler keeps saying there's multiple "SD.h" libraries and the "FS.h" library supplied with the ESP32 boards library prints out a bunch of errors that look like this:

C:\Users\jaide\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.16\libraries\FS\src/FS.h:24:10: fatal error: memory: No such file or directory
 #include <memory>
          ^~~~~~~~
compilation terminated.
stable forge
north stream
safe shell
#

@edgy ibex I don’t think there are default pins for spi on pico

vivid rock
vivid rock
edgy ibex
edgy ibex
#

Possible Airlift Breakout Bug

vivid rock
#

anyone knows what is the value of size_t for ESP32 Arduino core (to be precise, ESP32S3 if it matters)?

gilded swift
tardy iron
#

has anyone else gotten lots of random segfaults with a debugger attached to a nRF52840, but only if BLE is being used in the code? the code runs fine if no debugger is attached

gilded swift
#

52811 is a trimmed down 52840

#

M4, just less ram and flash

#

This is even using the nRF examples so it’s possible newer bootloaders could be causing issues

tardy iron
#

ugh, i was hoping it was something weird with how Bluefruit use FreeRTOS. not going to have time soon to try out the nRF SDK or raw SoftDevice

#

in related news, turning on Serial1 debug on Arduino causes spins deep in FreeRTOS due to task list corruption, because TinyUSB calls logging functions from inside ISRs

gilded swift
#

🥲

stable forge
tardy iron
slate pendant
#

Hey can someone quickly help me correctly setup platformio?
For some reason code completion isn't working at all and it doesn't even know that PINTachOuter and the other ones are undefined

#

I created a new platformio project, cloned my existing code into main.cpp, added the libraries in pio

tardy iron
# stable forge I haven't tried that in a long time, but I remember if I set any breakpoints it ...

https://devzone.nordicsemi.com/f/nordic-q-a/17/how-can-i-debug-a-softdevice-application
apparently this is a known issue. seems like resuming from a halt causes an assertion failure. it sounds kind of like it might be because the radio peripheral keeps running, but its state is out of sync with what the SD expects?

stable forge
#

I remember it failing on asserts

tardy iron
#

and running a RTT client might disrupt timing enough to cause similar problems, even if it doesn’t halt (i imagine that reading the MEM-AP to get RTT data can cause wait states for the core)

#

i’m used to being able to debug USB device firmwares and not have them blow up at breakpoints. then again, USB peripherals usually offload all the low-level stuff that has microsecond-level turnaround requirements, so i just have to worry about higher-level timeouts around tens of millisecond, many of which are recoverable

stable forge
#

i probably ended up doing printf debugging, and/or pin toggling.

tardy iron
quartz furnace
#

also tried moving it to the lib folder , doesn’t show in the listings

quartz furnace
#

no luck… MacOSX Arduino IDE 2.3.2

vivid rock
#

the suggested method is:

  • download the zip archive
  • unpack/extract it
  • in the extracted folder find sub-folder lib
#
  • manually copy all files/folders from lib to your arduino library folder (by default, on Mac it is /Users/{username}/Documents/Arduino/libraries )
#

so you would have, e.g. /Users/{username}/Documents/Arduino/libraries/ArduinoHttpClient

#

Yes, this is extremely ugly way of istalling arduino libraries

lofty nimbus
#

I am trying to add an oled display to a diy breadboard mintysynth to display current pot values. I have some basic idea of what to do, but I'm having difficulty putting it all together.

modern kelp
#

Hello everyone,

I'm really new to programming. I created a small program with Arduino IDE, it works ^^

I wanted to give it a visual aspect, that is to say a logo at startup which remains for example 4 seconds.

I don't know at all how to do it, I have an EPS8266 card with an SSD1306 screen.

My current program has just one main file and I understand that it is necessary to create another file "logo.h".

I have already taken information on how to create an image file for OLED screens: https://javl.github.io/image2cpp/

If anyone can tell me that would be great.

Thank you so much

lofty nimbus
#

display with logo

modern kelp
#

thank you, works perfectly

slate pendant
maiden kite
#

Hello guys I ran into an issue the Arduino IDE does not open in full screen, I tried restarting the pc several times but the problem persists:

In the image you can see that it is there but it won't open, Do you know what the solution for this could be?

stable forge
frozen crescent
#

it might be on a different workspace or outside visible area on the monitor

plush fiber
#

Metro 4

#

Robotiks pro

modern kelp
#

Hi all,

I've been trying to understand why my ESP8266 card doesn't want to connect to WiFi for several days and I finally solved the problem, the password and SSID include special characters: "!@#$%^&*( )-_+=[]{}|;:,.<>?" Is it possible to find a function to add so that it supports these special characters? Thank you so much

modern kelp
#

problem solved, thanks anyway 😄

spiral carbon
#

my student is trying to connect an esp32 s3 rev tft, but keeps on getting the wrong board in the port name; usbmodem101 (ESP32 C3 dev module). using Arduino IDE. what to do?

vivid rock
#

c3, not s3?

stable forge
fierce wyvern
#

Hey all. Is it possible to build a serial connection using the USB port on circuit playground express? I want to write some local software to send commands to the CPE to change lights

stable forge
# fierce wyvern Hey all. Is it possible to build a serial connection using the USB port on circ...

The CPX shows up as a serial port (COM port on Windows, /dev/cu.* on Mac, etc.). Usually one uses this to talk to the REPL (>>> prompt). However, you can also write a program (say, a Python script) on the host computer to talk to a running program on the CPX. The CPX code can use input() or sys.stdin.read() to read data.

In addition, you can activate a second serial port that is independent of the REPL. See https://learn.adafruit.com/customizing-usb-devices-in-circuitpython/circuitpy-midi-serial#usb-serial-console-repl-and-data-3096590

fierce wyvern
stable forge
#

we're in the wrong channel maybe

fierce wyvern
#

circuitpython

stable forge
#

and if circuitpython, are you using the secondary port?

fierce wyvern
#

no, primary

stable forge
#

you can user supervisor.runtime.serial_bytes_available to find out if there's any input to read

fierce wyvern
#

Oooh, checking

stable forge
#

there's similar functionality for the secondary port

thorny iris
leaden walrus
#

the LCD works on the UNO? but not on the ESP?

thorny iris
#

i try this code

#

“`#include <Adafruit_GFX.h>
#include <Adafruit_NV3030B.h>
#include <SPI.h>

// Define the pin connections
#define TFT_CS 15 // Chip select control pin
#define TFT_DC 2 // Data/command control pin
#define TFT_RST 4 // Reset pin (could connect to Arduino RESET pin)

// Initialize the Adafruit_NV3030B object
Adafruit_NV3030B tft = Adafruit_NV3030B(TFT_CS, TFT_DC, TFT_RST);“`

#

This is for all the pins I use.

GND (display) -> GND (ESP32)
VCC (display) -> 3.3V (ESP32)
SCL (display) -> GPIO18 (ESP32, SCLK)
SDA (display) -> GPIO23 (ESP32, MOSI)
RES (display) -> GPIO4 (ESP32)
DC (display) -> GPIO2 (ESP32)
CS (display) -> GPIO15 (ESP32)
BLK (display) -> GPIO21 (ESP32)

leaden walrus
#

whats the name of the board selection in Arduino IDE? under Tools-> Board

#

is it DOIT ESP32 DEVKIT V1 ?

thorny iris
leaden walrus
#

hmm. not sure then.

#

those connections seem fine

#

and the same hardware worked ok on the UNO?

#

is it logic level maybe?

signal dome
#

I'm trying to run this code:

#include <Keypad.h>
#include <Wire.h>
#include <Adafruit_LiquidCrystal.h>

// Define the keypad connections
const byte ROWS = 4; // Four rows
const byte COLS = 4; // Four columns
char keys[ROWS][COLS] = {
  {'1', '2', '3', 'A'},
  {'4', '5', '6', 'B'},
  {'7', '8', '9', 'C'},
  {'*', '0', '#', 'D'}
};

byte rowPins[ROWS] = {23, 25, 27, 29}; // Connect to the row pinouts of the keypad
byte colPins[COLS] = {31, 33, 35, 37}; // Connect to the column pinouts of the keypad

// Create the keypad object
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS);

// Initialize the LCD object. The default I2C address for the Pi Plate is 0x20
Adafruit_LiquidCrystal lcd(0);

// Setup function
void setup() {
  // Start the serial communication
  Serial.begin(9600);

  // Initialize the LCD with 16 columns and 2 rows
  lcd.begin(16, 2);
  lcd.setBacklight(LOW); // Turn on the backlight
  lcd.print("Keypad Ready");
}

// Loop function
void loop() {
  char key = keypad.getKey();

  if (key) {
    // Print the key to the serial monitor
    Serial.println(key);

    // Print the key to the LCD
    lcd.clear();
    lcd.print("Key Pressed: ");
    lcd.print(key);
  }
}

But i get this error


In file included from C:\Users\hgodhrawala24\Documents\Arduino\I2Ctest\I2Ctest.ino:3:0:

C:\Users\hgodhrawala24\Documents\Arduino\libraries\Adafruit_LiquidCrystal-master/Adafruit_LiquidCrystal.h:9:31: fatal error: Adafruit_MCP23X08.h: No such file or directory

 #include <Adafruit_MCP23X08.h>

                               ^

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
leaden walrus
#

that library is deprecated

#

should be available in the Arduino Library Manager

#

search for Adafruit MCP23017 Arduino Library

thorny iris
#

in arduino

#include <Wire.h>
#include <Adafruit_LiquidCrystal.h>

// Define the keypad connections
const byte ROWS = 4; // Four rows
const byte COLS = 4; // Four columns
char keys[ROWS][COLS] = {
  {'1', '2', '3', 'A'},
  {'4', '5', '6', 'B'},
  {'7', '8', '9', 'C'},
  {'*', '0', '#', 'D'}
};

byte rowPins[ROWS] = {23, 25, 27, 29}; // Connect to the row pinouts of the keypad
byte colPins[COLS] = {31, 33, 35, 37}; // Connect to the column pinouts of the keypad

// Create the keypad object
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS);

// Initialize the LCD object. The default I2C address for the Pi Plate is 0x20
Adafruit_LiquidCrystal lcd(0);

// Setup function
void setup() {
  // Start the serial communication
  Serial.begin(9600);

  // Initialize the LCD with 16 columns and 2 rows
  lcd.begin(16, 2);
  lcd.setBacklight(LOW); // Turn on the backlight
  lcd.print("Keypad Ready");
}

// Loop function
void loop() {
  char key = keypad.getKey();

  if (key) {
    // Print the key to the serial monitor
    Serial.println(key);

    // Print the key to the LCD
    lcd.clear();
    lcd.print("Key Pressed: ");
    lcd.print(key);
  }
}
#

in esp32

#
Wiring Connections:


GND -> GND (ESP32)
VCC  -> 3.3V (ESP32)
SCL  -> GPIO18 (ESP32, SCLK)
SDA  -> GPIO23 (ESP32, MOSI)
RES  -> GPIO4 (ESP32)
DC  -> GPIO2 (ESP32)
CS  -> GPIO15 (ESP32)
BLK -> GPIO21 (ESP32)

**/

#include <Adafruit_GFX.h>
#include <Adafruit_NV3030B.h>
#include <SPI.h>


#define TFT_CS   15 
#define TFT_DC   2   
#define TFT_RST  4   

// Initialize the Adafruit_NV3030B object
Adafruit_NV3030B tft = Adafruit_NV3030B(TFT_CS, TFT_DC, TFT_RST);

void setup() {
 Serial.begin(9600);
  Serial.println("NV3030B Test!"); 
  tft.begin();
  Serial.println(F("Benchmark                Time (microseconds)"));
  delay(10);
  Serial.print(F("Screen fill              "));
  Serial.println(testFillScreen());
  delay(500);
  Serial.print(F("Text                     "));
  Serial.println(testText());
  delay(3000);

  Serial.print(F("Lines                    "));
  Serial.println(testLines(NV3030B_CYAN));
  delay(500);
  Serial.print(F("Horiz/Vert Lines         "));
  Serial.println(testFastLines(NV3030B_RED, NV3030B_BLUE));
  delay(500);

  Serial.print(F("Rectangles (outline)     "));
  Serial.println(testRects(NV3030B_GREEN));
  delay(500);

  Serial.print(F("Rectangles (filled)      "));
  Serial.println(testFilledRects(NV3030B_YELLOW, NV3030B_MAGENTA));
  delay(500);

  Serial.print(F("Circles (filled)         "));
  Serial.println(testFilledCircles(10, NV3030B_MAGENTA));

  Serial.print(F("Circles (outline)        "));
  Serial.println(testCircles(10, NV3030B_WHITE));
  delay(500);

  Serial.print(F("Triangles (outline)      "));
  Serial.println(testTriangles());
  delay(500);

  Serial.print(F("Triangles (filled)       "));
  Serial.println(testFilledTriangles());
  delay(500);

  Serial.print(F("Rounded rects (outline)  "));
  Serial.println(testRoundRects());
  delay(500);

  Serial.print(F("Rounded rects (filled)   "));
  Serial.println(testFilledRoundRects());
  delay(500);

  Serial.println(F("Done!"));

}```
#

The LCD works with the Arduino Uno, but not with the ESP32.

#

@leaden walrus I uploaded this code, and it works fine with the same wire and LCD!!!

leaden walrus
#

^^ that's the code that works on the UNO?

thorny iris
#

Without changing anything, the code is working, and the graphical LCD is functioning. I'm confused 😮

#

I will try it with the Uno right now.

leaden walrus
#

oh. wait. it's working on the eps32 now?

thorny iris
#

yes

leaden walrus
#

ok. cool.

#

maybe just needed a power cycle or reset or something

thorny iris
#

I'm confused

leaden walrus
#

the SPI pins are set behind the scenes

#

that's why they don't show up explicitly in code

#

the ESP32 Arduino Board Support Package is taking care of these pins (SPI pins):

SCL  -> GPIO18 (ESP32, SCLK)
SDA  -> GPIO23 (ESP32, MOSI)
#

so they must match the hardware SPI pins for the board being used

#

which it looks like you are doing

#

these other pins are just digital pins:

RES  -> GPIO4 (ESP32)
DC  -> GPIO2 (ESP32)
CS  -> GPIO15 (ESP32)
#

and could be any available digital pins

#

code just needs to be updated to match

#

which you've also done

#define TFT_CS   15  // Chip select control pin
#define TFT_DC   2   // Data/command control pin
#define TFT_RST  4   // Reset pin (could connect to Arduino RESET pin)
thorny iris
#

which esp32 you advice me to use

leaden walrus
#

entirely up to you

#

these days there are lots of options

thorny iris
#

😵‍💫
thnx Mr cater ❤️

#

And thanks for all the community

signal dome
#

I used this code, but i'm getting errors in the mapping. for example, if I press 1 i get 5, if i press 2 I get 8, and the third column never outputs anything. also although the serial monitor displays something. the lcd screen doesn't. (it just lights up).

#include <Keypad.h>
#include <Wire.h>
#include <Adafruit_LiquidCrystal.h>

// Define the keypad connections
const byte ROWS = 4; // Four rows
const byte COLS = 4; // Four columns

char keys[ROWS][COLS] = {
  {'1', '2', '3', 'A'},
  {'4', '5', '6', 'B'},
  {'7', '8', '9', 'C'},
  {'*', '0', '#', 'D'}
};

byte rowPins[ROWS] = {23, 24, 25, 26}; // Connect to the row pinouts of the keypad (from pin 23 to 30)
byte colPins[COLS] = {27, 28, 29, 30}; // Connect to the column pinouts of the keypad

// Create the keypad object
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS);

// Initialize the LCD object. The default I2C address for the Pi Plate is 0x20
Adafruit_LiquidCrystal lcd(0);

// Setup function
void setup() {
  // Start the serial communication
  Serial.begin(9600);

  // Initialize the LCD with 16 columns and 2 rows
  lcd.begin(16, 2);
  lcd.setBacklight(LOW); // Turn on the backlight
  lcd.print("Keypad Ready");
}

// Loop function
void loop() {
  char key = keypad.getKey();

  if (key != NO_KEY) {
    // Print the key to the serial monitor
    Serial.println(key);

    // Print the key to the LCD
    lcd.clear();
    lcd.print("Key Pressed: ");
    lcd.print(key);
  }
}

#

This is the wiring. I have no clue what's causing the mixup.

spiral carbon
spiral carbon
#

you dont have to go to the repository of esp/arduino right? they can folllow the rest of the guide?

eternal cloud
eternal cloud
signal dome
#

I replaced that red wire as well with another one

eternal cloud
# signal dome Is this better?

Only slightly better, haha ... still can't see clearly how the keypad is connected 😅
But it does seem like one of the pins is connected to pin 22 on the Arduino, and you declared in code rows 23-26 and columns 27-30

#

The LCD lighting up, but not showing any characters may be a problem of contrast ... do you have a small potentiometer next to the LCD ? If you do, you need to adjust that until characters are visible.

signal dome
signal dome
eternal cloud
signal dome
#

Nvm I figured it out, I used a different library in the code and it worked for some reason

eternal cloud
signal dome
#

I'm trying to use 5 motor shields. Is the gap too big for the connection?

stable forge
#

Which version of Arduino IDE are they using, and on what operating system? And there are many settings in the Tools menu that need to be right:

#

(This is on Linux.)

#

If it's on Windows, it's possible that a driver has been installed for another similar board, and that's why it's identifying as that board. That may have nothing to do with the uploading problem.

IF the UF2 bootloader is installed, the upload mode can be "TinyUSB". If the UF2 bootloader is not installed, then it can be installed, or you can use the "UART0/Hardware CDC" mode, but then it has to be put into ROM bootloader mode, by holding down the BOOT button and pressing RESET.

signal dome
stable forge
#

sounds like they are sagging from too much current being drawn

signal dome
#

Amazon basic 12v batteries

stable forge
#

can you give me the amazon link?

#

what kind of motors are you trying to drive, and how many?

#

never mind, found the battires

#

this is a very low-current battery. it's basically stacked coin cells. It has a capacity of about 55 mAh. It's design to power key fobs, Bluetooth headsets, etc., garage door openers (radio) etc.

signal dome
#

is there anyway to run motors on it?

stable forge
#

only the tiniest motors. It's not suitable for motors at all, really

#

which motors are you using?

#

that battery has about 1/10 the mAh capacity of a AAA battery

signal dome
#

I'm using these: Adafruit Accessories Stepper Motor NEMA17 12V 350mA

stable forge
#

the A23 is desinged to supply only about 1mA

signal dome
#

Could it work with a 5V hobby motor?

stable forge
#

no

signal dome
#

would a 9V battery work with a 5V hobby motor?

stable forge
#

it would make it run too fast, probably not good for it. What's the application?

#

a stepper motor is a specialized thing, designed to hold its position. when doing so it draws a lot of current

signal dome
#

It's a school project. I'm designing the electronics of a vending machine. the problem is its due tomorrow. I have 5V stepper motors as well I could use. Is there no way to code for just using 5V

stable forge
#

is this a design project or are you building a prototype?

#

a vending machine doesn't need to run on batteries. You can use a 5v power supply

signal dome
stable forge
#

how many shields do you have?

#

do you need all those shields? How many motors?

signal dome
#

I need to run 9 motors. I have 5 shields

stable forge
#

do you need stepper motors for precision? What's the amp rating of the variable power supply?

#

what's its voltage range?

signal dome
#

Ideally I'd use stepper motors bc I said I'd use them in my project. I could probably use dc motors if there's no other option

stable forge
#

power supply can supply 5A (I did a websearch). so 350mA motors *9 = 3.15A. So OK.

#

I think you are not going to get much sleep. Good luck!

#

you wouldn't want to use steppers in a vending machine though, because it would take too much power. Unless you have some mechanism for turning them off when not in use and they won't slip

#

and if you're not going to run all of them at once, then no problem

signal dome
stable forge
#

just run five wires from a terminal. You need some way to connect multiple wires together, like a terminal strip

#

e.g on one side you run a jumper one screw to another five times. On other side you run a wire to the shield five times

signal dome
#

I don't have a terminal. Could a breadboard or smth work?

north stream
#

Wire nuts, Wago connectors, bus bars, anything like that.

#

An ordinary 6V lantern battery might power them.

stable forge
#

breadboard isn't designed for such large currents. I don't know if the shield has multiple connection points for the motor voltage. If so you could daisy chain, but use heavy wire and tighten well

signal dome
#

... how fast would the 9v battery on the 5v motors be. Would anything blow?

stable forge
#

the 9v battery cannot drive the steppers

#

it won't supply enough current

#

your power supply is fine!

signal dome
#

Can it drive a DC

stable forge
#

From the motor guide:

You can't run motors off of a 9V battery so don't waste your time/batteries!

untold depot
#

OK so I got a bit of a weird one.

I'm designing a signal light system out of neopixels. I've turned on the left turn signal by pressing a button, meaning it is currently flashing without any input. Then I hit the brake lever and the right turn signal on the same neopixel strip turn solid red. Is it possible to do this without interrupting or restarting the flashing of the left turn signal?

stable forge
#

But I suggest you start from the beginning of that guide.

untold depot
spiral carbon
clear spear
clear spear
#

problem solved thanks for the help

stable forge
clear spear
chilly agate
#

Hey everyone. Brand new to arduinos and have a question. I see the NeoPixel Ring - 24s have a timing-specific protocol. Would a Tiny2040 be able to run two of these?

#

Ultimately, I would just need them to randomly flash their LEDs.

north stream
#

Yeah, should be able to. You can hook them end to end and run them on a single pin. Note that the ItsyBitsy has a 5V level shifter built in, which is useful for running NeoPixels.

chilly agate
#

Ok, thanks. Space is really limited, so I'll see if it fits.

north stream
#

I'll often peel the innards out of USB chargers to save space.

#

Like this update I built for an odd antique homemade decoration. While there was plenty of room, I still removed the charger innards (small board at lower left) along with the plug prongs, so I could just solder wires to it.

#

Whoops, that reply went with another conversation.

#

Still on the Arduino topic, as the controller (small daughterboard on left) is a 32U4.

signal dome
#

I have another error. My keypad and lcd both work. But my motors don't spin (ignore the weird LCD matrix. i think my wiring was wrong at some point, but it maps right):
code:

#include <Keypad.h>
#include <Wire.h>
#include <Adafruit_RGBLCDShield.h>
#include <Adafruit_MotorShield.h>

Adafruit_MotorShield AFMS = Adafruit_MotorShield(); 
Adafruit_DCMotor *myMotor = AFMS.getMotor(1);

// Define the keypad connections
const byte ROWS = 4; // Four rows
const byte COLS = 4; // Four columns

char keys[ROWS][COLS] = {
  {'D', '#', '0', '*'},
  {'C', '9', '8', '7'},
  {'B', '6', '5', '4'},
  {'A', '3', '2', '1'}
};

byte colPins[COLS] = {26, 27, 28, 29}; // Connect to the column pinouts of the keypad (from pin 26 to 29)
byte rowPins[ROWS] = {22, 23, 24, 25}; // Connect to the row pinouts of the keypad (from pin 22 to 25)

// Create the keypad object
Keypad keypad = Keypad(makeKeymap(keys), colPins, rowPins, COLS, ROWS);

// Initialize the LCD object
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();

void setup() {
  // Start the serial communication
  Serial.begin(9600);

  // Initialize the motor shield
  AFMS.begin();
  myMotor->setSpeed(150); // Set motor speed

  // Initialize the LCD with 16 columns and 2 rows
  lcd.begin(16, 2);
  lcd.setBacklight(0x6); // Turn on the backlight (blue color)
  lcd.print("Keypad Ready");
}

void loop() {
  char key = keypad.getKey();

  if (key != NO_KEY) {

    Serial.println(key);

    if (key == 'A' || key == 'B') {
      lcd.clear();
      lcd.print("Motor Spinning: ");
      lcd.print(key);
      // Run motors when 'A' or 'B' is pressed
      myMotor->run(FORWARD);
    } else if (key == '*') {
      // Clear LCD when '*' is pressed
      lcd.clear();
      lcd.print("Cleared LCD");
    } else {
      lcd.clear();
      lcd.print("Symbol: ");
      lcd.print(key);
    }
  } else {
    // Stop motors if no key is pressed
    myMotor->run(RELEASE);
  }
}
#

I already ran an i2c test and 0x60 and 0x70 came through.

north stream
#

What are you using as a motor power supply?

signal dome
#

12v was coming through to one motor. I'm replacing the motors currently

#

M1 gives a slight humming sound. and the port reads 12V.

#

M2 doesn't read any voltage

north stream
#

The code doesn't do anything with motor 2.

signal dome
#

Oh ok. Is my wiring right?

north stream
#

That wiring diagram is for a stepper motor, and the code is set up for a brushed DC motor.

small hatch
#

Ok, I have the adafruit ST7735 display and everything is correctly wired with a custom pcb that i made, but it wont display bitmaps. its not an issue with the sd card, and all the libaries are up to date, is there a best way to convert images into bitmaps that can be read by the display?

craggy condor
#

When pressing the reset button it wont result in the led blinking (not trigerring bootloader mode)

craggy condor
#

Tried multiple cables, and it wont show up in device manager.

dusk orchid
#

Does an unrecognized device show up (possibly under Other Devices rather than Ports)

eternal cloud
craggy condor
#

Yes, double tapping to see if it shows up in the device manager. It didn’t. Is there anything beyond that o could try?

eternal cloud
#

Are you on windows ?

craggy condor
#

Yes, you mean drivers for that particular device?

dusk orchid
#

Make sure to click Scan for new Hardware changes in device manager after bootloader procedure, it should show up under one category or other if needing a driver.

craggy condor
#

Wouldn't the bootloader LED light up anyway without drivers?

craggy condor
eternal cloud
#

probably something like "unrecognized device", if it's missing driver

craggy condor
#

this but the micro isnt even plugged in

eternal cloud
#

well, it looks like windows sees it ... many times over, lol

craggy condor
eternal cloud
#

are you using arduino ide installed, or the online version ?

craggy condor
#

the installed version

craggy condor
eternal cloud
#

ok, so if you plug the board , with device manager open, does something show up?

craggy condor
#

no

eternal cloud
#

not even after you press / double tap reset

#

?

craggy condor
#

yes, nothing even after pressing or double tapping

eternal cloud
#

windows doesn't see it at all then
if you could try a different machine, it would help to check it's a board problem

craggy condor
stable forge
pine bramble
#

hello guys, please does anyone use the Kalman filter with the BNO055?

#

this is for a rocket project

vivid rock
#

BNO055 has data fusion on chip, which already includes various filters (details are not published, but I expect they use Kalman filter, too). Thus, normally you do not need to apply any other filters on top of it.

lethal yarrow
#

... unless you want to actually control the filter parameters.

pine bramble
pine bramble
lethal yarrow
lofty nimbus
#

I am trying to display the next bus arrival time on a sh1106 and a esp8266, but I can't get it to work.

north stream
#

What happens? What doesn't happen? What have you tried?

lofty nimbus
north stream
#

I'd take a "divide and conquer" approach. Maybe set up a trivial web server somewhere to fetch data from that returns a small amount of JSON.

lofty nimbus
#

That's a good idea. I'll give it a shot. Thanks

lofty nimbus
pine bramble
#

Hey guys, I am working on a rocket project.

I am trying to get my flight computer turn on the Runcam split 4 camera; 10minutes after launch.

I would appreciate it if anyone that has experience with this setup could help. Thank you.

small hatch
pine bramble
north stream
pine bramble
#

Our flight computer microcontroller is a teensy 4.1

north stream
#

It looks like the camera can do that for you, you just send it commands to turn on, start recording, etc. Apparently there's an asychronous serial protocol to do so.

scarlet pollen
#

Pls fix: ```c
// Try Everything! Happy Hacking :slight_smile:

#include <Arduino.h>
#include <LiquidCrystal_I2C.h>
#include <Keypad.h>
#include <Stepper.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);
const byte ROWS = 4;
const byte COLS = 4;
char keys[ROWS][COLS] = {{'1','2','3','A'},{'4','5','6','B'},{'7','8','9','C'},{'*','0','#','D'}};
byte rowPins[ROWS] = {9, 8, 7, 6};
byte colPins[COLS] = {5, 4, 3, 2};
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS);
Stepper stepper_1(2048, 13, 11, 12, 10);
char key;

bool isKeyPressed(){
key= keypad.getKey();
return key!=0;
}
void _delay(float seconds) {
long endTime = millis() + seconds * 1000;
while(millis() < endTime);
}

void setup() {
Serial.begin(9600);
lcd.init();
lcd.backlight();
lcd.backlight();
stepper_1.setSpeed(1);
}

void loop() {
if (isKeyPressed()) {
Serial.print(key);
if ((key == String("") + String("#")) || ((key == String("") + String("*")) || ((key == String("") + String("A")) || ((key == String("") + String("B")) || ((key == String("") + String("C")) || (key == String("") + String("D"))))))) {
stepper_1.step(receivedDataFromSerial * 5.68);
_delay(0.5);
}
}
}```

stable forge
scarlet pollen
gilded swift
idle lynx
#

This feels a bit of a stretch to ask here in the Arduino Forum, but I wonder if anyone has ported the Adafruit SSD_1306 library to work on the CH55x series. I was starting down this path and wasn't sure if anyone had already tackled it.

scarlet pollen
north stream
# scarlet pollen

You're comparing incompatible data types. I'm not sure what your string comparisons are trying to do, but they're all going to fail. You might want something like:

#
void loop() {
  char key = keypad.getKey();

  switch (key) {
    case '#':
    case '*':
    case 'A':
    case 'B':
    case 'C':
    case 'D':
      stepper_1.step(key * 5.68);
      _delay(0.5);
      break;
  }
}
scarlet pollen
#

Please help with my library

scarlet pollen
north stream
#

So you have it sorted?

leaden walrus
#

pinMode is part of the Arduino core. not sure what you are trying to do there.

#

this should just work. no need for the #include or the other files

#

also, there's no return, so the serial print won't show anything

#

you generally don't want to use a literal integer for the second parameter, instead use INPUT, OUTPUT, or INPUT_PULLUP

whole gazelle
#

I need help, I'm using a Adafruit RFID/NFC shield for the Arduino and I'm using the example code "mifareclassic_updatendef" which works great but lets say i want to add more information to the tag say two different websites URLs and some phone numbers how do I go by doing that?

eternal cloud
whole gazelle
#

Ohh okay and I notice that the line you showed is stored in "success" do I have to make a new variable for each additional information or can I also just use success to store all the different URLs?

eternal cloud
whole gazelle
candid agate
#

hello. I've been working on a small project driving a stepper via a TMC2208 and i was planning to use a qtpy M0 for the logic. Everything works fine on other boards, but moving it to the qtpy i encounter a strange error where the board stops starting up. After some tests I found that there is a short between 3v and ground

#

has anyone run into this?

north stream
#

Sometimes a voltage surge will damage something and it will fail shorted.

candid agate
#

ahh yeah, that makes sense. thanks!

fast jacinth
#

Hi guys, I am having an error where my ESP32-S3 Feather No PSRAM boards have all suddenly stopped being able to connect to the serial port of my arduino IDE. I can still upload code to them, but I can no longer connect to them after code has been uploaded. Previously I would have to hold down boot and click reset to get the board to show up (Port 8), then upload, then after I clicked reset it would dissapear and come back as a new port (Port 9). Now after I upload and reset it, the board does not change what port it is recognized as and gives the following error:

Port monitor error: command 'open' failed: Invalid serial port. Could not connect to COM8 serial port.

#

I have tried factory resetting, switching boards, and switching USB ports but the issue remains

#

sometimes it also throws this:

00:31:34.377 -> I (613) esp_image: segment 0: paddr=00010020 vaddr=3c030020 size=102e0h ( 66272) map
00:31:34.414 -> I (623) esp_image: segment 1: paddr=00020308 vaddr=3fc93600 size=02af8h ( 11000) load
00:31:34.414 -> I (626) esp_image: segment 2: paddr=00022e08 vaddr=40374000 size=0d210h ( 53776) load
00:31:34.414 -> I (639) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=2fec0h (196288) map
00:31:34.445 -> I (670) esp_image: segment 4: paddr=0005fee8 vaddr=40381210 size=02308h ( 8968) load
00:31:34.445 -> I (678) boot: Loaded app from partition at offset 0x10000

fluid wagon
#

Good morning. Is there a way to have the adafruit version of WiFiNINA co-exist with the Arduino version? I use both kinds of boards from time to time, and well, the Airlift version A. keeps alerting about needing an upgrade due to the name collision, and B. Well many Arduino devices now exist using the ublox modules so switching back and forth becomes problematic

#

I do not have issues with either driver working, but the name collision is awkward.

north stream
north stream
fluid wagon
#

You mean a 2nd ide install for each version?

#

I mean, sure, but I cannot imagine I am the only one with this issue. I just wish the name could be changed. I understand the idea of both the ublox and the "bare" esp32 being named Nina since they are both ESP32s, but...yeah. Just awkward.

north stream
#

I assume the name can be changed, however, I could be wrong

stable forge
#

if the modified one gets updated, you'll have to do that by hand. Note that we are working on updating the NINA-FW firmware to make it closer to the Arduino version: https://github.com/adafruit/nina-fw/pull/62. I'm not sure what that implies for the library yet.

fluid wagon
#

Well, updates are always nice!

#

(changing the version of the library so it stops asking to be updated with the Arduino one would also be nice.)

#

I dont know how popular the airlift products are to know how much time gets invested in maintaining working code for quality of life, but the shield, and the module both work great.

stable forge
fluid wagon
#

Sounds good 🙂 Working hardware is always nice.

fast jacinth
#

I am just trying to figure out why it suddenly stopped being able to connect

fast jacinth
#

Update: When i factory reset the board, it goes back to connecting on Serial Port 9 as it normall used to, and I am able to read serial messages from the board in my IDE. If I put it back into boot mode it switches back to port 8, and then is unable to recover and leave that port after the code is uploaded. I have tried restarting the program and my computer but no success

marsh wave
#

Hi, I am building a MIDI controller with the Adafruit I2C Quad Rotary Encoder. All works well! Is there a way to get the speed at which the encoders are turning via the default library?

north stream
#

While there may be a library function to do so, I do not know of one. I'd probably just get the position two times with a time delay, then divide the difference in position by the time to yield the speed.

fresh peak
#

The bno085 IMU learn page claims you'll need a >300B uart buffer to use it in UART mode. What MCUs even have that much? It's not an easy stat to look up

tardy iron
#

it depends on the MCU. most of the ones i've seen have a very short buffer on the UART peripheral, and you get to implement a larger ring buffer on top of that using general RAM

eternal cloud
haughty plover
#

@eternal cloud can you manage to get the brd file and the schematic file?

haughty plover
eternal cloud
haughty plover
eternal cloud
haughty plover
#

or an ai that whit this picture can make the pcb or the brd file?

livid osprey
#

What is your goal for this project? Do you just need the 7-segment display on a board, or are you merging it with an onboard microcontroller?

north stream
#

Wow, direct drive, that brings back memories

mild nova
#

Can I use a pair of nrf52840 modules commercially with ble communication or does the project require special licensing because of the Bluetooth specification being used?

marsh wave
haughty plover
north stream
haughty plover
north stream
#

Instead of drawing the same circuit four times, Eagle will let you draw it once and re-use it

haughty plover
#

ok

haughty plover
north stream
#

If I were you, I wouldn't bother with trying to download it, it seems less effort (and a better result) would be to just draft the circuit in Eagle.

haughty plover
#

@north stream do you know how i can set the resistor value?

north stream
#

Yeah, click on a resistor to select it and then click on the information or properties button

#

I haven't used Eagle in a while (switched to KiCAD) so I don't remember the details

haughty plover
#

<@&617066238840930324> do anyone know how i can use this (image 1) instead of the wires (image 2) ?

shrewd ember
#

Hey guys i have an issue when i try uploading via the arduino IDE onto my Matrix portal M4

#

maybe someone has an idea what the issue could be

eternal cloud
north stream
vocal olive
#

Does anyone know if Power Delivery Modules are interchangeable with Charging Modules?

supple egret
#

I am experience crashes on an ESP32S2 during one period where I am updated a string of 512 neopixels quickly for about 30 minutes. My guess is the FastLED code is getting into trouble with the WiFi code.

My uninformed guess is I need to shut down WiFi during this activity.

Does this sound like the likely cause and resolution? or a red herring?

inland gorge
humble torrent
#

Howdy, I'm more familiar with CP but wanted to give arduino a shot so I have that running on a QT PY ESP32 Pico. I'm using a STEMMA QT cable to interface the board with the rotary encoder breakout(https://www.adafruit.com/product/4991).
I've installed the seesaw library and its dependents to both arduino 2.3.2 IDE as well as 1.8.19 IDE on different computers, and have tried both the most recent library and the one in the picture on the tutorial.
Still have an issue getting the example code to run ss.begin() or sspixel.begin(), one of the two throws the wrong address. Additionally, if I comment out the while loop for that portion, the button reads fine but it throws a guru panic'ed error after registering the first increment of rotation of the encoder, which honestly I've never encountered before haha.
My guess is that part of the issue may be related to the code mistaking the neopixel on the roatary encoder for the one on the QT PY but I could be wrong, fairly lost on this one.

Code Attached. Output Attached.

Update: I separated the if statement check to see if the board is connected with the encoder and neopixel on the encoder board, and it's definitely not finding the neopixel at the provided address, and it seems like the guru error is related to the when the code tries to change the neopixel color when the rotary wheel changes position and starts writing that information in memory that is not allotted for it because the code is not recognizing the neopixel.

shrewd ember
# eternal cloud Did you follow all the Arduino steps described in the product guide? https://l...

Hey, sorry for the late reply! Yes i did everything like in the guide. The thing is i had an issue before where i had to reset the portal and some nice people over in #help-with-circuitpython helped me with. I had the arduino ide before and was a little confused because the arduino samd and adarfruit samd packages were already installed and it registerd the portal instantly as available device. Since then i have completly reinstalled the arduino ide and redid the steps to reset the matrix portal.

dusk orchid
# humble torrent Howdy, I'm more familiar with CP but wanted to give arduino a shot so I have tha...

I think it's probably because the QTPY Pico (ESP32) has two available I2C ports, and unusually the StemmaQT port is the second i2c bus, with pins referred to as SDA1 and SCL1.
You'll want to try with Wire1 instead of Wire, and you need to pass a pointer to that wire object (a TwoWire object is an I2C bus) to the SeeSaw constructor like it lists in the header file here: https://github.com/adafruit/Adafruit_Seesaw/blob/master/Adafruit_seesaw.h#L254C2-L254C38

similar code should be available on the qtpy board learn guide - https://learn.adafruit.com/adafruit-qt-py-esp32-pico/i2c-scan-test), but here's an untested modified encoder example for you (notice the ssPixel is setup later and just the object defined earler, also the Wire1 stuff in setup() )

dusk orchid
#

@humble torrent this pinout from the QT PY ESP32 Pico learn guide shows the two different I2C sets of pins

leaden walrus
humble torrent
#

Thank you both! I'll look into this. I wasn't sure if the neopixel on the rotary encoder needed its own dedicated I2C pins given they're mounted to the same board. I think the ESP32 has 2 dedicated I2C buses but I'll double check the pinout info to make sure those sets of pins are really different sets of pins.

leaden walrus
candid shell
#

Does anyone know the GPIO pins for the stemma qt connector on the matrixportal s3? Trying to use the pins in esphome and the help article doesn't give me actual pins:

candid shell
#

Thank you! Super helpful

leaden walrus
sinful dragon
#

Hey folks!

I have a really odd issue.

I have an Arduino Leonardo board and a Adafruit LED Arcade Button 1x4 STEMMA QT connected to it, with 4 arcade buttons w/ LEDs connected to it.

I have 5 of these Stemmas chained together, each with the same setup.

I have some code to blink the leds on and off.

The first 2 buttons, the led turns on, but does not turn off.
The last 2 buttons, it works as expected.

This happens across all the boards.

Im not sure what the issue could be.

I tested the buttons directly against the arduino, and they work as expected, so it's not a hardware problem with the buttons.

Any ideas?

north stream
sinful dragon
#

im connected to 5v on from the QT to the Arduino, and then the Arduino is powered via USB.

what would represent a signal integrity problem (sry, im a bit new to the Arduino world.)

For the code, i've reduced it down to this so I can test each LED pin individually by changing the PWM_PIN variable

#include <Adafruit_seesaw.h>

#define PWM_PIN 1 // Change this to the specific PWM pin you want to test (12, 13, 0, 1)

Adafruit_seesaw ss;

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

  if (!ss.begin(0x3A)) {
    Serial.println("Seesaw not found!");
    while (1);
  }
  Serial.println("Seesaw started!");

  ss.pinMode(PWM_PIN, OUTPUT);
}

void loop() {
  Serial.println("Turning LED ON");
  ss.analogWrite(PWM_PIN, 127); // Turn the LED on
  delay(2000); // Wait for 2 seconds

  Serial.println("Turning LED OFF");
  ss.analogWrite(PWM_PIN, 0); // Turn the LED off
  delay(2000); // Wait for 2 seconds
}
leaden walrus
#

you say you have 5 of them chained together? that's 5 of the Arcade Button boards?

sinful dragon
#

yup, 5 QTs chained together

leaden walrus
#

are you setting alternate addresses?

sinful dragon
#

Yup.

In my actual code, i have it setup like this

int addresses[NUM_BOARDS] = { 0x3A, 0x3B, 0x3C, 0x3D, 0x3E };
leaden walrus
#

are they showing up as expected with an i2c scan?

sinful dragon
#

yup

#

the switch presses work as expected on all the buttons across all the boards

#

the only strange thing is the LED does not turn off

#

it turns on, but does not turn off for the first 2 buttons on each board

#

i log the buttons presses, and the logs show the switch works as expected

Received from Adaptive Controller: Board 0, Button 1: LED is now OFF

Received from Adaptive Controller: Board 0, Button 1: LED is now ON

leaden walrus
#

hmm....not sure. example code looks simple enough.

#

let me try same thing here

#

ok. i'm seeing the same behavior. 🤔

sinful dragon
#

thank goodness. I was driving myself crazy

leaden walrus
#

digitalWrite works as expected

#
void loop() {
  Serial.println("Turning LED ON");
  //ss.analogWrite(PWM_PIN, 127); // Turn the LED on
  ss.digitalWrite(PWM_PIN, HIGH);
  delay(2000); // Wait for 2 seconds

  Serial.println("Turning LED OFF");
  //ss.analogWrite(PWM_PIN, 0); // Turn the LED off
  ss.digitalWrite(PWM_PIN, LOW);
  delay(2000); // Wait for 2 seconds
}
sinful dragon
#

let me try that

#

success!!

I would've never thought to try that. I was going off the code in the examples

#

thank you!

#

I will now try it in my actual code and see if it works as expected

leaden walrus
#

the pwm issue seems to be in the megatinycore

#

i'm seeing the same behavior directly programming an attiny817

#
#define PWM_PIN 13

void setup() {
  pinMode(PWM_PIN, OUTPUT);
}

void loop() {
  analogWrite(PWM_PIN, 127);
  delay(2000);
  analogWrite(PWM_PIN, 0);
  delay(2000);
}
sinful dragon
#

works beautifully. Thank you so much for your help. Greatly appreciated!

I was stuck on this for days. I should've joined this discord sooner 😅

leaden walrus
#

no prob

#

there's still an issue

#

but if using digitalWrite works for your application, then can just switch to that

#

only need analogWrite if you wanted to control brightness

leaden walrus
#

@sinful dragon hey, curious what version of firmware you have running on the arcade button board. could you run this sketch and paste the output here:

#include <Adafruit_seesaw.h>

Adafruit_seesaw ss;

void setup() {
  Serial.begin(115200);
  while(!Serial);

  if (!ss.begin(0x3A)) {
    Serial.println("Seesaw not found!");
    while (1);
  }
  Serial.println("Seesaw started!");

  uint32_t ver = ss.getVersion();

  uint16_t pc = (ver >> 16) & 0xFFFF;
  uint16_t dc = ver & 0xFFFF;
  uint8_t y = dc & 0x7F;
  uint8_t m = (dc >> 7) & 0x0F;
  uint8_t d = (dc >> 11) & 0x1F;

  Serial.print("Product Code: "); Serial.println(pc);
  Serial.print("Date Code: "); Serial.println(dc);
  Serial.print(y); Serial.print("/");
  Serial.print(m); Serial.print("/");
  Serial.println(d); 
}

void loop() {
}
sinful dragon
#

one sec

#
Seesaw started!
Product Code: 5296
Date Code: 2967
23/7/1
leaden walrus
#

thanks!

glass matrix
#

Can anyone help me with the spaceship earth project. I can no get the LEDs to light up. I have triple checked the wiring, I could confirmed the LED strips work with a RF controller. Still nothing when I connect them arduino board.

north stream
#

Some of those connections look dodgy. Do you have a level shifter? What are you using as a power supply?

eternal cloud
glass matrix
#

The cables are just connected for now. I will solder and isolate them. They are not touching.

#

I was finally able to get the LEDs to work, but now the first 2 in the chain will not light. The rest of the chain works fine.

eternal cloud
glass matrix
#

The USB C plug that’s coming off the breakout board doesn’t go anywhere because that was for the QT Pi board, but that board didn’t work with the LEDs I got from Amazon to work with the ESP board.

#

I clipped the usb C plug off the breakout board now.

#

I guess maybe the first 2 LEDs got fried somehow.

#

I have it working now, but the wiring diagram for the neopixel LEDs listen the listed the wire with the green dot as the ground, it is in fact the 5v, data is in the middle, then ground. I had followed this wiring and that is why they were not lighting. Probably how the first 2 got fried too.

glass matrix
zenith acorn
#

Hey! Pls I need help i bought an LED- Module. Here is a Doku https://joy-it.net/files/files/Produkte/RB-RGBLED01/Manual RB-RGBLED01 08102020.pdf. And now I'am trying to get the energy consomption in voltage. For that i went to https://docs.circuitpython.org/projects/mcp3xxx/en/latest/examples.html and tried the exampels. But i get just every time 0.0V. I even tried diffrend MCPs and checkt all channels with a loop. But still i did not found a channel where the energy is provided. Can someone help me out. THX. But maybe the LED module is not suiteable for that code?

weary summit
#

Hey guys~
I'm trying to auto watering my plants with several moisture sensors + 1 pump with only 1 master link like the screenshot attached. Curious if anyone know how can I do this with Arduino? (with I2C ?)

btw, I've also seen this solution can be extended to more than 2 moisture sensors (as attached 2)

north stream
north stream
weary summit
#

Do you have link to those sensors and

north stream
chilly agate
#

Trying to work with an ItsyBitsy 5v and getting this error on IDE:
Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
Device code: 0x44

north stream
#

What do you have the programmer set to?

chilly agate
#

Ive been trying each one...all the same

#

Also not seeing the board in Finder its that related

north stream
chilly agate
#

Ok, looks like I can get the blink code uploaded. Still cant get it in Finder even when in bootloader mode (pulsing led)

tardy iron
chilly agate
#

thanks. Is it possible to use micropython or would that only work on the rp2040 itsybitsy? I have the 32u4

tardy iron
#

32U4 is way too constrained for Micropython

#

the best you’re likely to get for an interactive language on 32U4 is Forth

chilly agate
#

Right, thanks. Im obviously new to this...so it uses C++ and not circuitpython?

tardy iron
chilly agate
#

Thanks. Only need this to control two neopixel rings and a mosfet switch so will stick with what’s default.

tardy iron
chilly agate
#

Ok. I did want fairly fast random flickering colors in the rings. Not possible?

tardy iron
chilly agate
#

Right. And I can’t use an rp2040 itsybitsy since I need to control two 5v devices and that only has one Vhigh pin for 5v? Or can you combine them since they would activate at the same time anyway?

tardy iron
chilly agate
#

2x 24 NeoPixel rings and a mosfet switch controlling a smoke machine.

tardy iron
north stream
#

You can also switch the smoke machine with a bipolar transistor (3.3V logic is plenty even for a Darlington)

tardy iron
chilly agate
#

Thanks everyone. It’s a sparkfun mosfet power controller. There isn’t much documentation on it so I’ve asked them if it can be run on 3v logic

north stream
#

They link to the datasheet on the MOSFET on the product page. Looks like it can switch a few amps with only 3.3V on the gate

#

Looks like the on resistance would be <80mΩ

chilly agate
#

The smoke machine is 2amps

lethal yarrow
north stream
#

You can figure it out: 2 amps times 0.08Ω is 0.16V and 0.16V times 2A is 0.32 watts. That package has a 50°C/W thermal resistance, so 0.32W times 50°C/W is a temperature rise of 16°C. That seems survivable.

lethal yarrow
#

Yep

chilly agate
#

its only going to run in short durations, if that matters

north stream
#

As, I see note 1a specifies 50°C/W when mounted on a 1in² pad of 2oz copper.

lethal yarrow
north stream
#

For a 0.04in² pad, it's 105°C/W, which would yield a 34°C rise.

lethal yarrow
#

As temperature increases, RDSon also increases.

north stream
#

I did take the tempco into account: that 80mΩ figure is for a junction temperature of 125°C

lethal yarrow
#

ah

north stream
#

It's closer to 60mΩ at 25°C

#

It does look like SparkFun provided some copper area for heatsinking. Of course, if you stuff your module in a styrofoam box, it'll cook itself.

fast jacinth
#

Hi all, I am trying to run the feather_player example from the VS1053 library for the mp3 featherwing. For some reason, every time I upload the code, the board will execute up to printing "Adafruit VS1053 Feather Test" and then restart in an infinite loop. This has happened on both my ESP32-S3 No PSRAM and my ESP32-S3 TFT Reverse. It also happend both with the shield plugged in and unplugged. Does anyone know what might be causing this?

north stream
#

It could be that example doesn't have a setup for the ESP32-S3

fallow valve
#

Resistors needed for the Adafruit LED bar Graphs? if so what value

pallid sage
#

I presume that depends on the voltage you use with them, and the standard LED resistor formula applies.

stable forge
surreal quarry
#

Silly question, but is there a limit to how many devices I can have sort of chained to qwiic/qt? I currently have 4 thermocouple amplifiers communicating through SPI, but am curious if I could make 6 work though I2C.

vivid rock
#

theoretically, up to 127 devices on same I2C bus (assuming all have different I2C addresses).
Realistically, 127 is not going to happen, but 6 should work.
Just make sure cables are not too long and all devices are configured to use different I2C addresses

surreal quarry
#

I found that in the case of the device I am trying to use (MCP9601 I2C Thermocouple Amplifier) supports up to 8 I2C addresses changeable through tying a resistor of a certain value between ADDR and GND

north stream
#

Note that if all the devices include pull-up resistors, it can increase bus loading, so you may want to disable the pull-up resistors on some of the boards (if they all have them)

tardy iron
#

yeah, you’re likely to run into signal integrity issues before you run out of addresses (assuming configurable addresses)

lethal yarrow
#

I don't think I've ever actually encountered an I2C bus that utilizes the full address space.

tardy iron
#

there's a decent number of reserved addresses, too, so not all 127 are available

lethal yarrow
#

Yeah, it's still above 100 IIRC.

#

And a couple of them are reserved as prefixes for 10-bit addressing.

#

Although why anyone decided I2C needed an address space that large is beyond me. And everyone else, it would seem. I've never actually encountered a device that requires 10-bit addressing.

vivid rock
#

what is the max number of devices you actually saw connected on the same bus?

tardy iron
#

i don’t have an exact count, but servers using SMBUS can probably have over 10, maybe more because expansion cards can add devices. technically a subset of I2C, and it has some extra features that make high device counts easier

north stream
#

The main limit seems to be bus capacitance more than number of devices. It's not designed for long distances, and you can run into issues with too many pull-up resistors.

tardy iron
#

also noise pickup if you’re using wires between boards (STEMMA, etc) instead of a single board or plug-in cards that can maintain a good ground plane

timber falcon
#

I have a trinket M0 that I am trying to upload an arduino program to but I'm getting an error Sketch uses 18566 bytes (64%) of program storage space. Maximum is 28672 bytes. Global variables use 862 bytes of dynamic memory. A programmer is required to upload And I'm not sure what this means. Anyone have any ideas?

#

Upon some further digging, it may be relating to the UF2 file I have on board that I had set up for circuitpy previously but the code was too much so I decided to switch to arduino, is there a UF2 program that I need to install for arduino to work on this trinket?

stable forge
timber falcon
#

That's strange because I thought I did all of that and I see the correct board listed in the arduino IDE that autopopulates when I plug in the board. I have it in bootloader mode with the pulsing red and solid green leds but arduino won't let me upload and gives me that same error. Is the response telling the program is too big or something?

#

I tried it with the blink program that says it takes up practically no memory on the board and I'm still getting the same error so I suppose it's not that

timber falcon
#

I've made some progress? I went back through all the packages listed in the guide and discovered I didn't install the correct packages and so I did that and now I have a listed connection that seems to actually resemble the correct port, now I'm just trying to upload a program that works lol

#
[==============================] 100% (161/161 pages)
Verify successful
Done in 0.135 seconds
#

I've never felt more accomplished lol

opal turret
north stream
opal turret
#

thank you very much 😉

cold lagoon
#

Hey. im trying to create a Windows service, that opens a serial port to my RP2040. Everything looks like the service is successfully opening the serial port, but the RP2040 doesn't recognise it.
Im just using if (Serial) in the loop, to see if the port is open. It works with the Arduino IDE serial monitor but not with the windows service or in windows terminal. Is there anything that the Serial monitor does diferent compared to opening a port in a Termina or C# windows app?

stable forge
cold lagoon
stable forge
#

so using the same port from a terminal program works fine?

#

when the service isn't running?

cold lagoon
stable forge
#

what code is the service running to access the port?

#

I mean like Tera Term, putty, etc.

#

but arduino or platformio is the same idea

cold lagoon
cold lagoon
stable forge
#

there is a thing you have to do with C#. Let me look it up

stable forge
cold lagoon
#

That works. Thanks a lot

blissful pike
#

Hey Folks - I'm having a problem trying to program a tiny1616 (seesaw board) with an HV UPDI friend. Here is the output from Arduino: "Sketch uses 770 bytes (4%) of program storage space. Maximum is 16384 bytes.
Global variables use 10 bytes (0%) of dynamic memory, leaving 2038 bytes for local variables. Maximum is 2048 bytes.
A programmer is required to upload"

#

My settings:

#

I'm running Arduino from an appimage on Kubuntu 22.04. I can use the serial monitor tool in Arduino and see text I type get echoed back as expected so It is able to communicate with the UPDI Friend.

#

Also, the light on the HV UPDI Friend blinks when I send simple serial data to it like ascii "Hello" but when I tell arduino to program the board there is no blinking.

north stream
#

Is the port right?

blissful pike
#

Yes, I can get the light on the HV UPDI friend to blink by writing text to it.

#

^^^ That message is what I get when running Arduino from the command line and trying to program

blissful pike
#

Update: It gets even stranger - if I click sketch > export compiled binary, then sketch > Upload using programmer it WORKS!

rough torrent
#

I don't think you need to export a compiled binary before uploading using programmer 🤔

#

But since you are using a programmer, it makes sense that you have to use upload with programmer instead of just upload

vagrant oxide
#

im trying out a clone of the freenove ESP32S3 cam board and it aint werking

#

this is the camera webserver example sketch

#

I think the OV2640 camera module is toast

#

Ill buy a new one

#

Womp womp

graceful crescent
#

Hi everyone,

I'm having trouble with HID communication between my PC and a microcontroller (RP2040). I've successfully set up a C++ program utilizing HIDAPI to search for my microcontroller using its VID/PID and to send data using the WriteFile function. The data I'm trying to send is encapsulated in a struct that includes fields for buttons, xAxis, yAxis, and wheel.

However, it seems like my microcontroller isn't receiving the struct/bytes I'm sending. Here’s a brief overview of my setup:

PC Side:
Using HIDAPI to detect the microcontroller.
Using WriteFile to send data, with a struct containing (buttons, xAxis, yAxis, wheel).

Microcontroller Side:
Feather RP2040 with USB Type A Host
Need help setting up to receive HID data.

What is the proper way to set up the RP2040 to receive HID data? Are there specific libraries, configurations, or code examples that you can recommend? Any advice on ensuring proper communication between my PC and the microcontroller via HID would be greatly appreciated!

Thanks in advance!

north stream
#

Are you using Arduino or CircuitPython?

#

Oops, this is the Arduino channel...

graceful crescent
# north stream Are you using Arduino or CircuitPython?

I'm currently using https://github.com/touchgadget/pt_mouse
Works flawlessly, plug my mouse into the microcontroller and it just passes the input to the pc...

My idea / problem is that i want the host to be able to also send the microcontroller commands.
The link u posted doesn't seem to have any more information about host -> device communcation

GitHub

USB Boot Mouse Pass Through using RP2040 USB host. Contribute to touchgadget/pt_mouse development by creating an account on GitHub.

north stream
#

Ah, you want to run so it has both a serial and HID endpoint?

graceful crescent
north stream
#

I don't know if HID has any provision for sending out of band information like that

graceful crescent
tardy iron
#

you can send arbitrary data to or from host and HID device (sometimes called "raw HID"), but there is no standard way of doing so. some hosts are particularly picky about the report descriptors for this capability, or require separate HID interfaces from any other standard HID interfaces on the device

graceful crescent
tardy iron
graceful crescent
graceful crescent
harsh furnace
#

How do i connect the display to uno? (I do have a bread board btw)

north stream
#

CLK to D13 (SCLK), SDI to D11 (MOSI), you can connect RS, RST, and CS to any digital pins, just specify the layout in your code. LED is presumably the backlight, it would need to be connected to appropriate LED power. Vcc to 5V and GND to GND. NC is "no connection", you don't connect anything to those pins.

harsh furnace
# north stream Similar to this one: https://learn.adafruit.com/2-0-inch-320-x-240-color-ips-tft...
#

Im trying to make a doom emulator

north stream
#

I'm unsure if an Arduino has the horsepower to run that, but it would be an interesting experiment.

harsh furnace
charred salmon
#

Yeah...
That's not Doom he's running. Not by a long shot.

#

Closer to Wolfenstein 3D...
If you stripped out a lot of things.

#

If you follow his github link for the source, he freely admits that it's not Doom, just some sprites.

charred salmon
#

Oh absolutely. I'm just saying that to point at it as an example that you can run Doom on an Uno is disingenuous.

north stream
#

A 176x220 display is over 30k pixels and a Uno only has 2k of RAM. You could probably do some Atari style programming where you render the display a piece at a time (which would be a great learning experience), but you'd still have a bunch of other limitations.

#

I'm a little curious how the various projects of running Doom on random embedded CPUs work. It could be the CPUs are STM32 class, I suppose.

#

One classic example of Doom on an inexpensive throwaway device turns out to just use the display, the CPU was replaced entirely.

#

I'm just reading the writeup, and it points out an AdaFruit Trinket was used as the replacement CPU

pine bramble
#

Yo, I have a code which is supposed to run a ATM. It has a LCD2C Screen, and I don´t have/want/need any pay mechanism or similar, I just want it to run via the Display for output, the Keypad for the input and the RFID Cardscanner for the procedure. I will post my code in the following, and I´m sorry to say it but I need quick help. I worked with ChatGPT and we now have it that there is a "." in the bottom left corner, which shows that the code is still running. ChatGPT said to do this as I was asking it for help with it´s own code. So, here we go:

#

My problem is that I don´t know how to solve the problem and I need it for school tommorow.

#

Official Arduino no one answers.

north stream
#

I don't see the problem in the code that's present, but it's truncated ... (86 Zeilen verbleibend)

#

Asking for people to analyze code is a big favor, it takes time and effort to do

eternal cloud
#

especially code generated by chatgpt... 😑

eternal cloud
pine bramble
pine bramble
eternal cloud
#

Did you test your card reader separately? Run a basic example to see it working?

#

Any messages in serial console ?

pine bramble
#

Idk man

#

Idk how

eternal cloud
#

Don't think anyone around here is keen to do your homework for you. Or debug chatgpt code.

pine bramble
#

I missread, I know that stuff but okay.

#

Then someone else on another server does.

eternal cloud
pine bramble
#

So rn everything worked. I did not have the keypad attached for clarifying what the mistake is. I attached the keypad and suddenly the card and scanner don't work anymore, even when I remove the keypad rn. What to do?

#

Nothing wrong with the cables

pine bramble
#

@eternal cloud uhm maybe you could help?

pine bramble
#

@livid osprey pls

#

It worked, it´s fine, thanks tho bbys!

livid osprey
# pine bramble <@98211350907490304> pls
  1. Tagging random users for help is highly discouraged. The guys who answer the bulk of the questions on this discord are volunteers who offer their own knowledge on their own time, and the questions they don't answer are usually outside their scope of expertise. If you tag someone who was previously working with you because you're looking to continue working on something, that's fine, but please don't tag unrelated people in hopes of getting a response sooner.
  2. As good as the guys are at what they do, they're not an emergency hotline for homework due in 24 hours. They will offer what they are comfortable with, but they're not out here doing people's assignments for them, so please leave enough time to collaboratively debug issues and work through the final project yourself in the future.
#

Glad you were able to figure it out, though!

pine bramble
pine bramble
livid osprey
#

Adafruit is an electronics company that sells a variety of products for DIY electronics projects. https://www.adafruit.com/

thorny iris
#

Hi,
Is it possible to control and change the color of a bitmap file black and white color ?
Thanks

lethal yarrow
harsh furnace
#

How do i wire this up? Its so i cant play doom.

north stream
analog lagoon
#

Dumb question: on the PCA9685 16-channel servo driver board, there is a VCC and V+ pin. Is there any reason I couldn't power the board externally through the built in terminals (with adequate amperage for the servos I'm running), and run the V+ to the VIN on my nano, and then run the 5v pin on the nano back to the VCC on the PCA9685? Would that work? I'm trying to simplify my wiring, so my externall power supply can just run one set of cables.

eternal cloud
analog lagoon
livid osprey
analog lagoon
livid osprey
#

Your original suggestion would work for an arduino uno/mega powered by the barrel connector, but I’m not sure what’s powering your nano.

#

You probably could double-ferrule a wire to connect the terminals to the nano VIN as well. Assuming your supply is sufficient I don’t see a problem with that.

warm kayak
#

Hi all, I have an issue with the Arduino motor shield and my Arduino Due. Simply put it can't seem to find it. I've checked over my soldering joints and they seem to be good, even checked continuity. Tried an i2c scanner, which didn't find anything, but I think that's because I missed using "wire1" so I'll have to go back. My question is, the big red disclaimer about the Due not working with "multiple motor shields," am I miss reading that and I should have understood that to mean that this all won't work at all?

#

May have found my answer, in this "wire1" gotcha. Any answer is appreciated until I get back to my work desk

eternal cloud
warm kayak
#

good to know it uses it by default, and i fortunitly didn't miss that part so I'm good there. My i2c scanner is finding a device at 0x60 and 0x70 which should be the motor shield according to the documentation.

#

just not sure why the steppertest example ain't finding the motor shield

#

got it!
I had to change line 27:
if (!AFMS.begin())
to
if (!AFMS.begin(1600, &Wire1))

#

so that must mean it evidently doesn't use wire1 by default, i need to specify that

eternal cloud
warm kayak
#

yeah it's not complaing about not finding the board

#

after i made that change

#

makes me suspect there's an issue with how the library determines which one to use

edgy berry
#

Hi, I've got a RP2040 CAN bus Feather board, which I ordered after watching the following video:
https://www.youtube.com/watch?v=MEkKPNr-KBk
At 4:43 its mentioned there is some sort of firmware that can be used to turn the CAN Feather into a USB to CAN bridge device. For the life of me I can't figure out what is the name of the firmware. I've tried to slow down the video.

vagrant merlin
#

I have a HUZZAH32 Feather with 16MB. I am able to get it to work with the Arduino IDE when I set the board type to "Adafruit EPS32 Feather" with a small application. The memory size shows in the Arduino IDE shows as 4MB. My application needs more the 4MB how can I increase the memory size or what board should I use in the Arduino IDE??

dusk orchid
dusk orchid
viscid trail
#

I ordered 28, 30, 32 and 34 gauge wire for super tiny micro solders

north stream
#

Any of those will work, but they're delicate and hard to work with. When building tiny projects, wire diameter is rarely the limiting factor. The Nano and encoder will be the largest pieces.

#

There are smaller Arduino boards than the Nano, such as the Arduino Every and Motino. The UNO Mini is amazingly small, but was a limited edition.

#

Easier to find is a Trinket

graceful crescent
#

I'm not sure if the cable is not working ( to low power output / only charging )
But when i plug into the RP2040 USB Host it powers on and I can upload sketches to it.
Although... When i plug for example a mouse into the device, it doesnt even light up or get recognized.

Would you say the USB A Host is defect, or is it the cable that needs and upgrade? 🙂

stable forge
# vagrant merlin I have a HUZZAH32 Feather with 16MB. I am able to get it to work with the Arduin...
#

The V2 has 2MB PSRAM. Note that the PSRAM chip capacity is often listed in megaBITS by the chip mfr, so 2MB = 16Mbits

vernal pendant
#

Has anyone had any issues with the MatrixPortal S3 connecting to wifi? I'm connecting to a WPA2 network. Debugging the connection with Serial.print messages via Serial Monitor and I'm trying to connect to my network but getting an error. The related code below. I'm coding this in Arduino IDE.


// WiFi credentials
const char* ssid = "network_name";
const char* password = "my_PASSWORD";

// WiFi client
WiFiClient client;

void connectToWiFi() {
  Serial.print("Connecting to ");
  Serial.println(ssid);
  WiFi.begin(ssid, password);

  int attempt = 0;
  while (WiFi.status() != WL_CONNECTED && attempt < 20) {
    delay(500);
    Serial.print(".");
    attempt++;
  }

  if (WiFi.status() == WL_CONNECTED) {
    Serial.println();
    Serial.println("Connected to WiFi");
    Serial.print("IP Address: ");
    Serial.println(WiFi.localIP());
    Serial.print("MAC Address: ");
    Serial.println(WiFi.macAddress());
  } else {
    Serial.println();
    Serial.println("Failed to connect to WiFi");
  }
}```

Output message: Wi-Fi not connected

And I've confirmed via my network that the device is not connect.
terse smelt
#

Im not sure why, but on my UM ProS3 board, reading a 41KB file from an SD card runs out of stack memory and causes the board to reset, anyone know why? It happens right at the SD.open() line.

SPI.begin(5, 4, 3, 2);
  if (!SD.begin(2))
  {
    Serial.println("SD failed");
  } else
  {
    Serial.println("Initialized filesystem");
  }

  File nsfFile = SD.open("/areazero.nsf");
  Serial.println("Opened file");
  
  char* buffer = (char*)malloc(sizeof(char) * nsfFile.size());
  nsfFile.readBytes(buffer, nsfFile.size());
  Serial.println("Read file of size: ");
  Serial.println(nsfFile.size());
  nsfFile.close();

Output:

Guru Meditation Error: Core  1 panic'ed (Unhandled debug exception). 
Debug exception reason: Stack canary watchpoint triggered (loopTask) 
terse smelt
#

I figured out the issue, my library had an include that included literally everything at once lol

dense spoke
#

not sure if this is the right place for this but, has anyone using Neopixel library had the issue that if a strip color is set, changing brightness wipes out lower value colors? i'm trying to fade in rgb (25,255,80), but when using a for loop to bring brightness from 0 to 255, only the green leds in the strip come on.

eternal cloud
dense spoke
dense spoke
#

in both these instances ramping the brightness up in a for loop (line 66,68) makes any color under 128 (rgb defined in line 15-22) not render at all

eternal cloud
shadow elm
#

hi, i wanted to convert a digital sin signal into an analog voltage signal. I've tried using some code, but I've always gotten a flat line, but not the analog signal itself

#

i think it's an issue with the wave itself, but i dont know how i could fix it

north stream
# shadow elm hi, i wanted to convert a digital sin signal into an analog voltage signal. I've...

Many boards do not have any true analog output pins (the M0 and M4 boards do have built-in analog outputs, however). You can use an external DAC (digital to analog converter) to generate analog signals. For the boards without true analog outputs, analogWrite() generates a PWM output on the pins with PWM support, or just high or low for pins that don't have PWM support. PWM in turn stands for Pulse Width Modulation, basically a digital waveform that spends a varying amount of time in a high or low state.

shadow elm
#

i tried adding a delay of around 50 ms and it turns out that longer delays mean that the program runs for longer without crashing

#

also, if i were to use a dac, is it possible to do it without an external dac

#

my teacher said that arduino ides have a built in dac inside them which should technically allow u to convert the digital signal to an analog voltage

north stream
#

Yes, with an M0 or M4 board (my board of choice for this is the ItsyBitsy M4 Express, which has two analog outputs)

shadow elm
#

ah so the uno doesn't have an internal dac?

#

that sucks

north stream
#

The IDE is just the software you use to program an Arduino. An Arduino Uno does not have any DAC, sorry.

shadow elm
#

aw

#

well i'll have to use pwm then

#

tysm tho

north stream
#

You can use a simple RC filter to smooth out the PWM waveform into a somewhat lumpy analog one. For some uses (like for controlling brightness of lamps or speed of motors) it doesn't matter that it isn't actually an analog waveform.

shadow elm
#

well i wanted an analog signal because my teacher asked me to use a rectifier

#

and a rectifier doesn't work unless the signal is analog, or atleast that's what i assume

#

i'll have to add noise through an external sensor to the basic sin signal and then pass it through a filter from a research paper

north stream
#

A rectifier is basically a one-way valve. It works fine with a digital signal, but since the signal is either positive or zero volts (it doesn't go negative), a rectifier isn't particularly useful. However, you can use a capacitor to decouple the waveform, so it goes both negative and positive, at which point a rectifier could do something (however, it greatly depends on what you're trying to accomplish).

shadow elm
#

im not completely sure, but i think a rectifier was required to make sure that the average (something i forgot) isn't 0

#

it has to be positive so it can pass through a filter i think

north stream
#

Most filters are built using reactive passive components such as capacitors and inductors, not active components like rectifiers.

shadow elm
#

but i'll have to double check with my teacher

#

i'll let you know when im a bit more experienced with why we need a rectifier if that's fine

north stream
#

A PWM signal does have a positive average (it doesn't go negative) to start with. Most filters don't care, but some filter designs block the DC component of a composite signal, so after going through them a signal could transform from unipolar (positive only) to bipolar (positive and negative)

shadow elm
north stream
#

I come and go throughout the day, as I have to work, but most of the time there's someone around.

shadow elm
#

i dont know the downsides, but maybe he didn't want a positive average

#

therefore the rectifier

shadow elm
north stream
#

A rectifier converts a signal from bipolar to unipolar, which is the opposite

shadow elm
#

wait pwm signals don't go negative?

#

im confused

north stream
#

That's where the name "rectifier" comes from: "recti" meaning "right" (same root as "rectangle", which contains right angles) and "facio" meaning "to make".

#

No, PWM signals spend part of their time at zero volts and part of their time at the supply voltage (as I stated above)

safe crown
#

Greetings everyone, question about the MIDI library. I need to reference the MIDI instance in a different file, using an extern

#

I declare (per the book) with

#

MIDI_CREATE_INSTANCE(Adafruit_USBD_MIDI, usb_midi, MIDI);

#

(SAMD51 board, metro M4)

shadow elm
safe crown
#

I can't figure out how to extern MIDI

#

(sorry to derail the current talk)

north stream
#

As long as MIDI isn't static, you should be able to refer to it with an extern declaration in another module

north stream
shadow elm
#

oh yeah im using a digital output pin

north stream
#

The analogWrite() routine expects values from 0 to 1023

shadow elm
#

ill send the code because im not good with arduinos either

#

ive mostly been borrowing code until now so im inexperienced

safe crown
shadow elm
#

also there's some interface in the code as well, don't mind that

safe crown
#

#define MIDI_CREATE_INSTANCE(Type, SerialPort, Name) \ MIDI_NAMESPACE::SerialMIDI<Type> serial##Name(SerialPort);\ MIDI_NAMESPACE::MidiInterface<MIDI_NAMESPACE::SerialMIDI<Type>> Name((MIDI_NAMESPACE::SerialMIDI<Type>&)serial##Name);

#

create instance should refer to a MidiInterface or a SerialMIDI, AFAIU

shadow elm
north stream
safe crown
#

hence, midi::MIDI ?

north stream
#

likely

safe crown
#

trying

north stream
#

As for the analogWrite code, it's getting a value from 300 times a sine function, so it'll give values from -300 to 300. However, the analogWrite function only accepts values from 0 to 1023, so all the values below zero will be just treated as zero.

#

If you were to offset the values so they're all positive (like 300 * (1 + sin())), you'd get the PWM of a sine wave, offset so it's all positive. If you then decouple it with a capacitor, you'd change the offset so it could go positive and negative, but you still wouldn't have a sine wave, it would still be PWM.

safe crown
#

midi seems to be recognized as the name space

#

but I can't have the type of MIDI

#

the lib is indeed pretty confusing for creating the instance

north stream
#

The class seems to be MidiInterface but I'm unsure on what the instance is named

safe crown
#

that's what I thought too. Compilation returns : MidiInterface is not a type

north stream
safe crown
#

awesome thank you I'll read this

safe crown
#

cheers

silk geyser
#

I'm trying to use an ESP32-S3 QT Py (2MB PSRAM) with the Arduino IDE, but the board isn't listed there 🙁 It only has the 8MB Flash (No PSRAM) version. I tried flashing a Hello World program with that board, but the device crashes and prints and error about the program size:

E (281) spi_flash: Detected size(4096k) smaller than the size in the binary image header(8192k). Probe failed.

This makes sense as the memory sizes are different between the two boards... How would I use the PSRAM version?

silk geyser
#

Update: seems I damaged the bootloader in the previous try, I repaired it and I'm back to the factory code

eternal cloud
silk geyser
#

I installed esp32 by espressif

#

It needed an update which I'm doing right now

#

Oh, great now I have it

#

Thanks!

silk geyser
#

Now after putting the hello world, two things happen: Every other reset, the NeoPixel either flashes purple or goes into bootloader mode

#

Here is the program btw

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

void loop() {
    Serial.println("Hello World");
    delay(1000);
}
eternal cloud
silk geyser
#

i cant open the serial

#

it says failed to connect to the port

eternal cloud
# silk geyser it says failed to connect to the port

oh, yea, someone else in here had this problem with esp32-s3 a little while ago
it's a bug in the latest espressif package version, i think ... that person reverted to using an earlier version (2.0.17 if i remember right)

silk geyser
#

let me try that

eternal cloud
silk geyser
#

If i flash any other program, like Adafruit GFX, it works again

timber yacht
timber yacht
stable forge
stable forge
#

Do you have NeoPixels or other similar bright LEDs? Consider just winding a NeoPixel string around a tube or similar, and controlling that. It will be plenty bright.

stable forge
#

what relay do you have?

timber yacht
stable forge
#

what coil voltage and current

timber yacht
#

SRD-05VDC-SL-C

silk geyser
#

Do you have a way to connect to the bulb? A socket?

stable forge
#

that relay takes something like 100mA to engage. An Arduino pin will only supply max 40mA. So you need to use a transistor to drive the relay. Do you have an assortment of transistors?

stable forge
#

alternatively ask an electrical supply store locally if they have a solid state relay (usually will do 3-32v input). But it would be about $40

timber yacht
stable forge
#

yes it can control 1/2A or so

timber yacht
stable forge
#

hold on

timber yacht
#

ok.

stable forge
#

Note the diode across the relay coil. You need that otherwise you can cause a spike that will damage the transistor

timber yacht
#

i have a IN4007 diode
1IC

stable forge
#

etc. do some more websearching if you want more examples. I can't find the "perfect" example.

#

Be really careful with the line voltage and the relay. Make it inaccessible. Quite dangerous otherwise

timber yacht
#

should i use relay or triac?

stable forge
#

relay, triac doesn't provide isolation

timber yacht
#

i have bt136 triac

timber yacht
stable forge
#

you only need one

timber yacht
stable forge
#

control it from a separate pin on the Arduino

timber yacht
#

i don't understand what i need to do?

stable forge
#

See those links: they have schematics

#

if you don't understand them ask someone locally with more experience

#

I am worried about your safety here

timber yacht
#

and shouldn't the MCB of home help us?

stable forge
#

test WITHOUT ac connected to the relay. check with a multimeter that you are controlling the relay properly.

#

what is "MCB of home"

#

what country are you in

timber yacht
timber yacht
stable forge
#

you can get killed before they trigger

#

I REALLY suggest you don't try to control an AC bulb if you don't have experience with that

timber yacht
stable forge
#

I would highly suggest you get some bright LED's and control those or some other low-voltage bulbs

stable forge
#

especially, you are in a hurry, etc. Mistakes might happen. Don't do it if you don't have experience

#

you don't HAVE to do this; you just want to

stable forge
#

you can control a 12V automobile bulb or similar, if you have a 12V supply, for instance

#

it will be plenty bright

timber yacht
#

Why can't we just simple connect triac's gate into pin of arduino and a1 into ac supply nad a2 pin into load ?

stable forge
#

because if the triac goes bad or is miswired you might get line voltage into the arduino. You could kill the people pressing the buttons

timber yacht
stable forge
#

connecting diretcly to some device that controls AC can be dangerous if anything fails. The relay provides good isolation, but it could be miswired. You are in a hurry and have no experience. Don't do it

timber yacht
#

ok then

#

i will just use a 12v bulb with a 12v power supply aand a 2n2222a transistor to switch it?

stable forge
#

if the bulb draws more than 500mA or so, it is too much for the transistor. So you can use the relay to control the bulb. It'll just be a 12v bulb instead of an 220V bulb

#

circuitry in the links above is the same

timber yacht
#

ok

#

btw just out of curiocity

stable forge
#

and you still need the diode

#

across the relay coil, as indicated (put it in the correct orientation0

timber yacht
stable forge
#

i don't know, many possible reasons

timber yacht
stable forge
#

what do you mean, the schematic way above?

timber yacht
stable forge
#

the buzzer is controlled by pin A0. If that is not set to low explicitly, the buzzer might go on. Are you running the program as shown?

stable forge
#

do you mean you connected a triac to A0, or is the buzzer connected directly?

timber yacht
#

d8

#

connected to d8

stable forge
#

i don't know; it shouldn't come on, any more than the LED there should come on without pressing the button

timber yacht
#

the bulb also turn on with buzeer if i connet the ac supply to cathode of traic

stable forge
#

could be leakage, but I repeat, don't use a triac, and don't let mains voltage anywhere near the arduino, even through the triac

stable forge
#

good luck!

timber yacht
covert lintel
#

Hey, just starting my first project with microcontrollers and have a noob question about my metro - how do I actually switch it to 3.3v logic? I see the place I'm supposed to interact with, but I... solder it somehow? poke it? ask politely?

north stream
#

Some of the Metro boards are 3.3V. However, if you have a 5V one, you'd have to "poke" it in the sense of replacing some components.

stable forge
covert lintel
#

what does "cutting a soldering closed a jumper" mean

eternal cloud
#

Basically you need to interrupt the connection from the 5V regulator (cut the trace between the middle and upper pads), and make a new connection to the 3.3V one (solder to connect the middle pad to the lower one)

stable forge
covert lintel
covert lintel
eternal cloud
covert lintel
#

gotcha. Thanks!

spice jungle
#

With the trinket M0 is there ANY way to store a bit of long term/changeable data on there? Like writing to eeprom or suchlike?

tender wasp
#

or add like a small storage chip on the i2c bus, maybe

#

basically the warning here about ~10k writes to each flash block as a rule of thumb

north stream
#

You can always add an FRAM chip, which is fast, non-volatile, and doesn't wear out.