#help-with-arduino

1 messages · Page 14 of 1

stable forge
#

do X and Y change as you move your finger?

agile palm
#

it's always reading the same value, no matter if i'm touching the screen or not

stable forge
#

could you upoad your whole sketch? Use the + on the left

agile palm
#

this one is just a test... the original one is about 4000 lines, it interacts like an automat for cryopump, i can't share it... but it works great with an arduino mega 2560

stable forge
agile palm
#

it's all good about the wiring

stable forge
#

If that looks OK, attach a potentiometer to 3.3V and ground and the middle wiper pin to A0 and A1, and write a little test program to print out the values as you turn the potentiometer

agile palm
#

i tried many other pin configuration always with the same problem, i also tried with another giga r1

stable forge
#

also put a multimeter on A0 or A1 and see what it reads as you move your finger

agile palm
#

the value of X & Y stay the same if disconnect A0 & A1 or 6 & 7...

stable forge
#

the fact that it doesn't change at all makes me suspicious about the wiring or the pin mapping. Hence it's worth trying just the analogRead() by itself to see if it's acting as expected

#

[corrected A6 and A7 to A0 and 1 above]

#

you don't have a Grand Central M4, do you?

agile palm
#

a Grand central M4 ?

#

analogread wrok well with a potentiometer

stable forge
#

analogReadResolution(10);

agile palm
#

but i can't read the value from my touch screen

stable forge
agile palm
#

no, it's an arduino giga r1 wifi

stable forge
#

i was asking if you also owned a Grand Central

#

could test on that.

agile palm
#

ah ok

stable forge
#

in your test program, remove the ILI setup completely. It is not necessary for the TouchScreen to work, I believe

agile palm
#

no, i just bought 2 giga... and 10 mega 2560

stable forge
#

do you have any other 3.3V boards? You could test the touchscreen with some other non-Giga board

agile palm
#

i don't have any other board

stable forge
#

could you show a clear picture of your wiring? Or is it all pre-made harnesses?

agile palm
#

i could send you a photo but it's not going to be clear i think

stable forge
#

i don't have a GIga to test, only other 3.3V boards

agile palm
#

i need to leave, i will try again tomorrow if i could find a solution, thanks for your helkp

#

if that could help... but i'm sure at 99% the wiring is good

stable forge
#

it's hard to see, maybe more of a top view, with better illumination. But sleep on it and we can see tomorrow

#

could be something odd about the ADC's

agile palm
#

Hello @stable forge, here some top view photos

granite crow
#

Hello everyone, I've noticed something potentially concerning with the antenna clearance around the ESP32-S3-MINI module in the Arduino UNO R4 WiFi. It appears that it might not be fully compliant with Espressif's guidelines. Has anyone else observed this or experienced any related wireless performance issues? I'm particularly interested in hearing from those with knowledge in PCB design and antenna layout. Looking forward to your insights!

north stream
stable forge
#

btw, I meant A0 and A1, not A6 and A7

#

did you test with a potentiometer on A0 and A1?

agile palm
#

yes, it's just for a test

#

too see if i can read anything on the ADC and it's ok with that

stable forge
agile palm
#

yes i made test with potentiometer on A0 & A1 and the results are still the same

stable forge
#

that's what I meant, is that what you did?

agile palm
#

yes

#

with a 10kOhms potentiometr

stable forge
#

ok, got it, so it reads 0-1023 that way?

agile palm
#

yes, with analagread(A0) for example it works fine

#

for example....

#

with the serial monitor

#

if i keep an eye on serial monitor and i disconnect everything from the card, the card is still reading the same value

stable forge
#

that is kind of crazy. So the exact same display is working fine with a Mega, is that right? Wired up exactly the same way?

agile palm
#

yes exactly !

#

I think there is a problem with definition of the card in the library or something like that.

#

But i'm not good enough too work on the library

stable forge
#

I don't have exactly this display, but i think I have some other ones with a resistive touch screen. I also don't have the Giga board. I could try something roughly similar.

#

given that A0 and A1 work when tested independently, it may be an issue with pins 6 and 7. Try some different pins. The library itself does not have any idea about the pins, but the board definition might have trouble.

#

you are using the exact same sketch on the two boards, is that right?

agile palm
#

yes

#

I don't think there is any problem with pins 6 & 7 because I tested with two Giga R1, i tried with other pins many times...

stable forge
#

i don't mean a hardware defect, I mean there is some issue with choosing those pins. So you tried A2 and A3, or similar, for instance

#

instead of 6 and 7

agile palm
#

I already tried too replace pins 6 & 7 but not with ADC pins, i'm going to try

#

Still the same ...

#

I tried put 6 & 7 on A3 & A4 but nothing change

stable forge
#

i am looking to see which displays I do have on hand...

agile palm
#

thank you

#

with this skecth, I just tried to connect every pins one by one on the GND without anything connected, and the result is still the same, the card is always reading the same values.

stable forge
agile palm
#

thanks a lot

stable forge
# agile palm thanks a lot

when you were testing with the potentiometer, were you using a simple test sketch that did not set analogReadResolution()? I am interested in what the native resolution is. e.g. if you used a very simple analogRead sketch like the Examples->Analog->AnalogInOutSerial do you see a range of 0-1023?

#

you installed the Giga mBed board pacakge, and you set the board to Giga R1 in the Arduino IDE, is that correct?

agile palm
#

yes it's correct

stable forge
#

I'm not sure this is the problem though

agile palm
#

Yes, the maximum value is 1023

stable forge
#

it is for higher-numbered analog pions

#

release 4.0.10, the latest release, is before this bugfix

stable forge
agile palm
#

yes

#

With the 4.0.10 the serial monitor is not reading anything now

stable forge
#

were you running an earlier version?

agile palm
#

yes, but i don't know wich one

stable forge
#

ok, that is is a different problem :/

agile palm
#

yes... too much problem for the same card

stable forge
#

do you have any other displays with resistive touch overlays?

#

and you are testing with nothing connected but the X_ X- Y+ Y- pins?

agile palm
#

i don't have any other touchscreen and yes i have tested with nothing connected on the card, the value on the serial monitor stay the same

stable forge
#

the touch code works by pulling the 6 and 7 pins low and high alternately, and then reading the analog values on A0 and A1. You could write a test program that does the essence of what is going on in TouchScreen::getPoint() in https://github.com/adafruit/Adafruit_TouchScreen/blob/master/TouchScreen.cpp. Note that defined(USE_FAST_PINIO) will be false there, so you can discard that code. Note that it reads two samples (NUMSAMPLES == 2). You could increase NUMSAMPLES. This may be some peculiarity of analogRead(), but since it works in a simple test, that does not seem to be the case.

Hmm: Note that it discards samples if they vary by more than 4 values (see lines 112-113 and 148-149). You could make a copy of the library and remove that checking code. Maybe the values are jumping around, and so valid is being set to zero all th time.

#

I am suspicious that that is the problem.

#

why that is a problem, I don't know -- something about the stability of analogRead()

#

or maybe analogRead is too slow. have you tried holding your finger in one place for a while?

tardy iron
#

the nRF52 BSP seems to use blocking RTT writes if that's enabled as the debug channel. this seems kind of unfriendly for a debug menu option that's not well-documented (i'm on ItsyBitsy nRF52840, but i think it's all supported boards)

#

i guess the question is whether people would prefer that it were nonblocking, or just better documented in the menu?

agile palm
#

Yes it's me on github.
I already tried to push on the same position and the problem is still here

stable forge
agile palm
#

no, i tried to put my finger on the touchscreen for a long time and it doesn't work, i will try as soon as possible to modify the library (The card is at my workplace)

granite crow
agile palm
agile palm
stable forge
agile palm
agile palm
stable forge
agile palm
stable forge
#

ok, so this is not for your work, with some deadline?

#

So you can wait while I get some test parts

stable forge
distant sonnet
#

Heyy. I wanna set my arduino/esp8266 into deep sleep mode and wake it up through a button. This button should also be used as an input when the arduino/esp8266 is awake. My question is how would the wiring look like

north stream
#

Normally a button would go from a GPIO pin to ground, and the GPIO be set with a pull-up resistor. However, I don't know offhand if pull-ups are enabled during deep sleep, so you might want to use an external one.

green thunder
#

I don't know about the ESP2866 but the ESP32 can keep a pull-up enabled during deep sleep. I think it uses slightly more power to do so but I have some remotes I built that spend most of their time in deep sleep with a pull-up enabled and the battery can last weeks sometimes.

quiet quail
#

hi guys, is there something about on an uno. if i have digi 4-13 connected

#

why sda/scl wont work?

charred salmon
#

What do you have attached to them?

astral solar
#

I am having some issue with a stemma GPS unit - the parsing example, and my code works if I change the delay in my loop to 10, but if I set my loop to 1000, the GPS never gets a read? I don't understand. I feel like receiving and formatting the string how I want should be easy.

I also cant seen to just grab the most recent sentence, I have use GPS.value.

Function:

tring buildRadioString() {
  // Ideally we wait or return empty string until new GPS sentence available. But now I just get garbage.
  String radioString = "";

  // Adding device name
  radioString += device_name + "|";

  // Adding time
  String timeString = String(GPS.hour) + ":" + String(GPS.minute) + ":" + String(GPS.seconds);
  radioString += timeString + "|";

  // Adding date
  String dateString = String(GPS.day) + "/" + String(GPS.month) + "/20" + String(GPS.year);
  radioString += dateString + "|";

  // Adding GPS fix and quality
  radioString += String(GPS.fix) + "|" + String(GPS.fixquality) + "|";

  // Adding location if there is a fix
  if (GPS.fix) {
    String locationString = String(GPS.latitude, 6) + GPS.lat + "|" + String(GPS.longitude, 6) + GPS.lon;
    radioString += locationString + "|";
    // Adding other GPS data
    radioString += String(GPS.speed) + "|"; // Speed
    radioString += String(GPS.angle) + "|"; // Angle
    radioString += String(GPS.altitude) + "|"; // Altitude
    radioString += String(GPS.satellites); // Satellites
  }
  Serial.println(GPS.thisCheck);
  return radioString;
}

Loop

void loop() {
  inputHandler();

  main_angle = getHeading();
  //Serial.println("hi");
  String gpsData = buildRadioString(); // this part matters
  Serial.println("actual:");
  Serial.println(gpsData);
  Serial.println("end_actual");

  displayHandler();
  delay(1000); // with 10 here, GPS.Available provides int 73 after some time,  with this at 1000 it always provides 0 and a bad sentence?
}

init

#include <Adafruit_GPS.h>



//gps dont echo to serial
#define GPSECHO false
#define PMTK_SET_NMEA_UPDATE_10Sec "$PMTK220,10000*2F"
// ....
// GPS Boot
  GPS.begin(0x10);
  GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA);
  GPS.sendCommand(PMTK_SET_NMEA_UPDATE_10Sec);
  GPS.sendCommand(PGCMD_ANTENNA);
  delay(1000);
  GPS.println(PMTK_Q_RELEASE);
quiet quail
#

sda/scl are attached to icm20

#

and it wont connect

valid sand
#

Hi
I am trying to connect an Adafruit Feather ESP32 to my Arduino IDE. I have connected the IDE to git through adding an URL in the settings and I installed the boards through the board manager. When I connect the board to my PC it shows up in the boards list and the IDE installed some extra packages the first time. But when I click upload it fails after compiling:
Sketch uses 272405 bytes (12%) of program storage space. Maximum is 2097152 bytes.
Global variables use 30220 bytes (9%) of dynamic memory, leaving 297460 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.5.1
Serial port COM3

A fatal error occurred: Could not open COM3, the port doesn't exist
Failed uploading: uploading error: exit status 2

north stream
north stream
valid sand
#

Thanks, I installed the two drivers on the Adafruit page. And it was autodiscovered so I thought it had the correct COM port. Can it be in a CircuitPython mode or something? It is not discovered as an USB drive either

north stream
#

Many of the ESP32 boards (but not all of them) could be in CircuitPython mode, so you may have to mode switch manually. Unfortunately I'm not familiar with that particular line, so I'm speaking in generalities.

north stream
#

One from SCL to Vcc and one from SDA to Vcc

valid sand
#

I am not sure if I have broken my board when soldering the headers or something, but I tried with a ESP32-S2 board I had and that is also auto-discovered and runs the blink code

#

The other board does run some code that came with it that is cycling different colors on a neopixel, but I am not able to connect completely to it

#

I see that my board says I2C scan: 0x36, on the serial monitor so maybe there is some client that is not responding

north stream
#

That implies that you have an I2C device at address 0x36. I don't know offhand what the expected address of an ICM20 is, but if you're getting devices to answer, the pull-up resistors would seem to be present and working.

stable forge
astral solar
stable forge
#

2f looks correct:

>>> import functools
>>> hex(functools.reduce(lambda x,y: x ^ y, b'PMTK220,10000'))
'0x2f'
quick maple
#

I always wanted a gps but I know where I am and I cant find a use for it 😦

north stream
#

They're useful as an accurate time reference

stable forge
edgy ibex
#

Right click "My Computer" / "This PC" and select "Manage". Then select "Device Manager" in the window that pops up.
In that window, find the "Ports (COM & LPT )" section, and open that up.
The board should be showing as a COM port there, it may not necessarily be COM3.
IIRC some boards, and the ESP32's might be among them show as a different COM port when in bootloader mode vs when they're in normal serial debug mode. In my experience this sometimes causes all sorts of troiuble for the Arduino IDE, which doesn't appear to quite properly understand the dual COM port thing. One of the many reasons I finally stopped using the Arduino IDE, and switched wholesale to PlatformIO.

north stream
#

It's more a windows thing than an Arduino thing. On Linux, a udev rule will make it show up at the same port every time, in either mode.

astral solar
quiet quail
astral solar
#

Hello, I hit reset button while upload new code from the IDE and now my feather won't accept any other uploads, I can get it into bootloader with 2 clicks but also unable to upload code there.

How would I go about repairing it?

north stream
quiet quail
north stream
stable forge
astral solar
stable forge
#

uploading when your program is running will fail if the program crashes, because it depends on USB running properly to do the upload. But being in the bootloader should work. When you double-click, do you get a BOOT drive, or is this just the Arduino bootloader?

#

does the red LED pulse slowly?

astral solar
#

Just needed to set to the new com port

dim iron
#

@astral solar have you selected your exact boot loader for your specific board

stable forge
agile palm
merry cargo
#

Trying to think of the best way to go about this: I want to build a device that, when triggered by a motion sensor, connects to wifi and sends me either a text or email. The difficult part is that it needs to be able to handle a variety of captive portals (i.e. the sort of thing hotels use where you enter name / email / room number and agree to the terms). Having trouble dreaming up something that would be able to do this since virtually every captive portal is different. Anyone know of an existing solution?

north stream
#

I know some devices (phones, laptops, and the like) can recognize the connection sequence and do something, but I have no idea how it's accomplished. I suppose you could sample a few and see if the interaction can be generalized somehow. There will always be some oddball that won't work.

merry cargo
#

Yeah, the best I could think up was to connect it to a laptop via USB, use the laptop to sign in as if the device were a wifi dongle, then disconnect the laptop. No idea if the wifi network would continue to recognize the device as a signed-in client, though.

north stream
#

You'd have to have the device do some sort of pass-through. In some cases, I expect the host network associates the connection with the device's MAC address, that case should work if the pass-through makes the laptop appear as coming from the same network interface (which is what I'm guessing you have in mind). It could be it leverages DHCP somehow, and I've seen instances where there are multiple networks, so you initially connect to one network, and once you're signed in, you connect to another (I do not know how this is accomplished)

true bane
#

Anyone have anyidea why my FLORA would work fine when plugged into the computer with the IDE, but not run any code when connected to just a power source? Using a 5.1v 2.5A power supply from Adafruit

north stream
#

Could be it's expecting the USB interface to be available for the serial port

dusk inlet
#

Hi I need to make a buck converter which converts from 9v to 5v , for some reason when I try simulate it on an arduino it fails to work, can anyone help me out

#

This is the code

north stream
dusk inlet
#

It should output 4v in tinkercad but it's 0 rn

north stream
#

It looks like the layout on the breadboard doesn't match the schematic

charred salmon
#

It also looks like the probe is attached to the wrong rows on the breadboard. You need to either bring the connection up from the lower half, or move the probe down to the lower half.

#

Actually, quite a few wires seem to be missing in general.

dusk inlet
#

Thanks I actually corrected the whole thing, I got confused by the way the breadboard internal connections were made

#

It's working now

quiet quail
#

and all i get is a never ending loop, but when i discconect the scl/sda pints i finally get the not connected message

#

this is all that shows

#

The light on the chip is on

fast jacinth
#

Hi guys, I have a 12VDC tower light that is essentially a common cathode RGB LED. I have been trying to use transistors to control each light independently using the 3.3V output of a ESP32 Feather board, but I keep getting tripped up over what the proper transistor type/circuit design is because it is common cathode, not common anode. Can anyone point me in the right direction on this or explain the necessary circuit?

lethal yarrow
#

BJT
Base: GPIO pin thru resistor
Emitter: ground
Collector: LED

N-channel MOSFET
Gate: GPIO pin
Source: ground
Drain: LED

north stream
#

If it were really common cathode, you'd have to switch a positive supply to each input and ground common (cathode) return line, instead of grounding each input with a transistor like @lethal yarrow describes.

lethal yarrow
#

Yeah I got them mixed up.

tardy iron
#

yeah, for common cathode, i think you want a PNP BJT or p-channel MOSFET on the individual anodes. driving those transistors with a microcontroller GPIO might be possible (carefully) with open-drain

north stream
#

Yeah, you'd need some sort of level shifting in the (very likely) case that the power supply voltage to the lights was greater than the logic voltage of the microcontroller.

#

If you don't care to risk the open-drain connection, you can use an NPN or N-channel transistor to do the level shifting to control the PNP or P-channel transistor that switches the voltage. Alternatively, if the supply voltage is <15V, you could use an old style high voltage CMOS level shifter like a CD4504 to control the transistors, or even something like a TPIC6B595 high voltage shift register to let you control up to 8 high side switching transistors with just a couple of microcontroller pins.

#

There are also purpose-made chips (like the TPS22994) for this use case.

tardy iron
#

oh right, non-5V tolerant GPIOs typically have a protection diode to VDD, even in open-drain mode. (and even 5V-tolerant might have a Zener with a lower voltage than is helpful)

lethal yarrow
#

And yeah 12V on any pin will make your microcontroller very, very angry.

tardy iron
#

unless it's a HV-programming pin, but that's less common these days

lethal yarrow
#

And is not used during normal operation.

sacred lake
#

hi, my arduino nano (atmega 328p old) just doesn't execute its code anymore...? i can upload the code succesfully but serial doesn't work and such

#

ive tried multiple arduinos

#

works for none of them

#

ive also tried multiple usb cables

#

uploading the code is succesful

#

okay; ive tried putting a Serial.println("hii") into setup() which gets called, but the things in loop() don't seem to....

#

okay, seems like LiquidCrystal_I2C might be the issue

#

yep, got it to work

sacred lake
median scarab
fast jacinth
#

Great! thanks for the help. I am now encountering an error where I can't program to my HUZZAH32 V2 feather from the arduino IDE without getting the error:
"A fatal error occurred: Failed to connect to ESP32: No serial data received.
Failed uploading: uploading error: exit status 2"

I can still upload and program normally to my ESP32 Reverse TFT and my RP2040. I think the problem is that I am not getting it to properly reset/enter the bootloader. Does anyone know what could be causing this?

sacred lake
stable forge
stable forge
sacred lake
# stable forge which I2C LCD is it? Does it have a PCF8574, or is it an Adafruit one? I'm assum...
sacred lake
opal iris
#

Did anyone use this 5 IR channel array? I am not able to detect black and white surface at the hight of 0.5 cm. If i lift to a height of about 12-15 cm. I am able to detect the line. I have connected the sensor to A0-A4 of arduino nano. What would be the reason or how can I solve this issue?

north stream
green imp
north stream
green imp
#

ah. so I have to use the exemples :/ I'll try my best from that

sacred lake
#

How can I use I²C with a CD74HC4067 mux? Sketch is attached, code I'm using:

float readMux(int channel){
  int controlPin[] = {s0, s1, s2, s3};

  int muxChannel[16][4]={
    {0,0,0,0}, //channel 0
    {1,0,0,0}, //channel 1
    {0,1,0,0}, //channel 2
    {1,1,0,0}, //channel 3
    {0,0,1,0}, //channel 4
    {1,0,1,0}, //channel 5
    {0,1,1,0}, //channel 6
    {1,1,1,0}, //channel 7
    {0,0,0,1}, //channel 8
    {1,0,0,1}, //channel 9
    {0,1,0,1}, //channel 10
    {1,1,0,1}, //channel 11
    {0,0,1,1}, //channel 12
    {1,0,1,1}, //channel 13
    {0,1,1,1}, //channel 14
    {1,1,1,1}  //channel 15
  };

  //loop through the 4 sig
  for(int i = 0; i < 4; i ++){
    digitalWrite(controlPin[i], muxChannel[channel][i]);
  }

  //read the value at the SIG pin
  int val = analogRead(SIG_pin);

  //return the value
  float voltage = (val * 5.0) / 1024.0;
  return voltage;
}```
(just everything copied from [here](https://electropeak.com/learn/interfacing-cd74hc4067-16-channel-analog-digital-multiplexer-with-arduino/) )

Learn How to interface a CD74HC4067 16-Channel Multiplexer with Arduino. using CD74HC4067 Multiplexer example code, circuit, pinout, library

#

also I meant with the wire lib

lethal yarrow
sacred lake
sacred lake
#

im getting this error whilst uploading my sketch, opening serial or just opening the port

#

works on a different usb port..??

north stream
blissful fable
#

Hi, I try to build communication between 2 MCU (Arduino Mega 2560 & Feather M0 Adalogger) over I2C Communication. I am using sercom pin for i2c on the feather M0 side. There is use pin PA16 (SDA) and PA17(SCL). As a default, these pin are digital pin. But, on this project these pin set to be SDA and SCL config. When I run a code, communication between 2 MCU not working. Thanks.

north stream
#

You'll need to set up one as a host and one as a target, and supply pull-up resistors.

lethal yarrow
fast jacinth
#

I have a Huzzah32 V2 that refuses to enter boot mode, but I am unable to reflash it because the serial port is showing up as busy. The web flasher is giving the error "ESP Web Flasher loaded.
Connecting...
Error: Failed to execute 'open' on 'SerialPort': Failed to open serial port." Same thing with the circuit python flasher. Does anyone know a way I can reset this board or fix the bootloader?

stark kindle
merry cargo
# merry cargo Trying to think of the best way to go about this: I want to build a device that,...

Well, I got something working using a Huzzah and a PIR sensor. It currently sets itself up as a wifi hotspot and delivers a single page showing the time since last motion detected. Not sure I can get sufficient range connecting directly to the Huzzah, though. The intent is to use it while traveling to detect when my room's being cleaned so I don't barge in before they're finished. So, I'd need to be able to check it from the restaurant / bar / pool. Maybe I can hack the Huzzah to use a bigger antenna or possibly use a board that allows an antenna hookup.

fast jacinth
quick maple
#

wasnt the liquidcrystal made obsolete and replaced with a community version ?

quick maple
brisk chasm
#

I have a tft display and a esp32 v2 feather and when I try to the example code "breakouttouchpaint" I get this in my serial monitor "GPIO can only be used as input mode" and I cant paint 😦

display https://learn.adafruit.com/adafruit-2-4-color-tft-touchscreen-breakout?view=all#resistive-touchscreen

esp32 https://learn.adafruit.com/adafruit-esp32-feather-v2/pinouts

This are the pins I use
#define YP A2 // must be an analog pin, use "An" notation!
#define XM A4 // must be an analog pin, use "An" notation!
#define YM 32 // can be any digital pin
#define XP 12 // can be any digital pin

and

#define TFT_CS 15
#define TFT_DC 33
#define TFT_MOSI 19
#define TFT_CLK 5
#define TFT_RST -1
#define TFT_MISO 21

Adafruit Learning System

The Feather HUZZAH32 in a whole new light!

Adafruit Learning System

76,800 RGB pixels - under your control!

blissful fable
#

Hi, I try to add new wire on feather m0, but new wire not working when I try send data to other MCU over wire comm. Can you help for this ?

cloud cradle
#

I have a device with buttons, I read 3V on 1 side and gnd on the other. I'd like to press that button from an arduino, I got a bunch of PC817 optocouplers and am now wondering if a transister would actually be what I need? Can I put gnd and 3v on the "input" of the coupler and have it bridge that 3v to gnd to simulate the button?

spice tendon
#

hi i have a feather nrf52840 BLE express. i have updated the bootloader, installed circuitpython, and tested the boards neopixel using arduino IDE. when i go on my phone to connect to the board via the bluefruit app, the device does not show up. the onboard "conn" LED is not on either. what do i need to do to connect and control the board?

spice tendon
spice tendon
#

unless you think circuitpy is easier

stable forge
# spice tendon unless you think circuitpy is easier

yes, I think it is. Unfortunately I don't see a great example of sending data from a peripheral device, mostly the examples are receiving data. But it's basically a simulated UART, and you can send data both ways.

#

See the second link above.

spice tendon
#

cool, thank you!

halcyon vale
#

Has anyone used the Adafruit_Media_Converter scripts to convert WAVE files to C++ headers? I'm having issues getting it to actually output valid bytes. My main goal is to play audio on an Adafruit Prop-Maker Feather via C++, so any way to do that is fair game. (I suppose I could try CircuitPython, but I have some existing C++ code for other components of this project that I'm trying to reuse if possible.) https://forums.adafruit.com/viewtopic.php?t=207704

quick maple
#

Hi Im trying to figure out how to plug this to my arduino unor1 : It doesnt seems to have a datasheet, this is a shield for an esp8266 but surely it must be possible to use it with an arduino since it seems spi. I just dont know if it need 5v or 3.3V. The schematic shows 3.3V but doesnt says which sd chip it is so I dont know the voltage range

edgy ibex
#

The ESP8266 Feather has a single analog input pin. It's well documented that to get meaningful values, I should limit the input voltage to [0V .. 1V]. However what happens if the voltage on that pin rises above 1V? Will a voltage of 2V actually damage the chip, or just produce meaningless values from the ADC?

quick maple
#

this is theorical right, you are not really considering buying an esp8266 right ? It's only a good mcu if you use it for specific applications while being aware of it's huge limitations

edgy ibex
quick maple
edgy ibex
quick maple
#

many sources online says the pin gets damage above 3.2V

#

but the MCU is 3.3V so that's kind of a gotcha I guess

edgy ibex
#

Yeah. Basically, the thermometer part is a thermistor probe I have here, with a fixed resistor.
Gnd <--> Fixed resistor <--> ADC Pin <--> Thermistor <--> 3.3v

#

So in that setup, as long as the thermistor provides a resistange >= the fixed, the ADC pin won't see much of anything over 1.65V And in practice I can chose the fixed to be a little lower so it stays in range.
The problem there becomes the relative lack or resolution of the 8266's ADC (10 bits) vs the fact that the thermistor is horribly non-linear.

quick maple
#

btw my above pic is from a weimos d1 so I have 8266 too

#

mostly because despite the 8266 cons the weimos comes with a ton of very cheap shields and I needed those breakouts and you just stack them all over each other

edgy ibex
#

It's mostly a case of "I have this Feather lying around here, I'd like to find a good use for it." And the Weimos sounds a lot like the Feather ecosystem.

quick maple
#

yeah I try to use what I have as much as possible as well. In my case it's 7x 5V LCDs that it pains me to throw away

#

I guess this might helps as well since you might use the adc pin: @edgy ibex

#

seems you also have to delay between reads or it disconnects the wifi

edgy ibex
#

Same. I just wish there was a wifi capable RP2040 board in a Feather form factor. If that existed, I doubt I'd buy anything else. 🙂 Basically squish a Pi Pico W into a Feather. Mind you, I have a memory tickling the back of my mind about the WiFi antenna used on the Pico W (and the Pi Zero) carrying some funky licensing agreement.

edgy ibex
quick maple
#

eh that high-end arduino stmH might interest me some day if that grand central m4 or teensy 4.1 isnt enough. But yeah the rp2040 is pretty impessive with the parallelism etc kinda nice to be able to run 8 PIOs at once

#

except I have to rewrite all my arduino code and the libraries they use for it. Thats much less nice

edgy ibex
#

And with one Teensy 4.1 in a project here, that's an incredibly beefy little microcontroller. 600 Mhz clock rate, and it's capable of dual issue. Plus benchmarks have shown that typical C/C++ code gets dual issue about 40% to 50% of the time. According to nores on PJRC's web page. So that's hoofing along at something approaching 800 to 900 MHz IPS.
That's no longer microcontroller rates, that's low end desktop speeds.

quick maple
#

yeah ibm ps/2 memory size and 2003 mobile cpu (pentium M) but without an OS like xp/vista in the way 🤣

#

put 8gb on it instead of 8mb and we dont even need rasperry pis 4/5 anymore

edgy ibex
#

Yeah. BTW, looking at the STM32H7, it looks like it'd be about the same sort of performance as a Teensy 4.1 - they're both Cortex M7's under the hood, with close to identical clock speeds.

quick maple
#

the h7 support more "industrial stuff" that's the big difference I think

edgy ibex
#

What does "Industrial stuff" refer to in that context?

quick maple
#

even regular stuff are more suppoprted on the h7, 8x spi vs 4x spi for the teensy. Ethernet built-in vs external on the teensy, no wifi on the teensy, the h7 has a mathematics coprocessor, betetr support for floating point arithmetics etc

quick maple
#

basically has everything you could ever need and 2 usb HID/OTG interface (important to have more than 1 for industrial uses), many onboard adc/dacs, can power other mcus with smps and so on

#

some of them are arduino compatible

#

did I mention it has a graphic-card like device to offload cpu load to do graphics cacculation ?

#

Anyway the devs boards for it are 400$ and the teensy is 30$ so...

edgy ibex
#

Ahh OK. The Teensy I have does little more than a lot of communication via Ethernet. I don't even have anything on SPI or I2C or any of the other "busses". So the Ethernet that's available is a perfectly good solution, and I like the fact that if you don't need it, you don't pay for it.
The main thing that attracted me to the Teensy was that the netwrk stack could actually be configured for the number of various socket types it supported. I needed on a couple of TCP listening, only a couple of UDP, but a huge collection for outbound TCP. So by tweaking some constants in the Ethernet source, I could get what I wanted. Vs the hard limit of seven available sockets on the Ethernet Featherwing

quick maple
#

all the on-board peripherals and integration is the selling point of it but similar capabilities could be obtained with an teensy 4.1 and external ICs I guess

edgy ibex
#

AFK for about 10 to 15 minutes. Lunch time. 🙂

quick maple
#

anyway madbodger wasnt impressed and said unless I run a factory if I need something better than a teensy I should buy a laptop 🤣

north stream
#

Wat.

agile palm
#

I Modified your code and it seems that it worked, i'm going to post the modified code on your github issues

stable forge
#

also, in my code, I do an analogRead, then pinMode, then an analogRead again, whereas you do the pinMode only once at the beginning. So the first analogRead might have code that marks the pin as "set up for analog", whereas it's been reset for digital behind analogRead()'s back

#

in touchscreen, it has to flip the pin between digital and analog over and over

brisk chasm
#

dose anyone know if I can use WiFiNINA lib on a esp32 feather v2

stable forge
brisk chasm
pliant leaf
#

hello guys i am a first year student a have an individual project and i wanted to make this project( Pixel Dust on RGB Matrix displays)
i have DOIT ESP32 DEVKIT V1 board and led matrix 32x64 the board has integrated gyroscope can i just use the library to make that project without external components ?

dusk orchid
# pliant leaf hello guys i am a first year student a have an individual project and i wanted ...

"use the library" might need more detail, what library specifically? You'll need a few usually, maybe checkout the neopixel library for starters, then the gyroscope, then a combination. There's one library for pixel dust but it doesn't do the drawing for you. Maybe better to search the learn guides and see what fits your hardware: https://learn.adafruit.com/search?q=pixel%2520dust
In theory you have enough to begin hardware-wise, and the gyroscope should work for your needs but may not be enough for perfect accuracy / no problems. Also, I'm not really up on LED matrixes so i wonder if it's one of those HUB75 (2x8pin connector?) matrix panels, or just a string of LEDs in a matrix pattern/panel like I have (3 wires in + 3 out + power).

stable forge
agile palm
#

i mean... the card switch the state of the used ADC ?

north stream
stable forge
# agile palm i attached a potentiometer to the 3.3V to read different values. you think the c...

The problem is not in the hardware: the ADC does work. But the code to use in analogRead() is making assumptions about what state the pin is in. The sequence is:

  1. do an analogRead()
  2. do something digital with the pin, like pinMode(pin, INPUT)
  3. do an analogRead() again.

The second analogRead() fails because it is making an assumption that the pin has already been set up for analog mode, but in fact, other things were done to it in the meantime. (This is my hypothesis without actually reading the code.)

So regular analogRead()'s with a potentiometer, etc. will work. It's when the pin is flipped back and forth between digital and analog uses that the software does the wrong thing. There is nothing physically wrong with the hardware.

The TouchScreen library does this flipping back and forth to read the X and then the Y resistive touch values. This is unsual. Most other uses of analogRead() don't encounter this problem.

stable forge
#

... I've confirmed my hypothesis by hacking up the code locally to test it. I don't see a workaround yet.

cobalt hedge
#

Hi

cobalt hedge
#

i just bought the nano rp2048 connect, im doing some test

#

i want to to turn the interal rbg

#

rgb

#

but im not able to

#

if you have a any documention

#

im tring with circuitpython

inland gorge
cobalt hedge
#

there is a rgb led on the board

stable forge
cobalt hedge
#

ok fro now its avail to controll wifi

#

but not the rgb leds

#

ok thanks

obsidian cloud
#

Hello there, I am currently working with an Adafruit NeoTrinkey on arduino.

I was tinkering around with the demo code available on the NeoTrinkey guide and I tried get it to emit a pure white light when the brightness value reached 255 (I had used both an if-else statement and just the code alone to achieve such). The issue is, that upon contact with either touchpad, the brightness would instead jump to 255 and would stay like that.

How would I go around actually getting such to work anyways???
(Apologies for the text wall...)

pallid sage
#

If you have some HSV code, you could push the saturation down when you start to max out the value.

obsidian cloud
#

And I also wanted it to be at 255

pallid sage
#

The demo code I saw was running hues. A link or code snippet might be helpful.

north stream
vagrant plank
#

ahoy everyone! Question: I am fairly new to Arduino and ESP Coding, and trying to use an Adafruit HUZZAH 32 board with a Feather Ethernet shield. I am trying to run the example code from Arduino Web sever and the etherneth shield is not being recognized. Could anyone point me in a direction. Thanks for any help.

north stream
vagrant plank
#

I am currently using pin 33 as it lines up with the CS pin.

leaden walrus
vagrant plank
#

@leaden walrus

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
assigned IP 0.0.0.0
connecting to www.google.com...
connection failed

disconnecting.
Received 0 bytes in 0.0000, rate = 0.00 kbytes/second

#

I have even tried to manually assign my IP address and the result is the same.

leaden walrus
#

try making the other suggested code changes as well

vagrant plank
#

Agreed. changing the code now to see if that solves the problem.

vagrant plank
#

I moved the cs pin to pin 27 and followed the steps in the above guide, however this is the only output I see in serial monitor now.
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0

leaden walrus
#

why the pin move? shouldn't be any issue using 33. and that way you wouldn't need to worry about cutting the jumper and rerouting it.

#

how are the feather and the featherwing being attached to each other?

vagrant plank
#

it was a suggestion from a coworker to see if that resolved it, sadly it did not.

leaden walrus
#

did you cut the jumper and add a wire to reroute it to 27?

vagrant plank
#

I did.

leaden walrus
#

and you updated the code to use 27?

vagrant plank
#

I did. and that is the current result.

#

also thank you so much for the help, I am pretty new to coding with arduino.

leaden walrus
#

still not sure why it's not showing the expected initial print

#
  Serial.println("Initialize Ethernet with DHCP:");
#

which is done before anything relating to the ethernet featherwing

#

maybe try adding another serial print line?

#

should figure out why the serial output isn't showing up first

vagrant plank
#

adding in a print statement now. Sorry I was pulled into a meeting.

#

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
test, I am here before the ethernet connection
Initialize Ethernet with DHCP:
Failed to configure Ethernet using DHCP
Ethernet shield was not found. Sorry, can't run without hardware. 😦

leaden walrus
#

it could be connection related

#

at this point, photos of the setup showing how everything is connected would help

vagrant plank
#

Sorry for poor lightning

leaden walrus
#

it's a connection issue

#

none of these pins are soldered

#

and the soldering on the CS jumper wire looks cold soldered / poorly wetted

vagrant plank
#

easy enough fix. I will get those soldered up after work and give it another shot. Thank you for the help.

edgy ibex
#

I believe that the ESP8266 does "bit-bang" I2C. If so, does it also do "bit-bang" SPI, or does it actually have SPI hardware on the chip?

lethal yarrow
fiery stump
#

Hey everyone!
I'm looking to see if anyone's got a suggestion for getting some small persistent storage on a QT Py M0. I'm programming in Arduino IDE.

Is there an Adafruit API for the SAMD21 EEPROM emulation?

quick maple
fiery stump
#

Microchip offers that as a capability, but I haven't found any reference to people doing it on an Adafruit board.

quick maple
#

the arduino foundation dont want to do that to keep things simple. Only way you can do it is build your own building tools/ide and bootloader since it has to be done at the bootloader level

#

you cant do that throught a sketch for sure because it's too late for that, and like I said just because the capacity is there (bootloader) doesnt mean the build tools can assign adresses from it (rebuiding the build tools)

fiery stump
#

That's disappointing. Oh well.

I might have enough room in the assembly to put an EEPROM chip on the back of the board in the footprint for external flash.

quick maple
fiery stump
#

To be clear, I mean mechanical assembly - things are getting awful cozy in there.

quick maple
#

look it up on wikipedia, you will see why it would be difficult at compile time to reference methods on adafruit website which is kinda like telling arduino build tools to use a method in a eeprom is like

#

you'd also be very limited to what part of a program you can store in it cuz eeprom breaks quickly on writes and are slow

#

so youd have to stick to code that almost never change like APIs/libraries like says liquid crystal

fiery stump
#

I'm not planning to store the program there - I just need to store a byte of settings data.

quick maple
#

oh in that case yeah that's simpe and that is what they are used for, They are like the electronics .ini files / storing device specific settings not changed often

fiery stump
#

Yep - that one I'm pretty confident I can get working!
Just gotta order some EEPROM chips!

quick maple
#

and uses a .h file to keep the adresses and their meaning

fiery stump
quick maple
#

ie: for instance #define CERTIFICATE_PUBLIC_KEY_ADRESS = 0x98A etc

fiery stump
#

Either way - I can get the external one working, if I can make the chip fit.

quick maple
#

odds are you will get something that work like the internal eeprom, not a lot of choices around

#

and that library is good to understand what's going on in any eeprom, just the capacity and minor details change

tardy iron
#

there are Arduino libraries that let you use the internal flash as emulated EEPROM, but it depends on what chip you have, and you might not want to use it if the flash endurance isn't high

quick maple
#

A lot of eeproms work exactly the same way, only thing that change is the way to access it

#

afaik once you get that over with (like having the i2c adress) you can build up from the eeprom stock library if your specific one dont have a specific library afaik

#

afaik again they arent like gas sensors, there isnt hundreds of ways to use them

fiery stump
quick maple
#

It's also very very likely that if you pick a cheap legged one it will be one that is in the same family as the one onboard arduinos, so all that change is how to reach it (I dont know which one it is yet)

#

you cant pick one faster than the crystal on your mcu as well afaik but I assume you knew that already

fiery stump
tardy iron
#

not offhand. it really depends on which chip you're using. on some chips, the Arduino core comes with an EEPROM library that is actually emulated using flash (where the chip has no physical EEPROM)

#

it used to be that EEPROM had endurance at least 10x that of the flash on the same chip; these days it's often the same

quick maple
#

meh I was wrong

#

even more reasons to have included flash and eeprom in sketch size space then grrrr

#

arduinos and their 1970s memory size...

fiery stump
#

Yeah they do leave a bit to be desired...

tardy iron
fiery stump
quick maple
#

Seems like more than 1kb of rom is missing

#

imagine having enough memory to drive a 320x200x4bpp display... in 2006... when cga cames out in 1981...

fiery stump
quick maple
#

It frustrate me because the arduino based on 128p is put in a lot of more expensive products like displays, robots, drone control board etc. But it's not a coin slot with 32 coins to keep in memory , it's a robot. The heck do you want me to do with 2kb of memory ?!

fiery stump
quick maple
#

yeah that may seems to be true to you

fiery stump
#

I have my niche. :)

quick maple
#

but the library to use the sensors is often 1kb compiled, and after that it's very hard to do a program that compile to less than 1kb

#

like running blink on my qt py esp32-s2 takes 3.2kb just for 1 led

#

I am talking about sram/program space/sketch space by the way

#

which I equal to computer RAM

#

hence the comparaison to 1981 IBM Pc offering 16kb to 25kb (even thought the atmel 128p cames out in mid-1990, 15 years seems enough to catch up in fab factory for atmel to 1981 intel...)

#

Speaking on which. I saw my first neopixel recently

#

And now I understand why you were telling me to not power them with gpio pins

#

cuz they are 4 legged. I was puzzled you were telling me that when I had 2 legged leds in front of me

north stream
north stream
karmic cape
#

Anyone know what would be causing errors like these?
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00

#

It's a Nano 328p, uploading from PIO

#

I also tried the Arduino IDE though and I get the same error

#

I don't think it's a chip issue unless if somehow all 4 of these failed at once.

#

Although on this board for some reason, the chip itself gets very hot when plugged in, though it also doesn't work for the board where that doesn't happen

inland gorge
karmic cape
karmic cape
#

check that, it uploaded to one of these 168 nano's just fine

#

But every single 328 nano stopped working all of a sudden, even though it worked just a little bit ago

quick maple
karmic cape
#

No I tested them all one after another

#

Same deal every time

#

I just uploaded a sketch earlier (and needed help with it, though that got nuked by automod and now I'm trying to get this), and then all of a sudden it broke for all the boards

#

I see this at the bottom, though in the Device Manager, it shows as 9600

#

Should I change it?

#

Oh wait this is under ATmega4809

quick maple
#

I have the same problem in the arduino ide it doesnt like me unplugging things and replugging or my computer doesn't

karmic cape
#

I also tried resetting my PC, and nothing

#

It actually broke after I used the PIO console to change the baud rate for monitoring to 115200

quick maple
#

sorry I was cleaning between two messages. My next message was that I have the same problem of having to fiddling conmstantly with the arduino ide so unfortunately I dont know what to do either

inland gorge
karmic cape
inland gorge
karmic cape
#

It's plugged into a breadboard, but it also doesn't work when I take it out and it's just sitting on my wood desk

inland gorge
karmic cape
#

Dang

#

IDK how it died, but it's the 2nd one to die on me. The first one doesn't get hot, but windows doesn't recognize it all when plugged in

#

The other two nanos don't get hot but they still have the sync error

inland gorge
#

You can also look for them in the Windows Device Manager. The Device Manager will also tell you which drivers are in use (or if a driver is missing)

karmic cape
#

Even Arduino IDE recognizes them, I just can't upload to them for some reason

#

I also reinstalled drivers and no dice.

inland gorge
karmic cape
#

this is with a board that doesn't overheat

#

Though on this board, for some reason the TX LED stays on

#

wait it just turned off, nvm

inland gorge
#

And these Arduinos worked at one point?

karmic cape
#

Yup

#

But they all broke at once so it's like something broke on my machine

inland gorge
#

Do you have another computer to try the Arduino with? (In case there's some other program on the computer you're using that's interfering with uploads, some printer drivers I think did that)

karmic cape
#

I do not :(

inland gorge
#

Have you installed any other software from when they last worked to now?

karmic cape
#

Nope

#

I just changed the baud rate for the monitor in PIO and future uploads did not work

inland gorge
#

Are you using platformio from the commandline or via Visual Studio Code?

#

If you're using it from VSCode, I would recommend quitting it completely. Rebooting your machine, then starting up the Arduino IDE

quick maple
#

since these can power and program other mcus

karmic cape
karmic cape
quick maple
#

you could try using the arduino ide on it and connect your mcu to it to see if you have a different behaviour provided your power supply is +2A

inland gorge
karmic cape
#

Alright, let me try that

#

Though I don't think I have a desktop installed on my raspi

#

Is one required for the arduino IDE?

inland gorge
karmic cape
#

Alright lemme reflash the SD

#

doing bullseye

surreal quarry
#

Hi there, I am using Arduino libraries and C++ on an Adafruit ESP32 Feather V2, I have a "backup" battery connected as well which is a 3.7V 800mAh LiPo also from Adafruit. I have been looking around for a way to be able to check the battery life, and making sure it is connected and such (fault checking) and have been having some trouble. Everything that I am finding includes some other components or something like a MAX17048. Is there any way for me to do this just with the Feather and Battery? or does this require another component

rough torrent
#

Using a fuel guage will provide accurate estimations of the percentage left on a lipo battery - the discharge curve is non-linear and the voltage is dependent on current draw, making it difficult to provide accurate estimates. But you can read the voltage on the lipo with a feather, usually it's connected to a voltage divider to an ADC allowing you to make rough estimates of battery life.

surreal quarry
#

Okay, so on a "in-production" unit it would probably be best to add a fuel gauge

rough torrent
#

Yea

karmic cape
cerulean niche
#

Hello Community! I'd like to use ItsyBitsy M4 to control a solenoid via MIDI using Aurdino IDE namely, not CircuitPython. There is a code for Aurdino boards: https://efundies.com/src/arduino/midi-solenoids.ino. But it's not running on ItsyBitsy M4. Where can I find more info on how Aurdino IDE works on ItsyBitsy? So I could tweak the above mentioned code. Unfortunately, ItsyBitsy's manual lacks details on how to code using Aurdino IDE.

north stream
#

What do you mean when you say it's not running? Does it upload? Does it start?

cerulean niche
north stream
royal hare
#

I've been digging into myself and understand the general process of the behind the scenes but have had no success yet of getting it to work.

inland gorge
cerulean niche
inland gorge
#

Did you set the USB Stack to "Adafruit TinyUSB"?

inland gorge
karmic cape
#

It prints the ASCII alphabet and some other info

#

But when I go to upload, I get the sync errors.

edgy ibex
north stream
#

Close! It's a 6800, which the 6502 is derived from. Basically, the 6502 was a lower-cost implementation (one fewer accumulator, different layout, etc.), costing a mere $25 when the 6800 chip was still $300: that's why the 6502 became so popular.

cerulean niche
# inland gorge Nope, I am wrong, you are correct. I left out: ```c++ // read any new MIDI me...

I've put MIDIusb.read() inside the loop() and added the following line in handleNoteOn() to see if it's getting midi-messages: Serial.print(pitch);
And nothing is printed in the Serial monitor as I send a MIDI file via MIDI output called ItsyBitsy M4

I suggest the loop block should be something like this:

void loop() {
MIDIusb.read();
data1 = MIDIusb.getData1();
data2 = MIDIusb.getData2();
channel = MIDIusb.getChannel();
handleNoteOn(channel, data1, data2)
}

But getData1, getData2 and getChannel are not supported by MIDI.h library as I understand

inland gorge
# cerulean niche I've put MIDIusb.read() inside the loop() and added the following line in handle...

If you put the MIDI message parsing in loop(), then take out the MIDIusb.setHandleNoteOn() function in setup(). The updated gist is verified to work on ItsyBitsy M4 https://gist.github.com/todbot/684a0fcc50bbdd067e60b3f3ef21ddd6
also, .getData1() and similar functions are definitely supported. Here's an example from the library showing it: https://github.com/FortySevenEffects/arduino_midi_library/blob/master/examples/Input/Input.ino

cerulean niche
# inland gorge If you put the MIDI message parsing in `loop()`, then take out the `MIDIusb.setH...

Nope, my Serial monitor shows nothing. I suspect MIDI is not reaching the chip at all. Because I've just tested a pretty simple code and it's not working. The LED doesn't blink on MIDI messages:

#include <Adafruit_TinyUSB.h>
#include <MIDI.h>

Adafruit_USBD_MIDI usb_midi;
MIDI_CREATE_INSTANCE(Adafruit_USBD_MIDI, usb_midi, MIDIusb);

void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
MIDIusb.begin(MIDI_CHANNEL_OMNI);
}

void loop()
{
if (MIDIusb.read()) // If we have received a message
{
digitalWrite(LED_BUILTIN, HIGH);
delay(1000); // Wait for a second
digitalWrite(LED_BUILTIN, LOW);
}
}

inland gorge
# cerulean niche Nope, my Serial monitor shows nothing. I suspect MIDI is not reaching the chip a...

Having that delay(1000) is not helping matters for you. MIDI.read() must be called frequently. But let's say it works: Did you select the "Adafruit TinyUSB" in Tools -> USB Stack in the Arduino IDE? What program on your computer are you using to send USB MIDI? Can you select that device in that program and are sure you're sending MIDI to it? For instance, in Ableton Live, you must specific enable and select the MIDI device a track is sending on, like this:

cerulean niche
inland gorge
# cerulean niche Yes, the USB Stack has TinyUSB selected. For MIDI I use a simple utility called ...

Oh good you've got a known-good test platform, that's great. If you're on an ItsyBitsy M4, then it doesn't have a standard LED_BUILTIN but an APA102 "Dotstar" LED. As a minimal test sketch, I'd go with something that prints to the Serial Monitor like this:

#include <Adafruit_TinyUSB.h>
#include <MIDI.h>

Adafruit_USBD_MIDI usb_midi;
MIDI_CREATE_INSTANCE(Adafruit_USBD_MIDI, usb_midi, MIDIusb);

void setup() {
  MIDIusb.begin(MIDI_CHANNEL_OMNI);
}

void loop() {
  if (MIDIusb.read()) {
    Serial.printf("type:%x data1:%d data2:%d\n", MIDIusb.getType(), MIDIusb.getData1(), MIDIusb.getData2() );
  }
}
cerulean niche
cerulean niche
inland gorge
# cerulean niche Unfortunately, Serial monitor still shows nothing...

Very weird. Maybe try unplugging everything, shut down MIDI Editor, and start it all up again. Your OS might have cached some aspects of USB that's changed when switching from CircuitPython to Arduino. I've verified the above sketch works on my Itsy M4. Also Itsy M4 does have a pin 13 red LED, my mistake. So this does work, and the shorter delay should mean you don't miss too many MIDI messages:

#include <Adafruit_TinyUSB.h>
#include <MIDI.h>
Adafruit_USBD_MIDI usb_midi;
MIDI_CREATE_INSTANCE(Adafruit_USBD_MIDI, usb_midi, MIDIusb);
void setup() {
  MIDIusb.begin(MIDI_CHANNEL_OMNI);
  pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
  if (MIDIusb.read()) {
    Serial.printf("type:%x data1:%d data2:%d\n", MIDIusb.getType(), MIDIusb.getData1(), MIDIusb.getData2() );
    digitalWrite(LED_BUILTIN, HIGH);
    delay(10);
    digitalWrite(LED_BUILTIN, LOW);
  }
}
cerulean niche
#

So I'm gonna try the previous sketches tweaking them for my purposes. Thanks a lot, todbot!

karmic cape
#

Can a 168p nano do that?

north stream
#

A 168P can flash a bootloader. As to whether it would help, I don't know

fallow nova
#

hello!

#

has someone already worked with arduino nano?

#

in this discord

safe shell
#

probably, best to ask your specific question

inland gorge
fallow nova
north stream
#

Any of them would be suitable for a line tracing robot

inland gorge
karmic cape
#

Well, I'm not sure if it's damaged

#

The fact that I can still read the serial output tells me something weird is going on

#

I just can't write to it

tardy iron
#

the riskiest part of flashing an AVR Arduino bootloader is during the setting of fuses. if the fuses are set wrong, you can disable future programming over SPI. but if you're using an established SPI programmer and the "burn bootloader" option in the Arduino IDE, it should do it correctly

sharp patio
#

I know its possible to use some of the RP2040 pins for capacitive touch with the circuitpython touchio module. Is this possible in Arduino too, perhaps with a different library?

tardy iron
#

it looks like the touchio module has a dedicated C implementation that doesn't come from another library. there seem to be touch sensing Arduino libraries out there, though i haven't tried any of them

inland gorge
brisk chasm
#

can I connect hx711 and a tft display to the same 3.3v I use this and I only have one 3.3v but could I connect them to the same or can I use the vbus or any other? could I connect to EN

odd fjord
brisk chasm
odd fjord
#

Yes, That should be fine.

royal hare
#

Are there any other methods of updating arduino code without using the IDE? The SDU library would be great but unfortunately it's not currently supported by samd51 chips.

leaden walrus
#

what do you mean by "updating" in this context? if a library does not support a specific platform, then work must be done (coding work) to make those changes. depending on the library, etc. that can be non trivial work.

royal hare
#

Yeah probably not trivial is what I am getting to the conclusion. Basically looking for someone to be able to update my existing code that I would give them through some means (via ethernet , sd card) if possible.

north stream
#

There are two main methods that don't need additional coding effort: using the bootloader (essentially serial via USB), or in-circuit programming. With some coding effort, it would be possible to fetch data from various sources and burn it as a programmer (essentially the same thing the bootloader does, but getting the information in a different way)

leaden walrus
#

if you can use the UF2 bootloader on the SAMD51 board, then you could send updates as UF2 files

royal hare
#

Ah yeah that would be ideal I believe. I'll check out both suggestions.

upper oak
#

Hey folks,

A bit of a basic question from someone who comes from the software side of things and isn't as handy with the hardware stuff

I'm looking at getting an Arduino Uno R4 Wifi (Original board) and powering it via a power supply.
I couldn't find much about how to choose a power supply according to characteristics, but the few resources I found seemed to favor MeanWell's GST60A12-P1J

Also, are there advantages to running it via USB power, vice versa, or should both approaches be seen as more or less the same?

north stream
#

It looks like it won't draw more than 1.2A max (which is what its power supply chip can handle) and probably significantly less, but you're right, the product pages don't give power draw specs. That's a bit much for old-style USB, but it may well run fine on less than that maximum. That Meanwell would work, but it's probably overkill. I imagine this one would be entirely sufficient. https://www.adafruit.com/product/276

#

Oops, I misspoke, it wants at least 6V input, and that AdaFruit supply I mentioned is 5V.

#

You could power it with that supply, just not via the barrel jack

#

It's slightly overkill, but for $6, it may be the most economical choice

upper oak
#

Yeah, I did get the feeling that a 60W power supply was a bit much to be perfectly honest.
The part that confuses me the most is the wide range of voltages the Arduino accepts as I don't fully understand if there's a rule that provides any advantage (such as higher is better, or lower is better), or if it's just such so that you could power it with just about any old junk you find in the house.

#

Thanks for the assistance, I'll look into cheaper PSUs as well!

north stream
#

One of the upgrades with the R4 is a switching power supply, which is more efficient than the previous linear power supplies, and supports a wider range of voltages. It will work efficiently with any of them, so it's mostly as you describe: to accept a wide range of inputs. However, if you were in a situation where you were operating one at the end of some long thin power wires, it might make sense to choose a higher voltage (lower current) input.

upper oak
#

Gotcha!

Thank you!
I'll probably stay in the same family of adapters (MeanWell), since it's a brand I've worked with and trust, but will simply buy a 12V one with a lower max current output since they produce many variations in the same range.

To be fully honest, the Arduino will simply connect to a server, switch I/O on and off and run a sensor suite, so I don't presume it will draw much more than it's base operational current.
The only reason why I'll probably bump it up a bit is futureproofing and nothing other than that.

north stream
#

MeanWell does make nice supplies.

upper oak
#

As someone who has once bought a hefty expensive MeanWell power supply, only to short it about 3 seconds in, I was very thankful they make good products with short circuit protection.

#

Might sound like a joke, but no, I really was thankful and I really do believe in buying nice things with failsafe features.
Sometimes they protect the device from you, at other times you from the device. At all times they are worth their price.

north stream
#

Yup. "The person who buys good tools only cries once"

lethal yarrow
#

Power supplies are something you should never go cheap on.

whole dagger
#

Otherwise superdodgy

brisk chasm
#

I have this HX711 With VDD and VCC do I need to connect them both since most HX711 only have VCC. And I only have a esp32 feather V2 with a 3.3V
https://www.sparkfun.com/products/13879
https://learn.adafruit.com/adafruit-esp32-feather-v2/overview

Adafruit Learning System

The Feather HUZZAH32 in a whole new light!

brisk chasm
#

but I dont have a 5V

brisk chasm
formal edge
#

I believe it is saying you need an external 5v supply.

brisk chasm
#

like cant I use the USB or BAT pins

formal edge
#

It's a little confusing because the schematic and the datasheet both say 2.7v-5.5v for Vcc and Vdd 🤔

#

Oh, I think it depends on the voltage your load cell requires?

#

"VCC is the analog voltage to power the load cell"

brisk chasm
#

3-12VDC

formal edge
brisk chasm
#

yea

formal edge
#

Try it and see if it works? 🤷‍♂️

brisk chasm
#

but could I not just use the USB or BAT pinouts

formal edge
#

Both the Schematic and Datasheet seem to indicated 3.3-5v is allowable for Vcc and Vdd.

brisk chasm
#

so basicly I could just solid the VCC and VDD togheter and then hook it up to my 3v

formal edge
#

Let me look at the ESP32 feather that you linked.

formal edge
#

In some applications where you load sensor needs 5v to work; you might supply a different voltage to Vcc.

If I am understanding things correctly.

brisk chasm
#

hmm? The important thing is to tell the breakout board what LOGIC level of voltage your MCU is using (Vdd). what do you mean do I need to code it

leaden walrus
#

nothing code related

#

VDD should be 3.3V since the Feather is 3.3V logic

#

VCC can be whatever (within the HX711 specs) is needed for load cell

#

the Feather's USB pin is directly connected to USB power - so has 5V when plugged in via USB

#

the BAT pin is directly connected to battery power, so will be whatever battery voltage is

brisk chasm
#

so if I power the ESP with a usb-c to the wall. it has 5V. and if that I correct I can just solid the VCC and VDD togheter and connect it to USB pinout

leaden walrus
#

no. that would put 5V on VDD.

brisk chasm
#

so not solid them togheter but put VCC to usb pinout and VDD to 3V

leaden walrus
#

you'd want to use the 3.3V pin on the Feather

#

the Feather's 3.3V pin is the output of the onboard voltage regulator

#

USB and BAT are inputs to the voltage regulator

#

try using 3.3V for both VCC and VDD and see how that works

brisk chasm
#

soild them first togheter then? and then pray

leaden walrus
#

jumper wires and breadboard or equivalent

#

test first

formal edge
#

Before I got nerdsniped I came here to ask if anyone has a resource that compares ESP32, RPI 2040, Arduino, Teensy features; when choosing for a project?

leaden walrus
#

you will want to solder connections in general though

#

most common approach is soldering "standard" headers to the feather and breakout

#

and then staging everything on a breadboard

#

typically male-male style in various lengths

formal edge
leaden walrus
#

@formal edge those kinds of comparisons are deceptively difficult to make. everyone always has a "but you left out..." comment. like you're focused on DAC and bus pins, others care about wifi/bluetooth, others care about memory, others care about processor speed, others care about core architecture, etc.

formal edge
brisk chasm
#

On my esp32 fether v2 it says following "3V - This is the output from the 3.3V regulator. The regulator can supply 500mA peak but half of that is drawn by the ESP32, and it's a fairly power-hungry chip. So if you need a ton of power for stuff like LEDs, motors, etc. use the USB or BAT pins, and an additional regulator." So could I put a hx711 that need 5v on the USB pinout, and the usb acts as a 5v pinout?

north stream
#

That should be fine, the 3.3V regulator isn't involved in that

hollow terrace
#

Good day everyone, I was hoping I could get a little help with an issue I am having. I just purchased a Adafruit Feather M0 WiFi and DC Motor + Stepper FeatherWing. I am trying to drive two stepper motors, (repurposed off of an old ender 3) and when I run one motor it appears to work fine, when I attach a 2nd motor both make short movements that appear to be random. Any tips in what I should look into next? Thanks!

hollow terrace
#

Ended up being a bad AC adaptor into the bullet connector! Thanks

gentle sigil
#

does a Arduino have a precision oscillator output , software controlled ? where to ask , here ??

inland gorge
# gentle sigil does a Arduino have a precision oscillator output , software controlled ? where...

Depends on what you mean by precise? And which Arduino board, there are hundreds. Do you mean an off-board peripheral? If on-board, many boards have a crystal oscillator that's +/- 10 ppm I think. What's your use case? If you want to measure clock time accurately, one would normally use an RTC board, like this: https://www.sparkfun.com/products/14558 or this: https://www.adafruit.com/product/5188 if you want a tunable oscillator that is precise and goes into the MHz range, you may want something like: https://www.adafruit.com/product/2045

gentle sigil
#

for HAM radio circuits - as a mixer @inland gorge

inland gorge
gentle sigil
#

how precise can the clock source step 1 , 2 , 5 , 10 Hz ? via software of course @inland gorge

#

many clocks use PLL to multiply upwards and not stable ( frequency jitters ) or has big freq steps

stable forge
gentle sigil
#

in HAM radio , VFO ( variable frequency oscillators ) using transistors are temperature drifty - so looking for some nice IC chip stability - im open to ideas

#

im looking at Si5351A

stable forge
gentle sigil
#

cool thanks

fossil hare
#

Has anyone had any luck using an ESP8266 as an I²C slave? I've been trying to get these ESP-07s modules to work for a few days now and no luck.

I've got the master ESP8266 scanning for addresses and it does find a SSD1306 OLED display on the bus just fine but it can't see the other. So far I've tried lowering the clock speed to 10khz and including my own 4.7k resistors but still can only see the OLED display.

Any ideas what else I might try to get them working? I'm partial to these modules because they're small and very cheap, but I'm open to buying some better alternatives that are still small/cheap

stable forge
fossil hare
# stable forge I can't speak to the I2C target problems (maybe see <https://github.com/esp8266/...

Thanks, I had checked that thread and it seems they were able to do ESP8266->ESP8266
"While ESP8266(I2C Master) to ESP8266(I2C Slave) works, with a pinch†, I cannot get ESP8266 to work as an I2C Slave towards Raspberry Pi, Micro:Bit and others."

They didn't really make mention what the pinch† was about though.
Oh dang they did, I'm just a dingus and stopped before seeing:
"In order to have the ESP8266 Master to work, I have to call the Wire.begin() with an address, like a Master address, that is not standard, but otherwise it won't work for me."

Gonna try this out

I'm not actually even interested in WiFi features. I just have like 15+ of these ESP-07s modules and would prefer to make use of them, even if they have vestigial wifi capability since they were dirt cheap and should work.. They're also a great size and I'm planning on ordering a few PCBs to mount them on.

crude heart
#

Anyone have any documentation or tips on adding some pots to control parameters within FASTLED library?

#

Found it

#

Nvm lol. Not doing so well.

#

I’m using this with some small tweaks to hue.

I’d like to add the pot directly to control the first value in CHSV

#

And another to control .nscale

leaden walrus
#

why doesn't that example work?

#

hue = analogRead(POT_PIN) * some_scaling;

winter mortar
#

Hi, please anyone help me.. I have PCA9685 and im trying to run this by Python. PCA is connected to Arduino. While im trying to upload a examples, I always getting response that I have problem with detect a board. Here U have all code and terminal

#

SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries

SPDX-License-Identifier: MIT

"""Simple test for a standard servo on channel 0 and a continuous rotation servo on channel 1."""
import time
from adafruit_servokit import ServoKit
import pyfirmata
comport = 'COM5'
board = pyfirmata.Arduino(comport)

it = pyfirmata.util.Iterator(board)
it.start()

Set channels to the number of servo channels on your kit.

8 for FeatherWing, 16 for Shield/HAT/Bonnet.

kit = ServoKit(channels=16)

kit.servo[0].angle = 180
kit.continuous_servo[1].throttle = 1
time.sleep(1)
kit.continuous_servo[1].throttle = -1
time.sleep(1)
kit.servo[0].angle = 0
kit.continuous_servo[1].throttle = 0

#

NotImplementedError:
Adafruit-PlatformDetect version 3.60.0 was unable to identify the board and/or
microcontroller running the Windows platform. Please be sure you
have the latest packages by running:
'pip3 install --upgrade adafruit-blinka adafruit-platformdetect'

winter mortar
#

Is this possible thats not working because i have ArduinoUno while a have to have Zero?

odd fjord
#

The Uno does not support CircuitPython.

#

but it is not clear what you are trying to do. Where are you running the python code? It may help if you describe what you are trying to do?

#

If you are running code on A raspberry Pi, then you can connect the PCA9685 directly to the Pi….

sacred lake
#

how would I go by making a volume meter that is controlled by software (on the end computer)? would I have to use a series of LEDs or a tall OLED or something?

north stream
sacred lake
north stream
#

OLED is great for small sharp bright displays. I don't know what else you have hooked up that you'd need to mux (I²C devices can share a bus as long as they have different addresses). Most OLED displays are rectangular, so if you wanted several different readings, you could arrange them side by side on a single display.

sacred lake
sacred lake
north stream
#

Hmm. A bunch of LED strips would work well there. A single controller chip could run 8 of them. It's tempting to use those surplus linear VFD dot displays, but they only have 7 dots.

tardy iron
#

i vaguely recall some actual mixing boards used tiny light pipes on top of larger LEDs

north stream
sacred lake
polar swift
#

Hi, I'm a college student in electronic. For a class, I got my hand on a 2.4" TFT LCD touchscreen compatible with Arduino Uno, Due and Mega. I tried mesuring the resistance value with an Ohmmeter. While most forum I went to seems to speak as if the value should be around 300 Ohms, I'm getting a value of 7,8M Ohms. I can't tell if I'm doing something wrong or if it's the model I use that has a much much higher resistance value.

north stream
#

Measuring which resistance? There are several different connections possible

fair jasper
#

Anybody have a clue as to why the Arduino IDE 2.3 thread-locks (panel turns all white, unresponsive) right after opening the Serial Monitor? I have to kill the thread, or even the whole process sometimes, to continue.

And where is the IDE’s setting file that tells the Monitor about data bits, stop bits, parity, and flow control? I want to use putty instead but don’t know the settings. The default Putty settings only show the first block of the text.

dull pond
#
opal iris
#

Did anyone use this sensor. If i completely keep on ground, then I am able to detect the black line or else I am not. I have 2 sensors, but both are facing same issue. Even if I lift 1cm above from ground, I am not able to detect.

#

Please help me to resolve this issue. Tried rotating POT as well but nothing works.

edgy ibex
#

I'm working with a MusicMaker Featherwing, attached to an ESP32-S2, everything is operational, but I had a couple of questions about the SD card.

  1. Is there some way to tell the SD library, the one that's used by the VS1053 library, that I want to mount the SD card as read only, so that it's impossible to modify the files on it.
  2. Assuming that I'm not playing music at the time, is it possible to dismount and extract the SD card while the Microcontroller continues to run the sketch, so I can add more music files to it, and then re-insert it into the slot on the MusicMaker so that it can be used for playback. I can issue a command to the sketch telling it that the file-list on the SD card has changed if that's needed.
north stream
stable forge
#

i will look at the vs1053 library

edgy ibex
# stable forge It uses either the SD or SDFat library: <https://github.com/adafruit/Adafruit_VS...

It's not quite a drop in replacement. I replaced SD with SdFat in the project dependencies, turned on the #define you linked to, and still got the following two errors:

1>In file included from src/main.cpp:8:
1>C:/Etc/Dev/Arduino/libraries/Adafruit_VS1053_Library/Adafruit_VS1053.h(345,3): error GCE15905C: 'File' does not name a type; did you mean 'SdFile'?
1>   File currentTrack;             //!< File that is currently playing
1>   ^~~~
1>   SdFile
1>C:/Etc/Dev/Arduino/libraries/Adafruit_VS1053_Library/Adafruit_VS1053.h(363,31): error GCE15905C: 'File' has not been declared
1>   unsigned long mp3_ID3Jumper(File mp3);
1>                               ^~~~

I could fix it either by using:
typedef SdFile File;
or by putting a #ifdef guard around the offending lines to switch to the use of SdFile rather than File
I'm tempted to do the latter, since it keeps things cleaner. If fo some reason someone ever created a project that used both SD and SdFat, the typedef would almost certainly break something.

brisk chasm
#

my loadcell and hx711 scale.read value is fluctuating even when no force is

brisk chasm
#

the usb pinout on esp32 feather v2 is that 5v

pallid sage
#

They do tend to be crazy sensitive in my very limited experience.

north stream
#

Yes, they're comparing minute variations in resistance between things. Any noise or interference that gets in makes the whole thing unstable.

brisk chasm
#

how can I resolv this then

north stream
#

Basically, power supply filtering and shielding

winter mortar
#

Hi, I have some problems with connecting Arduino Zero with PCA by Python. All time I have information that this ''cannot find board". I try to install the latest version of CircuitPython on Arduino Zero but have some problems with that. Can someone help me?

stable forge
winter mortar
left mauve
#

The display pins on the github don't seem to match up with the display pins on the pinout of the pygamer
pinout: https://learn.adafruit.com/assets/112290
github: https://github.com/adafruit/Adafruit-ST7735-Library/blob/master/examples/graphicstest_pybadge_pygamer/graphicstest_pybadge_pygamer.ino

GitHub

This is a library for the Adafruit 1.8" SPI display http://www.adafruit.com/products/358 and http://www.adafruit.com/products/618 - adafruit/Adafruit-ST7735-Library

leaden walrus
#

@left mauve thanks for pointing that out. github is correct. the pinout diagram is incorrect.

lusty forge
#

Copying this message from another channel

#

Hey I know this might be a common question but I can't find anything useful online - I have an Itsy Bitsy nrf52840 express that I'm trying to connect i2c devices to, but they won't show up on the arduino i2c scanner. I've tested those components separately with an arduino uno so I know they work, the issue is occurring at the Itsy Bitsy somehow. I've added various pull up resistors between the SDA/SCL lines and tried both 3.3 and 5v, as well as like 6 different breadboards, so if there's any advice u guys might have I would appreciate it a lot

#

More specifically, the i2c components I'm using are the trill bar sensor and a 0.49 in oled display

leaden walrus
#

@nxt what are the i2c devices?

lusty forge
stark kindle
cerulean niche
#

Hello guys! I’ve successfully built a circuit based on ItsyBitsy chip that receives MIDI signal from computer and controls a solenoid with it. I use Arduino IDE, not CircuitPython. Now I’d like to upgrade the whole thing to be velocity sensitive by swapping digitalWrite() to analogWrite(). So I have couple questions:

  1. How to refer to a proper analog ItsyBitsy pin when assigning it in a sketch via pinMode()? According to ItsyBitsy manual I see that, for example, A4 can work as analog PWM out. Then will the code be like this?

pinMode(A4, OUTPUT);

  1. After successfully assigning the analog pin, should I just replace digitalWrite() with a line like:

analogWrite(A4, MIDIvelocity*2)

I believe my main doubt is about referring the pin as A4 in the code.

north stream
#

Generally the analog pins have two names, one integer (generally a fairly high number like 31), and the A ones like you mention. They both work (if you dig into the board files, you'll generally find something like #define A4 36 somewhere)

leaden walrus
icy nimbus
brisk chasm
icy nimbus
#

Basically takes a bunch of readings and averages it to eliminate the noise in the signal. The key is to balance the filter with the signal response you need. Too much, and the readout will be laggy. Too little, you get noise in the signal, like you see now. Lots of examples if you search.

icy nimbus
# icy nimbus Basically takes a bunch of readings and averages it to eliminate the noise in th...
icy nimbus
north stream
#

Averaging basically is one kind of LPF

lethal yarrow
#

Moving average is a special case of FIR (finite impulse response) filter. They are very efficient to implement, and often have acceptable time and frequency response.

surreal quarry
#

I am working on an Arduino project with an Adafruit ESP32 Feather V2. I am trying to implement a function to check whether or not USB power is present, and tell when the unit switches over to battery backup. I am looking through the adafruit learn page and looking around the pinout and power management, and cant find any alternate pin names for the USB/VBUS pin as the Arduino IDE does not recognize either of those names. Does anyone have any input?

north stream
#

Those are circuit nodes, not directly connected to any ESP32 pins (they'd damage it, as it's a 3.3V device). There is a voltage divider connected to VBAT that goes to A13. There is one divider generating a signal called VBUS_DET, but it appears to only go to the CP2102 chip. I don't see any connections for detecting VBUS voltage or charger status.

surreal quarry
#

I see

north stream
#

You could, of course, make your own voltage divider from VBUS and connect it to a pin to monitor it.

surreal quarry
#

I was already messing around with A13 for battery voltage calculating and in reading the learn page USB - This is the positive voltage to/from the USB-C connector if connected. sounded promising

north stream
#

Right, VBUS is the voltage from the USB connector

#

It would not be safe to connect it directly to an ESP input, but via a voltage divider would be fine. It wouldn't even need to be an analog pin, if you just wanted to check for the presence of voltage.

surreal quarry
#

I see, thanks for the help!

jaunty terrace
#

Hi I've got an Arduino Mega and Adafruit 32u4 Feather connected to my computer, but only the COM3 port connected to my Mega is showing up. What should I do? I am trying to use the Arduino IDE.

#

and this is my device manager

dusk orchid
# jaunty terrace and this is my device manager

Hey @jaunty terrace that's not device manager. If you try the windows key + X combination, or right click on the start menu icon, then goto device manager. You should also be able to search the start menu or use the Run box and enter devmgmt.msc which will load the device manager. Should look like this:

jaunty terrace
#

here you go

dusk orchid
# jaunty terrace

good work, thanks, so it looks like there's one device that's unhappy, and it says the request for the device descriptor failed, that's probably the not working one. Try swapping the cable it's using first and see if it reappears as a com-port (use the cable that works for com3).
Also which version of windows are you using, as the driver for the board you mentioned is included with Windows 10 and above.

jaunty terrace
#

windows 10

jaunty terrace
dusk orchid
#

Cool, was just suggesting that the one for the uno which works may eliminate the cable as a possibility. What does the device show up as now in device manager, same unknown with exact same message in brackets?

dusk orchid
# jaunty terrace ive swapped w cables im sure are data cables

You could also follow the pre-requisite steps of setting up the arduino IDE, with the adafruit board support package (BSP) here: https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/setup. Then just read the next using arduino page (for later reference), and finally follow this step for "Ack! I 'did something' and now...it doesnt show up as a device anymore" https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/feather-help#faq-2704880

jaunty terrace
#

its had the same error message

dusk orchid
#

Right at the end of that FAQ link I sent last, is another bit that basically describes what you've got, but same advice, double tap reset just as you upload (blink example exactly setup as on Using with Arduino IDE page)

dusk orchid
# jaunty terrace its had the same error message

I suggest reading through the whole of that learn guide, you'll pickup things that may be essential down the road, or at least the 4 pages: arduino ide setup + using with arduino ide + device recovery + feather help

jaunty terrace
#

okay thank you so much!

twilit nexus
#

Hey, I am trying to run this: https://github.com/adafruit/RGB-matrix-Panel/blob/master/examples/colorwheel_32x32/colorwheel_32x32.ino sample code for the rgbmatrix library and I keep getting this error that I cannot really decipher: /Users/tamerln/Desktop/arduino/libraries/RGB-matrix-Panel-master/RGBmatrixPanel.cpp: In function 'void IRQ_HANDLER(void*)': /Users/tamerln/Desktop/arduino/libraries/RGB-matrix-Panel-master/RGBmatrixPanel.cpp:758:28: error: 'volatile union timg_int_clr_timers_reg_t' has no member named 't0' TIMERG1.int_clr_timers.t0 = 1;

#

I am using a matrix portal s3 esp32 board, thinking I might have the pins wrong?

stable forge
twilit nexus
#

Yep! The example code from that library compiles. Thank you!

#

Any ideas on why my esp32 will occasionally crash running circuitpython and be completely blank when I boot it back up? The only way I have found to fix it is to flash it and reinstall circuitpython + all of the libraries

stable forge
twilit nexus
#

I am powering it from the board yes

#

and yes it is that board

stable forge
#

and are you using a laptop?

twilit nexus
#

right

stable forge
#

laptops often have lower current capacity on their USB ports. Consider powering the panel from a separate 5v supply. Do tie the grounds together. I think there is discussion about powering panels in the panel guide, if not in the Matrix Portal guide

#

if the power sags, it can pull the voltage low enough that the flash chip might not function though the microcontroller is. This can cause corruption when something is writing to the flash chip

hallow raft
#

Hello, I have an ESP32-S3 Feather/no SPRAM, and now that I come to think about it, it has 8MB of Flash, but Arduino IDE says: Sketch uses... of program storage space. Maximum is 2097152 bytes. Shouldn't it have 8Mb there?

#

I guess this is relevant

stable forge
#
  • space for UF2 bootloader
hallow raft
#

Do people often write files when they use the Arduino platform?

stable forge
#

if you look at non-Adafruit boards, do they provide SPIFFS in general? the UF2 is our own thing

hallow raft
#

Randomly picked Olimex ESP32-S3. They have some variety

#

Yeah, sampling a few, most seem to have some SPIFFs. I guess what happens is that they don't ever run out of app space, so they're like "ok - let's put some SPIFFS even if most people won't use them". In the menu above the "Minimal SPIFFS" is 190kb. So maybe there are libraries that use that under the hood? Who knows.

round goblet
#

Guys... I come to you in desperation. I cannot upload ardiuno code to my CPX board.

"Failed to upgrade target. Error is: No data received on serial port. Not able to proceed."

When I plug in the board, I see the serial port (/dev/cu.usbmodem1101 Serial Port (USB)) activated. But the arduino IDE will not upload code to it.

Screen shot from board info gives me the attached, so I assume the arduino IDE can see it.

This is the information I am seeing in INFO_UF2.TXT on the CPLAYBOOT drive.
UF2 Bootloader v2.0.0-adafruit.7 SFHWRO
Model: CPlay Express
Board-ID: SAMD21G18A-CPlay-v0

I am on a Mac and using the Arduino IDE (version 2.3.1)

What on earth is wrong? Any tips that would help me get this to work would be enormously appreciated.

round goblet
round goblet
#

Hello... looking for a bit of advice. I have a circuit playground bluefruit and running the following code:

#include <Adafruit_CircuitPlayground.h>

void setup() {
CircuitPlayground.begin();
CircuitPlayground.setPixelColor(0, 0, 255, 0);
CircuitPlayground.setPixelColor(1, 0, 255, 0);
CircuitPlayground.setPixelColor(2, 0, 255, 0);
CircuitPlayground.setPixelColor(3, 0, 255, 0);
CircuitPlayground.setPixelColor(4, 0, 255, 0);
CircuitPlayground.setPixelColor(5, 0, 255, 0);
CircuitPlayground.setPixelColor(6, 0, 255, 0);
CircuitPlayground.setPixelColor(7, 0, 255, 0);
CircuitPlayground.setPixelColor(8, 0, 255, 0);
CircuitPlayground.setPixelColor(9, 0, 255, 0);
}

The code uploads but only the first four LEDs are lit. I've run the code on a circuit playground express and all LEDs are lit.

Do I have a faulty board or is there something else I should be checking?

round goblet
#

Guys.. I've been uploading code to the bluefruit without issue, then out of nowhere if fails to upload.

I notice I receive an error saying the disk not ejected properly and even though the Arduino IDE says Activating new firmware & Device programmed. I receive a port monitor error message and the USB serial port I was using disappears from the IDE.

Tried rebooting the mac, resetting the board brings back the serial port and the process repeats. Just wish I could get this to work consistently.

This is quite frustrating. Does anyone know why this is happening?

Any advice appreciated.

north stream
#

I think it's resetting, which causes the USB to re-enumerate. The serial port should reappear in a couple of seconds

round goblet
#

I have the double press the reset button to get the port to reappear. Then it resets itself as the code is uploading.

north stream
#

I think the reset is part of the code upload process

surreal quarry
#

@north stream thanks for the idea for the voltage divider, wasn’t that hard to figure out lol

round goblet
north stream
#

What ports show up in the pulldown?

round goblet
#

It is that port that disappears when I try to upload the code.

north stream
#

Presumably it reappears in a few seconds?

round goblet
#

... and now its not working again..

#

sometimes it works, sometimes it doesn't.

#

Just doesn't seem to be any ryme or reason to it.

fickle orchid
#

so my board suddenly stopped working, checking the device manager gave me this

#

suggestions? i heard putting into bootloader mode helps, but the problem is that i dont know how to do that with the metro 328

leaden walrus
#

if the COM port is not showing up, that'd be more an issue with the CP2104 - maybe a driver issue?

#

the metro 328 uses a CP2104 as the USB-to-serial bridge between the host PC and the 328 itself

lofty nimbus
#

Hi! I'm trying to make a MintySynth.com using an arduino nano. I have burned 3 of the 4 nanos that I have. I was wondering if someone could offer some guidence so I don't destroy my last nano.

#

Right now, 'm trying to figure out if the issue is that I'm powering off of USB instead of batteries as in the mintysynth project

lofty nimbus
#

I am making progress! Fingers crossed that I can get the 3.5mm audio out connected without any smoke. 🙂

inland gorge
# lofty nimbus Hi! I'm trying to make a MintySynth.com using an arduino nano. I have burned 3 o...

If you're putting your circuit in a metal tin without insulation, that will definitely destroy it. If that's not it, be careful how you translate the MintySynth schematic. It's running off 3.3V but a regular Nano runs off 5V (assuming you're using a regular Nano). This means when translating the schematic to Nano, you should think of any place it says "3.3V" to run that to "5V" pin instead, and do not wire anything to the "3.3V" pin. This will make all the pots work as expected. But this introduces a problem because MintySynth expects the two batteries to put out out 3V and now you need 5V. So you will need 3 batteries if you want it battery-powered. And make sure to never have both the batteries inserted and USB plugged in at the same time, since there's nothing to prevent the USB from trying to backfeed the batteries, which could cause them to catch fire.

cold glacier
#

Hi there! I am having problem when uploading a sketch to Adafruit Feather M0 with RFM95:

Here's the logs:

`Performing 1200-bps touch reset on serial port /dev/cu.usbmodem31301
Waiting for upload port...
Upload port found on /dev/tty.usbmodem31301
"/Users/xxxxx/Library/Arduino15/packages/adafruit/tools/bossac/1.8.0-48-gb176eee/bossac" -i -d --port=tty.usbmodem31301 -U -i --offset=0x2000 -w -v "/private/var/folders/yx/b0c4h34d73qdtqf0pff3_7580000gn/T/arduino/sketches/C598BC08DD27D1A1174B37F43836F1DD/Blink.ino.bin" -R

SAM-BA operation failed`

Can anyone help me?

north stream
stable forge
#

also make sure that's the right port

cold glacier
cold glacier
#

Although when I try to quickly press the reset button on the device, then select the right usb port, it is stuck on uploading for a long time and nothing happens, it doesn’t end

stable forge
#

COMx is windows, but the example above is macOS. I'm confused

#

I often check the port in the Arduino menu before uploading

#

did you install the UF2 bootloader on this board? If so you can double-click to get it into the bootloader

turbid mesa
#

Interesting this is going on. I’m having a heck of a time getting my uf2 installation to take on a feather tft unit. I was able to install the correct bootloader and can open the folder with FTHRS2BOOT but I’m unable to drag the feather tft file over. Any tips or help would be appreciated.

#

Following along in the guide to factory reset

safe shell
#

@turbid mesa can you be specific about which Feather S2 board and exactly which UF2 file?

turbid mesa
#

I’m working with the ESP32-S2 feather tft

#

And the uf2 I’m trying to drag and drop feather_esp32s2_reversetft_factory_reset.

#

I followed the guide on reinstalling the boot loader and I’m able to enter boot loader mode. However when I go to drag and drop the uf2 file it shuts off and reboots.

#

I’m wondering if maybe I have the wrong page or something? Or have installed the wrong bin file? When I view the UF2 file in notepad I get the right board id and model. With a tiny UF2 bootloader 0.10.2 -tinyusb

#

When I use the stock arduino ide it doesn’t even show up in the ports at all. So even if I’m missing a stepwise I don’t see it.

#

Well apparently stepwise I was missing that you have to put the board into bootloader mode to even see it on the com port

#

My apologies

safe shell
#

no worries, glad you got it working

cold glacier
# stable forge COMx is windows, but the example above is macOS. I'm confused

Sorry about that, been trying it in Windows as well.

But we can focus on the macOS.

SAM-BA operation failed Set binary mode version()=10 Connected at 921600 baud Failed uploading: uploading error: exit status 1

I just purchased this board and I couldn't install anything since upload does not work. Although when I try to double click, it goes from QUICK RED BLINKING to SLOW RED BLINKING.

stable forge
cold glacier
#

In Finder, there is no disk or boot drive showing

#

Port is /dev/cu.usbmodem31101 Serial Port (USB)

stable forge
#

testing locally...

#

what version of Arduino IDE are you using?

cold glacier
#

2.3.1

stable forge
#

ok, I don't have a Feather RFM but I have a Feather M0 Basic -- it uses the same bootloader

#

to be more precise, when you double-click, does a BOOT drive appear?

cold glacier
#

I double clicked it now, and no boot drive appears on Finder

stable forge
#

ok, I double-clicked to get the slower pulsing on the LED. I chose Examples->Basic->Blink. I see this:

#

the port I want is chosen. I do upload (right arrow), and it compiles and uploads.

#

Is the board you chose the Feather M0 RFM and is the port that is checked the /dev/cu.usbmodem* one?

#

i am running 2.3.2 but should be the same

cold glacier
#

This is mine although it doesn't show the (Adafruit Feather M0 SAMD21)

stable forge
#

that is slightly interesting but not sure it matters

#

so when you press right-arrow to upload, you get the SAM-BA error?

cold glacier
#

Yes, correct

stable forge
#

what version of macOS, and what kind of mac?

cold glacier
#

Apple M1 Pro, Sonoma 14.1.2

stable forge
#

I am on 14.4 beta something and M1 Mac mini

#

did you reinstall Arduino IDE recently? I would say try that. What other boards do you have to try?

cold glacier
#

The Arduino IDE is just a fresh install yesterday. I can try to reinstall. And I have no other boards

#

I did try the platformIO with visual studio code

#

and I couldn't upload as well

stable forge
#

and on windows you get the same SAM-BA error?

cold glacier
#

Yes, correct.

stable forge
#

are you using the same USB cable on both?

#

are you using a USB hub?

#

or direct connect to computer port?

cold glacier
#

I'm using a thunderbolt hub, with 3.0 usb

stable forge
#

how about on Windows

cold glacier
#

usb 3.2

stable forge
#

is that a different machine, or Parallels?

cold glacier
#

Different machine

stable forge
#

and different cable, or same cable?

cold glacier
#

I tried the two different cables

#

and the same result

#

They both can transfer data

stable forge
#

and you don't have a regular Arduino board?

#

UNO

cold glacier
#

No, only this one

stable forge
#

could you take clear bright closeup pictures of both sides of the board?

cold glacier
stable forge
#

you want to choose the Adafruit AVR package and choose the Feather 32u4 board

cold glacier
#

Ohhh, let me try this one

#

It's working now! I feel like an idiot not knowing the board I bought. But thank you so much @stable forge! Really appreciate your time and help

stable forge
#

no problem, that's what we're here for. You're absolutely not the first person to have this problem.

#

that is why we always ask for pictures if we get stuck

#

you are very welcome

normal goblet
#

Hello!

I'm making a datalogger, and experience troubles when combining all parts/modules together. Separately each module works just fine. I suspect this may have to do with the fact that I'm using a mixture of SPI and I2C.

Modules

  • Arduino Uno R3 (to be replaced with R4 for connectivity later)
  • SPI: SD card R/W, 4x Adafruit MAX31855 for thermocouple readout (soft SPI)
  • I2C: RTC ds3231, BME280 temperature, pressure, humidity sensor (not Adafruit, but works with Adafruit library)
  • Analog: LDR, passive buzzer
  • Digital: 3x LED, push button (digital IO, start/stop data capture)

Alternatively I have a Velleman VMA202 data logging shield with incorporated ds1307 RTC and SD module. This yields the same issue.

The problem: when I add the BME280 to the circuit, serial communication and/or logging to SD freezes. SD card is no longer recognized by Arduino. Since I am no expert, suggestions are welcome on how to tackle this issue.

Thank you!

leaden walrus
normal goblet
#

@leaden walrus Thanks for your reply. I have attached schematic of the connections below (LDR omitted). Code will follow.

leaden walrus
normal goblet
leaden walrus
#

this is the BME280?

normal goblet
#

Yes

leaden walrus
#

if you remove that from the PCB, the SD card starts working? no other changes?

normal goblet
#

Correct

leaden walrus
#

what's the code being run?

normal goblet
#

Preparing pastebin, just a sec

#

I have removed the actual SD writing from here, because the error also occurs in this state. If I comment out the BME280 code, all works fine.

leaden walrus
#

what's the actual serial output from the two cases? with BME280 attached and then removed.

normal goblet
#

with BME280

#

without BME280, data occurs after I pressed button

#

wait, what happened with RTC :/

leaden walrus
normal goblet
#

Yes I did, I will verify again just to be sure

#

Scanning...
I2C device found at address 0x68 ! <-- RTC
I2C device found at address 0x76 ! <-- BME280
Done!

#

(if I remove BME280 from breadboard, only 0x68 is reported)

leaden walrus
#

the BME failing to init is preventing the rest of the code from running. see the infinite loop at line 160 in your pastebin.

normal goblet
#

Yes, I noticed. I do not see how it can be that the BME works on its own, but not combined with the other modules. Is this solely due to the chip ID check you mentioned?

leaden walrus
normal goblet
#

BME280 test
-- Default Test --

Temperature = 16.82 °C
Pressure = 1005.00 hPa
Approx. Altitude = 68.88 m
Humidity = 60.87 %

leaden walrus
#

hmmm....yah...that's weird.

normal goblet
#

Yeah, hence my confusion. I was thinking perhaps the timing of SPI and I2C are interfering? Kinda clueless

leaden walrus
#

try moving the BME280 init code to be above the RTC init code, so BME280 inits first

normal goblet
#

No luck

BOOTING ...

Testing BME280 module
OTING ...
Testing BME280 module
0�x
ID of 0xFF probably means a bad address, a BMP 180 or BMP 085
ID of 0x56-0x58 represents a BMP 280,
ID of 0x60 represents a BME 280.
ID of 0x61 represents a BME 680.

#

It's providing the error and is stuck in the loop again

leaden walrus
#

make it very first thing in setup() after the serial prints

#
void setup() {
  Serial.begin(9600);
  Serial.println("BOOTING ...");
  Serial.println("> Testing BME280 module");
  unsigned BME_status = bme.begin(0x76);
  if (!BME_status)
  {
    Serial.println("Could not find a valid BME280 sensor, check wiring, address, sensor ID!");
    Serial.print("SensorID was: 0x"); Serial.println(bme.sensorID(),16);
    Serial.print("        ID of 0xFF probably means a bad address, a BMP 180 or BMP 085\n");
    Serial.print("   ID of 0x56-0x58 represents a BMP 280,\n");
    Serial.print("        ID of 0x60 represents a BME 280.\n");
    Serial.print("        ID of 0x61 represents a BME 680.\n");
    while (1) delay(10);
  }
normal goblet
#

BOOTING ...

Testing RTC module ...
RTC failed
Testing BME280 module
Testing BME280 module
Testing BME280 module
0�x
ID of 0xFF probably means a bad address, a BMP 180 or BMP 085
ID of 0x56-0x58 represents a BMP 280,
ID of 0x60 represents a BME 280.

#

Rebooting itself multiple times, and then freezing

#

also skipping the first print statement

leaden walrus
#

it's printing RTC module before BME280?

#

not sure how that's even possible

#

make sure code is updated as suggested above

normal goblet
#

double checking

#

BOOTING ...

Testing BME280 module
Testing RTC module ...
Testing SD module ...
� LOGGER36.CSV
Testing MAX31855 modules (thermocouples) ...
BOOT SUCCESFUL
Logging DATA at time 1000
RTC:
LDR: 582.00D�BOOTING ...
Testing BME280 module
Testing RTC module ...
Testing SD module ...
writing to file LOGGER37.CSV
Testing MAX31855 modules (thermocouples) ...
BOOT SUCCESFUL
L�

#

Theres something going on with internal commincation it seems, because I did not press the button and yet it prints to start logging

leaden walrus
#

ok. it's working now. it's (most likely) something to do with the RTC library and how it is managing the I2C bus - which is poorly.

#

it might work to just have the init order be BME280 first and then RTC?

#

and you could then remove the call to Wire.begin() since the BME280 library will have already done that

normal goblet
#

now the RTC fails to initialize

leaden walrus
#

it worked above?

normal goblet
#

Yes

leaden walrus
#

it's not working if you remove Wire.begin()?

normal goblet
#

No, then the RTC just fails

leaden walrus
#

weird. leave it in then i guess.

normal goblet
#

If I put Wire.begin() just above rtc.begin(), then I get

BOOTING ...

Testing BME280 module
Testing RTC module ...
Testing SD module ...
writing to file LOGGER40.CSV
Testing MAX31855 modules (thermocouples) ...
BO LOGGER40.CSV
so it freezes again

#

In any case it is weird to have twice the Wire.begin() right? Once in the BME280 init, and once explicitly in my code itself

#

Ofcourse, alternatively I can get a SPI-capable BME280 breakout (e.g. ADA2652), but yeah...

leaden walrus
#

it's unclear where it's freezing in the output above

#

it's at least failing differently, since the BME and RTC are initing OK

normal goblet
#

LDR: 288.00C�BOOTING ...

Testing BME280 module
Testing RTC module ...
Testing SD module ...
writing to file LOGGER46.CSV
Testing MAX31855 modules (thermocouples) ...
BOOT SUCCESFUL
Logging DATA at time 1000
RTC:
LDR: 286.00C�BOOTING ...
Testing BME280 module
Testing RTC module ...
Testing SD module ...
writing to file LOGGER47.CSV
Testing MAX31855 modules (thermocouples) ...
BOOT SUCCESFUL
Logging DATA at time 1000
RTC:
LDR: 295.00C�-BOOTING ...
Testing BME280 module
OTING ...
Testing BME280 module
0�x
ID of 0xFF probably means a bad address, a BMP 180 or BMP 085
ID of 0x56-0x58 represents a BMP 280,
ID of 0x60 represents a BME 280.
ID of 0x61 represents a BME 680.

#

How do I even begin here? It just runs through the setup once, and then goes into error mode

#

reboot, repeat, endlessly (until I stop it)

leaden walrus
#

are you pressing reset? or are those reboots happening on their own?

normal goblet
#

on their own

leaden walrus
#

possibly a memory issue? too many things for the UNO

normal goblet
#

How would I verify this?

leaden walrus
#

there's a message about code size that gets printed at the end of compilation, can check that. but easiest is to try a more modern board with more ram

normal goblet
#

It says 87% program storage space, global variables use 82%

#

so yes, a lot, but not 90+

#

given the provided code, any suggestions how to reduce this?

#

Just checked, removing BME reduces these numbers to 71% and 69%, respectively

leaden walrus
#

code generally seems fine

normal goblet
#

@leaden walrus So in conclusion: code in principle is fine now, but can cause memory issues (e.g. when SD writing is added), thus you advise to use a different board. One in particular (R.Pi) ?

leaden walrus
#

memory and library conflict issue

#

fix library issue by simply adjusting code so BME inits before RTC (that's a hack, not a fix)

#

fix memory issue by upgrading arduino board (but just guessing about memory issue)

normal goblet
leaden walrus
#

moving to a RPI would require a lot of changes, since that's not an arduino board...so not recommended

#

the I2C issue is general to the RTC library, it'd probably behave the same with any RTC

#

Arduino Uno R3 (to be replaced with R4 for connectivity later)

#

the R4 already on the way?

normal goblet
#

Yes I have it

leaden walrus
#

try the r4

normal goblet
#

Will do (later tonight). Thanks for your help. Highly appreciated.

normal goblet
#

Memory issues resolved. Conflicts in libraries... not so much. Looking for other pressure sensor to see if that resolves the issue.

tired cypress
#

i have a raspberry pi pico w and i tried building a circuit and believe i short circuited ( sparks and very hot after) it and now it wont connet
do i need to buy a new one im assuming so but like is it fixable?

native dagger
#

Are there any guides for writing no blocking code to use blocking libraries? I'm using laurb9's stepperdriver library, and I have a t slot sensor I'm using to find 0. Right now I'm trying to find a way to write code that will home to zero. Here's what I have atm.

#include "BasicStepperDriver.h"

// Motor steps per revolution. Most steppers are 200 steps or 1.8 degrees/step
#define MOTOR_STEPS 200
#define RPM 60
#define RATIO 5 //Gear ratio of gear box
// Since microstepping is set externally, make sure this matches the selected mode
// If it doesn't, the motor will move at a different RPM than chosen
// 1=full step, 2=half step etc.
#define MICROSTEPS 1

// All the wires needed for full functionality
#define DIR 9
#define STEP 0
#define ENABLE 8
#define INTERRUPT 5 // line for enable/disable


BasicStepperDriver stepper(MOTOR_STEPS, DIR, STEP,ENABLE);
volatile bool trigger = false;


void setup() {
  Serial.begin(115200);
  stepper.begin(RPM, MICROSTEPS);
  stepper.setEnableActiveState(HIGH);
  attachInterrupt(digitalPinToInterrupt(INTERRUPT), routine, FALLING);
  stepper.setRPM(60);
  homeToZero();
}

void loop() {
  
    // energize coils - the motor will hold position
    // stepper.enable();
  
    /*
     * Moving motor one full revolution using the degree notation
     */
  // Serial.println("RUNNING");
  // stepper.rotate(360*RATIO);

    /*
     * Moving motor to original position using steps
     */
//stepper.move(-MOTOR_STEPS*MICROSTEPS*RATIO);

    // pause and allow the motor to be moved by hand
    // stepper.disable();
    
}

void homeToZero(void)
{
  stepper.move(380*RATIO); //gear ratio times more than one circle of degrees.
  while (not trigger)
  {
  ;
  }
  stepper.stop();
}

void routine(void)
{
  trigger = true;
}
#

obv this is not working, what's a good methodology for making homeToZero() non blocking?

near ore
#

hello, I am stuck on something. Any help would be much appreciated. I have a Adafruit TFT FeatherWing - 3.5" https://www.adafruit.com/product/5872 and a FeatherS3 ESP32-S3 https://www.adafruit.com/product/5748 and I am attempting to run the graphicstest_featherwing.ino but I am only getting a white screen. I think it may be due to the TFT_CS and TFT_DC defines, but I'm not sure where to find the right pin/number for these for my board, what are these defines and how can I find the pins?

near ore
#

ok after some more research, I found out the pins by looking at some code for the FeatherS3 in a github issue. But I'd like to learn how to find out this kinda info for myself, if anyone can point me in the right direction

eternal cloud
normal goblet
# leaden walrus try the r4

Fixed: have now adapted the BME breakout to communicate via SPI. The increase in memory usage, is also fixed by switching to R4. Thanks again adafruit 🥳

dapper grove
#

Hi I'm looking for some help with a project I'm working on using an Uno R3, rotary encoder and ssd1306 oled. I've cobbled together some code, from several sources, to test the hardware functionality, which works, but not reliably as I need to implement debouncing in the code. As I'm a complete novice I'm a bit lost on how to add the required code to add a delay to the interrupt. Any help much appreciated. https://pastebin.com/edit/YM3sayfL

magic idol
#

hey there

#

i was wondering if someone had the error of "core dump" before on ESP32

inland gorge
north stream
#

One of the features of Objective-C is it doesn't have null pointer errors in general.

fair tusk
leaden walrus
#

i think only limited by storage on the audio fx board itself

surreal quarry
#

Hello all, I am using a couple Adafruit ESP32 Feather V2's each with 2 Adafruit MAX31856 Thermocouple Amplifiers. each unit is inside a high-voltage control panel. I am having an issue reading temperatures from K-Type thermocouple wires that are piggy-backing off of a temperature-controller unit. Specifically, the MAX's are returning the fault TCRANGE. I tested these same units, protoboards, and MAX's with short K-Type thermocouples and everything worked. I took the temperature-controller unit out of the equation, plugging the thermocouples directly into the MAX's and still received the TCRANGE fault. I know that these units are working on short range K-Type thermocouples, and was racking my brain for several hours yesterday trying to figure it out. I can include other information as necessary and will upload some pictures for more context. Does anyone have some insight into this kind of issue? or any ideas that might kickstart some ideas for me? lol any help is much appreciated

#

This is the short thermocouple I am talking about that worked previously when testing at my desk. Red(+) Blue(-)

#

This is the type of thermocouple wire I am using in the described situation; Yellow(+) Red(-)

#

Both of these are successfully reading on a test unit at my desk

surreal quarry
#

I think the issue might be between chair and keyboard

#

I just plugged the described situation into my test board and was able to read, so there is a chance of some shoddy soldering/wiring in my protoboard

magic idol
inland gorge
# magic idol Im using code that comes with the esp32 library

could you provide a link? and a link to the exact board you're using? And a description of exactly which arduino core you're using and what board you have it set to? If you have the wrong board set or the wrong Arduino core, you can get core dumps too

magic idol
#

im using the same model as this

#

im set the board to esp32 dev board

#

cause im not sure what to set it too lmo

#

im not sure what you mean by arduino core tho sorry

#

did the same with esp32 cam, set it to esp32 dev board

inland gorge
magic idol
#

Should've been set to "Esp32-wroom DA". The reason i didnt set it to this was because i thought "DA" meant another model

#

Thank you for the help

inland gorge
# magic idol Thank you for the help

woohoo! 🎉 I was hoping it was something as simple as that. There's so many versions of things that it's useful to go through an check the version for every little thing

magic idol
inland gorge
magic idol
#

alright then, thanks again

twilit nexus
#

Hey, was wondering if anyone could help me with some arduino code that is not behaving as expected. I am using an 8x8 matrix and I've double checked that everything is hooked up correctly and have run example code that produces the expected output. Basically, I am trying to loop through a 2d array of bitmaps and print them to the display, but that is not happening and honestly I can't really make sense of it's behavior rn . Here is my current code: `#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Max72xxPanel.h>

int pinCS = 10;
// Din connects to pin 11
// CLK connects to pin 13

int numberOfHorizontalDisplays = 1;
int numberOfVerticalDisplays = 1;

Max72xxPanel matrix = Max72xxPanel(pinCS, numberOfHorizontalDisplays, numberOfVerticalDisplays);

const unsigned char animation[][8] = {
{
B11101111,
B11101111,
B11100111,
B11111111,
B11111111,
B11111111,
B11111111,
B11111111
},
{
B11111111,
B11101111,
B11101111,
B11100111,
B11111111,
B11111111,
B11111111,
B11111111
}
};

// Calculate total number of frames

void setup() {
matrix.setIntensity(10);
}

void loop() {
for (int i = 0; i < sizeof(animation); i++) {
matrix.drawBitmap(0, 0, animation[i], 8, 8, HIGH);
matrix.write();
delay(500); // Adjust the delay as needed to control the animation speed
}
}`

#

got it working a lot closer to the expected behavior by adding PROGMEM keyword before 2d array declaration, but it seems like with each call of drawBitmap, the pixels that were on in the previous iteration stay on

eternal cloud
twilit nexus
#

that doesn't quite solve my issue, does make the matrix behave very strangely though. basically, matrix.drawBitmap(0, 0, animation[0], 8, 8, HIGH); matrix.write(); delay(200); works as expected

#

and so does drawing the bitmap of animation[1]

#

but when i draw the first bitmap AND THEN draw the second bitmap, the corresponding matrix LEDs that should be off stay on. But, the LEDs that should light up when changing to the next bitmap DO light up

#

got it working without the for loop `void loop() {
matrix.drawBitmap(0, 0, animation[0], 8, 8, HIGH);
matrix.write();
delay(200);
matrix.fillScreen(LOW);
matrix.drawBitmap(0, 0, animation[1], 8, 8, HIGH);
matrix.write();
delay(200);
matrix.fillScreen(LOW);

}`

opaque glen
#

Is it possible to get a SDU bootloader for the QT Py SAMD21? If yes, how can I do it?

tender wasp
#

I think I need to toss every indie microcontroller more than about 8 years old; not worth the headaches of outdated, discontinued arduino platform implementations or dead cloud integrations. need to stick to teensys and feathers.

north stream
#

I have a bunch of early rev Artemis boards, I tried a bunch of different revisions of the software, but nothing will talk to them. I should just pitch 'em.

tender wasp
#

galago, digispark pro, digistump oak, particle photon, metawear... mostly a graveyard.

surreal quarry
# surreal quarry I think the issue might be between chair and keyboard

Thankfully, I have found that the issue does not lie between chair and keyboard! the control panels that these units are going into have major noise in the ground plane. I am using RP-SMA to w.FL adapters to use 2.4GHz Dipoles for the units to get wifi. We drilled a hole in the side of the control panel and secured the adapter through it and it seems that in doing that and making contact with the control panel enclosure introduced ground noise coming from the grounded panel.

tender sinew
#

My code might look very dumb, but I am trying to make my LED fade in and fade out whenever the optic sensor switch turns on.

#

Does this make sense?

#

Would it work? or is there a better way?

#

Can anyone give me feedback on this or help me out wriitng this code? Thank you

#

I am also thinking of using bunch of sensors and LEDs in pair so maybe I should consider using array or sth

#

Idk.

surreal quarry
#

There is for sure a simpler way to do it. but to make your current code work the way you want you would need to call digitalWrite(led01, brightness_led01); on each iteration of each for loop

surreal quarry
tender sinew
tender sinew
#

Thank you again! @surreal quarry

surreal quarry
#

of course!

tender sinew
#

Is there a way that I can fade in and out multiple white LEDs with a single PWM~ output from Arduino Uno?

north stream