#help-with-arduino
1 messages · Page 14 of 1
it's always reading the same value, no matter if i'm touching the screen or not
could you upoad your whole sketch? Use the + on the left
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
How about just printing the original p.x, .y and .z values. comment out lines 61 and 62. Probably won't help. Double-check the wiring: that you are using the correct Ax pins and that you are using 6 and 7 and not A6 and A7
it's all good about the wiring
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
i tried many other pin configuration always with the same problem, i also tried with another giga r1
also put a multimeter on A0 or A1 and see what it reads as you move your finger
the value of X & Y stay the same if disconnect A0 & A1 or 6 & 7...
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?
analogReadResolution(10);
but i can't read the value from my touch screen
ah ok
in your test program, remove the ILI setup completely. It is not necessary for the TouchScreen to work, I believe
no, i just bought 2 giga... and 10 mega 2560
do you have any other 3.3V boards? You could test the touchscreen with some other non-Giga board
i don't have any other board
could you show a clear picture of your wiring? Or is it all pre-made harnesses?
i could send you a photo but it's not going to be clear i think
i don't have a GIga to test, only other 3.3V boards
i also found somethiing interesting here : https://github.com/stevstrong/TouchScreen_STM32
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
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
Hello @stable forge, here some top view photos
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!
Those built-in antennæ aren't high performance to start with. I'd guess the pushing the margins would just affect the pattern somewhat, so it's less sensitive in certain directions. There also might be some impedance effects, but I doubt they'd be significant enough to stress the transmitter.
It looks like A0 is going through a potentiometer?
btw, I meant A0 and A1, not A6 and A7
did you test with a potentiometer on A0 and A1?
yes, it's just for a test
too see if i can read anything on the ADC and it's ok with that
yes i made test with potentiometer on A0 & A1 and the results are still the same
that's what I meant, is that what you did?
ok, got it, so it reads 0-1023 that way?
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
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?
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
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?
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...
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
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
i am looking to see which displays I do have on hand...
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.
I think there may be something peculiar about th board definition as supplied by Arduino that is incompatible with the library. I am looking at the code now.
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?
yes it's correct
fixed by https://github.com/arduino/ArduinoCore-mbed/pull/784 . This was only fixed a month ago
I'm not sure this is the problem though
Yes, the maximum value is 1023
it is for higher-numbered analog pions
release 4.0.10, the latest release, is before this bugfix
did you comment out the ILIxxxx initialization in you test program during these tests? I want to test just the resistive touch stuff
were you running an earlier version?
yes, but i don't know wich one
ok, that is is a different problem :/
yes... too much problem for the same card
do you have any other displays with resistive touch overlays?
and you are testing with nothing connected but the X_ X- Y+ Y- pins?
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
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?
this is you, right? https://github.com/adafruit/Adafruit_TouchScreen/issues/45
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?
Yes it's me on github.
I already tried to push on the same position and the problem is still here
What do you think about modifying the library as I suggested above? Do you mean you tried that already?
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)
Thanks for your insights! It clearified things.
ok, so i just tried to uncomment the checking code on line 112-113 and 148-149. No change.
after that i tried to increase the numbers of sample, i tried 4, 20, 10... no change at all
do you mean comment out?
what is your timeline on this? I could order some parts for testing, but they would arrive next week.
Yes excuse me
in this order... first L112-113 and then L148-149. always the same results
could you answer my timeline question? Thanks. Trying to figure out how/if to proceed
I'm not sure to understand the question... i don't have a specific timeline... I do it on my free timework
ok, so this is not for your work, with some deadline?
So you can wait while I get some test parts
alright, I ordered some parts and will get back to you when I can set up to replicate the problem
Thank you
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
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.
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.
hi guys, is there something about on an uno. if i have digi 4-13 connected
why sda/scl wont work?
What do you have attached to them?
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);
to in/pwm pins on a motor controller
sda/scl are attached to icm20
and it wont connect
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
The most common reason I see for I2C not working is missing pull-up resistors.
You may need to configure the port the board appears on in the Tools menu. Note that some boards will also need a driver for the USB-serial chip installed (there are several ESP32 boards available, with a variety of different serial chips).
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
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.
Where should they be
One from SCL to Vcc and one from SDA to Vcc
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
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.
In "$PMTK220,10000*2F", 2F is the checksum. Are you sure that 2F is the correct checksum? ("Checksum" is quite a misnomer here: no summing is involved, just xoring)
I found a forum thread that was experimenting with that and some other code, with the goal of getting 10 second refresh rates, I will try again with the default value
2f looks correct:
>>> import functools
>>> hex(functools.reduce(lambda x,y: x ^ y, b'PMTK220,10000'))
'0x2f'
I always wanted a gps but I know where I am and I cant find a use for it 😦
They're useful as an accurate time reference
I can't see all of your code, but I'd suggest using a very simple program that just prints out the sentences as they come in, and try the various commands first, before you try your more sophisticated program.
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.
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.
Hi all, currently using a https://www.adafruit.com/product/4479, is there a more reliable device to deliver a heading related to north? maybe an IMU?
arent there built in pull-up resistors in the scl/sda?
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?
Not on the Arduino side, but some I2C breakout boards include pull-up resistors
Yes, like most AdaFruit I2C boards, pull-ups are included. They mention it on the pinout page in the learn guide https://learn.adafruit.com/adafruit-tdk-invensense-icm-20948-9-dof-imu/pinouts
which microcontroller board are you using?
double-clicking RESET should make it possible to upload in Arduino, but you may need to reset the Port in the Arduino menu.
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 have you selected your exact boot loader for your specific board
Ohh it’s done
@agile palm as you'll see in https://github.com/adafruit/Adafruit_TouchScreen/issues/45, I've tracked down the GIga touchscreen issue to a problem with analogRead() on that kind of board. I don't see any workaround right now, but I did open an issue with Arduino: let's see what happens.
thanks for your response. I'll keep an eye on it, I hope this problem can be solved.
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?
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.
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.
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)
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
Could be it's expecting the USB interface to be available for the serial port
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
When you say "fails to work", what do you mean? It looks to me like it's working?
It should output 4v in tinkercad but it's 0 rn
It looks like the layout on the breadboard doesn't match the schematic
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.
Thanks I actually corrected the whole thing, I got confused by the way the breadboard internal connections were made
It's working now
hi guys! I am having trouble with i2c, I am using thr starter code https://learn.adafruit.com/adafruit-tdk-invensense-icm-20948-9-dof-imu/arduino#load-example-3069477
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
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?
Common cathode actually helps you out a bit here, since you can control each LED with an open-collector NPN BJT or open-drain N-channel FET.
BJT
Base: GPIO pin thru resistor
Emitter: ground
Collector: LED
N-channel MOSFET
Gate: GPIO pin
Source: ground
Drain: LED
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.
Yeah I got them mixed up.
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
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.
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)
5V tolerant ones do as well, but the protection diodes are more zener-like.
And yeah 12V on any pin will make your microcontroller very, very angry.
unless it's a HV-programming pin, but that's less common these days
And is not used during normal operation.
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
cant seem to find that lib anymore... have they removed it?
In case you're still looking for ways to do this, I encountered the same situation building an Arduino-based signal tower controller that needed to switch the 24V power line for each light in the tower. This calls for a "high side switch", which I successfully implemented using a Toshiba TBD62783A. More info and working code in my repo: https://github.com/disquisitioner/Signal-Tower
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?
see the README here: https://github.com/johnrickman/LiquidCrystal_I2C
the gitlab page had been a 404 for ages
which I2C LCD is it? Does it have a PCF8574, or is it an Adafruit one? I'm assuming this is a character-based display
despite the age of the library, I was able to install v1.0.7 in the latest Arduino IDE. but I don't know why you are having trouble. You could try one of the LiquidCrystal Examples
not quite sure, character based: https://www.az-delivery.de/en/products/bundlelcd-schnittstelle
The high -contrast Azdelivery I2C display enables the representation of 16 x 2 characters in white writing on a green background. Thanks to I2C to Serial Converter, the display can be operated with only two data pins on compatible boards. The I2C-FC113 adapter enables you to reduce the cabling effort
1.1.0 is installable for me but it just seems to hang
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?
It could be you need to reduce the drive current to the LEDs so they don't swamp out the sensors at close range.
Okay
Hello everyone ! Where can I find a documentation to know how to use this library ? https://github.com/adafruit/Adafruit-ST7735-Library/tree/master
This is a library for the Adafruit 1.8" SPI display http://www.adafruit.com/products/358 and http://www.adafruit.com/products/618 - GitHub - adafruit/Adafruit-ST7735-Library: This is a li...
On the learn guides for displays that use it (like https://learn.adafruit.com/adafruit-1-3-and-1-54-240-x-240-wide-angle-tft-lcd-displays/arduino-wiring-test) or the example code included with the library
ah. so I have to use the exemples :/ I'll try my best from that
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/) )
also I meant with the wire lib
What do you mean by "use I2C"? The '4067 is a simple analog mux with bit select lines. If you are actually wanting to multiplex the SCL and SDA lines, you would need two of them. However, it is worth noting that better I2C multiplexing options exist and that the '4067 will likely introduce a significant amount of capacitance (plus series resistance) to the bus.
i meant being able to interface I²C
im getting this error whilst uploading my sketch, opening serial or just opening the port
works on a different usb port..??
This is designed for the task https://www.adafruit.com/product/2717
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.
You'll need to set up one as a host and one as a target, and supply pull-up resistors.
That's an I2C multiplexer. I think they are wanting a regular analog mux that allows channel selection via I2C.
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?
If the port is showing up as busy, make sure nothing else is using it (like a terminal program or serial monitor) and on Linux make sure you have permission to access it. What platform are you using?
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.
Im using windows 10/11, ive had this issue on two seperate computers and havent been able to find anything else accessing those ports. I am still able to program my other boards, just not this one
wasnt the liquidcrystal made obsolete and replaced with a community version ?
this one works so much better: LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 (HEX) for a 16 chars and 2 line display. Also there is a liquidcrystal library derivative specifically for the HD44780
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 😦
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
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 ?
this is the example sketch being used?
https://github.com/adafruit/Adafruit_ILI9341/blob/master/examples/breakouttouchpaint/breakouttouchpaint.ino
yes
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?
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?
you have to be running a program on the Feather that advertises as having the Nordic UART Service (a BLE service).
thanks! any advice/resources for writing my own code with a simple function such as transmitting thermistor data from the board to a phone via UART?
in CircuitPython or Arduino?
arduino likely
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.
someone is at this very moment asking the same sort of question in #help-with-circuitpython
cool, thank you!
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
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
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?
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
I have an ESP8266 left over from a few years ago, and it's the perfect board to use for a project I'm making: a WiFi oven thermometer. It's got WiFi, an ADC pin, why would I buy a more expensive microcontroller?
It's ok if you already have it. I just dont advise buying them for general uses, as many things on it are completely different from other chips like that adc, the simulated i2c with bit bang, the huge sensitivity to voltages above 33.V unlike most other dev boards etc
I never would get another one now. If I wanted a low end Feather form factor board with WiFi, I'd look at the ESP32-C3, which is intended to be the replacement for the 8266.
If I'm not using FeatherWings, then the Pi Pico W is my current "GoTo" for IoT projects.
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
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.
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
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.
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
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.
Just looking over that quickly, none of those are even blips on radar for this. All IoT stuff I do is strictly local to the LAN subnet, so SSL isn't necessary. And I'd be hitting the ADC maybe once every second or two, nowhere near the 3ms range they're talking.
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
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.
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
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.
the h7 support more "industrial stuff" that's the big difference I think
What does "Industrial stuff" refer to in that context?
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
canbus and those plcs protocols
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...
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
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
AFK for about 10 to 15 minutes. Lunch time. 🙂
anyway madbodger wasnt impressed and said unless I run a factory if I need something better than a teensy I should buy a laptop 🤣
Wat.
Hello @stable forge , I tried something with analogRead and it seems to be working...
I Modified your code and it seems that it worked, i'm going to post the modified code on your github issues
did you attach a high-value pull-up resistor to 3.3V on A0?
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
dose anyone know if I can use WiFiNINA lib on a esp32 feather v2
it is only for boards that have an ESP32 co-processor running NINA-FW.
instead use the native ESP32-nn support in the Espressif Arduino board support package, e.g.: https://learn.adafruit.com/adafruit-metro-esp32-s2/wifi-test
is there a way to only use the esp32 I have and connect it to a wifi that need username and password to connect (a school or a corp wifi)
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 ?
"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).
If you install the Arduino-ESP32 Board Support Package in the Arduino IDE, and then set the board to Adafruit Feather ESP32 V2 (well down on the large board menu), then in File->Examples->WiFi there is a WiFIClientEnterprise example. I have not looked at it.
i attached a potentiometer to the 3.3V to read different values.
you think the card have a problem of GPIO inputoutput definition ?
i mean... the card switch the state of the used ADC ?
What values do you get? How did you hook up the potentiometer? The usual hookup is one end to 0V, one end to 3.3V, and the wiper to an ADC input.
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:
- do an
analogRead() - do something digital with the pin, like
pinMode(pin, INPUT) - 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.
... I've confirmed my hypothesis by hacking up the code locally to test it. I don't see a workaround yet.
Hi
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
You may want to check out this Learn Guide. https://learn.adafruit.com/circuitpython-on-the-arduino-nano-rp2040-connect
But I don’t think the Arduino Nano RP2040 Connect has an RGB LED, just a single color one
there is a rgb led on the board
The RGB LED is connected to the ESP32 module, not to the RP2040. So it is controlled by firmware on the ESP32. CircuitPython does not support this.
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...)
If you have some HSV code, you could push the saturation down when you start to max out the value.
I was using RGB hexadecimal
And I also wanted it to be at 255
The demo code I saw was running hues. A link or code snippet might be helpful.
Seems like your code has as "got to 255, switch to full white" check, but not a "left 255, switch to some other mode" one.
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.
Which pin are you using for the chip select pin? You may need to cut the default jumper and connect it to another pin. The learn guide https://learn.adafruit.com/adafruit-wiz5500-wiznet-ethernet-featherwing/pinouts gives some explanation of this.
I am currently using pin 33 as it lines up with the CS pin.
what output are you seeing in the serial monitor when running the example?
https://learn.adafruit.com/adafruit-wiz5500-wiznet-ethernet-featherwing/usage
(with code changed for CS pin being used)
@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.
try making the other suggested code changes as well
also weird that this isn't showing up in output:
https://github.com/arduino-libraries/Ethernet/blob/39103da0e1bc569023625ee4693272773397dbb6/examples/WebClient/WebClient.ino#L59
Agreed. changing the code now to see if that solves the problem.
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
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?
it was a suggestion from a coworker to see if that resolved it, sadly it did not.
did you cut the jumper and add a wire to reroute it to 27?
I did.
and you updated the code to use 27?
I did. and that is the current result.
also thank you so much for the help, I am pretty new to coding with arduino.
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
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. 😦
it could be connection related
at this point, photos of the setup showing how everything is connected would help
it's a connection issue
none of these pins are soldered
and the soldering on the CS jumper wire looks cold soldered / poorly wetted
easy enough fix. I will get those soldered up after work and give it another shot. Thank you for the help.
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?
I'm assuming it has the hardware for a few reasons:
- SPI clocks tend to go significantly faster than I2C.
- The implementation is far simpler, basically it only requires a couple of shift registers at each end.
- The fact that it can use an external flash chip as program memory suggests that the SPI interface is done fully in hardware.
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?
you mean like using an eeprom for programs/sketches/variables ?
If that's the only option, it's the only option.
But I'd been hoping to make use of the built-in flash as program-accessible persistent storage.
Microchip offers that as a capability, but I haven't found any reference to people doing it on an Adafruit board.
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)
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.
do you know what a vtable is in c++?
Can't say I do, no.
To be clear, I mean mechanical assembly - things are getting awful cozy in there.
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
I'm not planning to store the program there - I just need to store a byte of settings data.
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
Id starts with https://docs.arduino.cc/learn/built-in-libraries/eeprom/
Yep - that one I'm pretty confident I can get working!
Just gotta order some EEPROM chips!
and uses a .h file to keep the adresses and their meaning
Uh... doesn't that only work with the ATMega internal EEPROM?
ie: for instance #define CERTIFICATE_PUBLIC_KEY_ADRESS = 0x98A etc
Either way - I can get the external one working, if I can make the chip fit.
But you did say you dont have an eeprom chip yet ?
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
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
Ok let me clarify because it seems I confused you
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
Oh! That's promising. Do you have one you could recommend?
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
Pretty sure most Arduinos have their EEPROM built into the microcontroller, not a distinct chip?
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
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...
16MHz and 8 bits should be enough for any man!
Yeah they do leave a bit to be desired...
there's this, but i haven't looked at it in detail. the Arduino SAMD core doesn't seem to have a built-in EEPROM emulation. https://www.arduino.cc/reference/en/libraries/flashstorage/
The Arduino programming language Reference, organized into Functions, Variable and Constant, and Structure keywords.
Cool, I'll give it a shot and report back. :)
If they werent 5V (so quick prototyping) Id throw them out
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...
Works perfectly, thank you so much!!!
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 ?!
2kb of memory is an incredible volume for controlling small things. That's like 200 PID controllers, or 600 RGB LEDs. You're gonna run out of IO before you run out of memory to store their states.
yeah that may seems to be true to you
I have my niche. :)
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
There's always the trick the Atari 2600 used of computing the video data on the fly.
My first computer has 576B of memory. 256B for "page 0" (variables), 256B for the stack, and 256B for everything else (my program). After that, 2kB seems amazing.
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
if it's getting hot, it's wired incorrectly
It doesn't have anything plugged into it though
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
what do you mean every single nano, like you plugged them all on your computer at the same time ??
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
I have the same problem in the arduino ide it doesnt like me unplugging things and replugging or my computer doesn't
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
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
Can you provide a picture of your setup? How are you wiring up your boards?
Right now it's just a USB-C cable from my PC to the Nano
Is the Nano sitting on anything metallic?
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
If it's still getting hot when unplugged from the breadboard, then the Nano is likely dead
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
Do any of them make Windows play the "USB added" and "USB removed" sounds when you plug/unplug them?
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)
All of these nano's (including the one that gets super hot) do show up in device manager
Even Arduino IDE recognizes them, I just can't upload to them for some reason
I also reinstalled drivers and no dice.
So you can pick their COM port? How are you uploading to them, via the standard "Sketch -> Upload" or are you using "Sketch -> Upload Using Programmer"?
IIRC just Upload
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
And these Arduinos worked at one point?
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)
I do not :(
Have you installed any other software from when they last worked to now?
Nope
I just changed the baud rate for the monitor in PIO and future uploads did not work
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
no raspberry pi 3 or 4 either ?
since these can power and program other mcus
I actually tried that, nothing
Oh I do have that
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
yep, this is a good suggestion, @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?
It's the easiest way. But if you're experienced with PlatformIO you could probably use it
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
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.
Okay, so on a "in-production" unit it would probably be best to add a fuel gauge
Yea
lol so I got raspi setup and installed the arduino IDE and it won't open
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.
What do you mean when you say it's not running? Does it upload? Does it start?
As I'm compiling (verifying) the sketch https://efundies.com/src/arduino/midi-solenoids.ino, Arduino IDE returns the following errors (see the attached txt)
Apparently that library doesn't support that chip. However, someone else has written an article on how to modify the library to do so: https://diyelectromusic.wordpress.com/2021/04/16/samd-usb-midi-multi-pot-mozzi-synthesis/
Hello everyone. I was wondering if anyone has been able to get the SDU library to work on the SAMD51 boards like the Grand Central? https://github.com/arduino/ArduinoCore-samd/tree/master/libraries/SDU
Arduino Core for SAMD21 CPU. Contribute to arduino/ArduinoCore-samd development by creating an account on GitHub.
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.
I've not seen the "MIDIUSB.h" library used as much as the FortySevenEffects "MIDI.h" library when doing USB, as I think "MIDIUSB.h" cannot use TinyUSB. Here is a compiling-but-untested port of "midi_solenoids.ino" for MIDI.h. It does compile for Itsy M4. Let me know how it works. https://gist.github.com/todbot/684a0fcc50bbdd067e60b3f3ef21ddd6
Thank for the hint. This code is compiling indeed. But... I suppose something is missing in the loop block. It's empty and it seems no midi notes are received from the outer world. To my understanding viod loop() should be feeding void handleNoteOn(), shouldn't it?
In this case, no. In setup() there is a MIDIusb.setHandleNoteOn() that is used to set up handleNoteOn() as the callback function to call whenever a note on messages is received. This leaves your loop() free to do whatever you want
Did you set the USB Stack to "Adafruit TinyUSB"?
Nope, I am wrong, you are correct. I left out:
// read any new MIDI messages
MIDIusb.read();
inside of loop(). The gist has been updated and I just verified on an Itsy M4 that USB MIDI messages are received. Sorry about that!
So going back to this, I could not get the Arduino IDE to open on my raspi, but I did try something else.
PIO lets me monitor this 328p just fine, so I know the chip isn't dead.
It prints the ASCII alphabet and some other info
But when I go to upload, I get the sync errors.
That sounds suspiciously 6502'ish, to me at least
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.
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
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
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);
}
}
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:
Yes, the USB Stack has TinyUSB selected.
For MIDI I use a simple utility called MIDI Editor. It did send MIDI messages when I had CurcuitPython installed on my ItsyBitsy chip.
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() );
}
}
Unfortunately, Serial monitor still shows nothing...
Yeah! I've decided to try "havier" Cubase to send MIDI and it's working now!
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);
}
}
Awesome! dang programs
So I'm gonna try the previous sketches tweaking them for my purposes. Thanks a lot, todbot!
Do you think it'd be worth trying to reflash the bootloader?
Can a 168p nano do that?
A 168P can flash a bootloader. As to whether it would help, I don't know
probably, best to ask your specific question
also specifically which Arduino Nano, there are 16 diffrent types: https://store-usa.arduino.cc/collections/boards-modules?filter.p.m.global.family=Nano
what is most likely used for a line tracing robot
Any of them would be suitable for a line tracing robot
The most common Nano is the original one, just called “Nano”, at the very bottom of that page. In general if you’re not doing WiFi or BLE, Arduino coding will be about the same across boards
Could I further damage the board when flashing the bootloader?
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
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
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?
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
Yes. I've done this. Here's an Arduino class that emulates how touchio works: https://github.com/todbot/picotouch/blob/main/arduino/midicontroller1/TouchyTouch.h
See the accompanying Arduino sketch for how to use it.
Thanks for the help!
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
As long as the total current needed is less than 500mA you can connect both to 3.3V — see https://learn.adafruit.com/adafruit-esp32-s2-feather/pinouts#power-3106354. VBUS and VBAT will be > 3.3 V and EN is not used to supply power. It is used to enable/disable the voltage regulator.
so if my tft display use somthing like 50 mA and hx711 uses like 2 mA I can connect to same
Yes, That should be fine.
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.
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.
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.
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)
if you can use the UF2 bootloader on the SAMD51 board, then you could send updates as UF2 files
Ah yeah that would be ideal I believe. I'll check out both suggestions.
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?
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
This page https://www.programmingelectronics.com/r4-wifi/ shows it drawing well under 200mA (0.2A) when using WiFi.
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
This one should be fine: https://www.adafruit.com/product/798
Or this one via the USB-C jack https://www.adafruit.com/product/5802
It's slightly overkill, but for $6, it may be the most economical choice
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!
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.
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.
MeanWell does make nice supplies.
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.
Yup. "The person who buys good tools only cries once"
Power supplies are something you should never go cheap on.
Otherwise 
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
but I dont have a 5V
yea but what does that mean I am new
I believe it is saying you need an external 5v supply.
dont the esp32 feather I have linked some how 5v
like cant I use the USB or BAT pins
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"
3-12VDC
Your load cells?
yea
Try it and see if it works? 🤷♂️
but could I not just use the USB or BAT pinouts
Both the Schematic and Datasheet seem to indicated 3.3-5v is allowable for Vcc and Vdd.
so basicly I could just solid the VCC and VDD togheter and then hook it up to my 3v
Let me look at the ESP32 feather that you linked.
I think so. The important thing is to tell the breakout board what LOGIC level of voltage your MCU is using (Vdd).
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.
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
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
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
no. that would put 5V on VDD.
so not solid them togheter but put VCC to usb pinout and VDD to 3V
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
soild them first togheter then? and then pray
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?
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
making connections on breadboard via jumper wires
https://www.adafruit.com/category/306
typically male-male style in various lengths
soldering on terminal blocks to the HX711 would be a good option for the strain gauge side:
https://www.adafruit.com/product/2139
This is a start, but maybe something more full featured with number of DAC and bus pins 🤔
https://www.espboards.dev/blog/esp32-alternatives/#comparing-esp32-with-its-alternatives
similar to the NAU7802 breakout:
https://www.adafruit.com/product/4538
@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.
This isn't too bad.
https://socialcompare.com/en/comparison/rp2040-vs-stm32-vs-esp32-vs-esp8266
Compare Raspberry Pi RP2040 vs STM32 F1 series vs STM32 G4 series vs STM32F103C8T6 vs Espressif ESP8266 vs Espressif ESP32 vs Espressif ESP32-S2
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?
That should be fine, the 3.3V regulator isn't involved in that
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!
Ended up being a bad AC adaptor into the bullet connector! Thanks
does a Arduino have a precision oscillator output , software controlled ? where to ask , here ??
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
This SparkFun Real Time Clock (RTC) Module is a Qwiic-enabled breakout board for the RV-1805 chipset running at only about 22nA.
The datasheet for the DS3231 explains that this part is an "Extremely Accurate I²C-Integrated RTC/TCXO/Crystal". And, hey, it does exactly what it says on the tin! This Real ...
for HAM radio circuits - as a mixer @inland gorge
hmm, I don't know anything about ham radio, sorry
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
you don't want to use an Si5351A?
Atmel 328P chip (Arduino) cannot do MHz-clock generation with useful granularity
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
that's an extremely common part for simpler software-controlled radios
cool thanks
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
I can't speak to the I2C target problems (maybe see https://github.com/esp8266/Arduino/issues/5762), but I'd say try a plain ESP32 or ESP32-something instead. I assume you are interested in wifi capability
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.
Anyone have any documentation or tips on adding some pots to control parameters within FASTLED library?
Found it
Nvm lol. Not doing so well.
The FastLED library for colored LED animation on Arduino. Please direct questions/requests for help to the FastLED Reddit community: http://fastled.io/r We'd like to use github "...
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
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'
Is this possible thats not working because i have ArduinoUno while a have to have Zero?
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….
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?
There are lots of ways. Most of the usual display technologies (VFD, LED, LCD, OLED) can display whatever you want. You could also use an actual analog meter. Or a servo driven pointer. Or one of those stepper driven pointers used in car dash displays. Or go old school and use a linear neon display or "magic eye" tube.
i was planning on making it vertical, i think OLED would be the best option. would probably need an I²C mux tho...
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.
im working on something similar to this. a wider display might work better and then just not have anything in between the spaces
(the design used here for the meter is just kinda inspiration, i dont think thats an easy way for me to do it :p)
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.
i vaguely recall some actual mixing boards used tiny light pipes on top of larger LEDs
Or if you like the look of neon http://lampes-et-tubes.info/cd/cd092_lit.jpg
If you wanted to do color coding, there are LED red/green/orange bargraph displays https://i.ebayimg.com/images/g/uRcAAOSw~iJg-Evo/s-l1600.jpg
those look good, i'll try those
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.
Measuring which resistance? There are several different connections possible
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.
Those are called JST Connectors, specifically JST PH connectors!
You can find them on Amazon, Digikey, Mouser, etc.
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.
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.
- 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.
- 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.
It could get confused if the black line is shiny
Okay
You can't mount it read-only, but if you don't write it to, it should be OK.
You can call the .end() method on the sd card object. That might work for what you want to do.
i will look at the vs1053 library
It uses either the SD or SDFat library: https://github.com/adafruit/Adafruit_VS1053_Library/blob/d007aaaf5de50cf57691c74162217cadaf598249/Adafruit_VS1053.h#L22
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.
I see there are issues and a pull request about this. If the PR works for you we can probably merge it.
https://github.com/adafruit/Adafruit_VS1053_Library/issues/88
my loadcell and hx711 scale.read value is fluctuating even when no force is
the usb pinout on esp32 feather v2 is that 5v
They do tend to be crazy sensitive in my very limited experience.
Yes, they're comparing minute variations in resistance between things. Any noise or interference that gets in makes the whole thing unstable.
how can I resolv this then
Basically, power supply filtering and shielding
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?
The Arduino Zero does not have a UF2 bootloader, so you need to use bossac to install CircuitPython. See https://learn.adafruit.com/welcome-to-circuitpython/non-uf2-installation
https://github.com/ScoobanyLoLo/scaling-fortnight/issues/1 Can someone look at this??
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
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
@left mauve thanks for pointing that out. github is correct. the pinout diagram is incorrect.
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
@nxt what are the i2c devices?
Trill bar sensor and 0.49 in oled (64x32)
Those errors indicate you’re running the Python code on your Windows computer, not on the Arduino. And you wouldn’t use Blinka with an Arduino, it’s a library you use to help personal computers running CircuitPython code.
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:
- 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);
- 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.
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)
can you post a photo of the setup? or link to info on the sensor and oled?
Implement a low pass filter in the firmware
what is that and how?
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.
Hello! The Code was from stackflow so i tought it will okay, but of course, better code are always better! But i don't finde a better one. 🙁 After i cleare the DC with the code from here i get an okay wave form, i will searche for a filter to get a cleaner wave form and then i want to get the peak value from the last wave, maybe to get an bette...
Averaging is not as good as LPF, but start here https://docs.arduino.cc/built-in-examples/analog/Smoothing/
Averaging basically is one kind of LPF
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.
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?
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.
I see
You could, of course, make your own voltage divider from VBUS and connect it to a pin to monitor it.
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
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.
I see, thanks for the help!
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.
I installed the drivers found here https://github.com/adafruit/Adafruit_Windows_Drivers/releases
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:
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.
windows 10
ive swapped w cables im sure are data cables
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?
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
yep
its had the same error message
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)
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
okay thank you so much!
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?
This library is newer and is what to use with the Matrix Portal S3: https://github.com/adafruit/Adafruit_Protomatter
Here's a Learn Guide: https://learn.adafruit.com/adafruit-protomatter-rgb-matrix-library
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
is this the Matrix Portal S3? Are you powering the RGB matrix itself from the board? Might be a power-sag issue
and are you using a laptop?
right
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
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
yes, the first choice is 2MB APP + 2MB space to update APP via OTA + space for writing files
- space for UF2 bootloader
Do people often write files when they use the Arduino platform?
I don't know how that decision was made. There could be more options.
if you look at non-Adafruit boards, do they provide SPIFFS in general? the UF2 is our own thing
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.
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.
Never mind... I got it to work by re-installing Arduino SAMD Boards from Board Manager.
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?
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.
I think it's resetting, which causes the USB to re-enumerate. The serial port should reappear in a couple of seconds
Yes it does, but it continues to reset as the code is uploading.
I have the double press the reset button to get the port to reappear. Then it resets itself as the code is uploading.
I think the reset is part of the code upload process
@north stream thanks for the idea for the voltage divider, wasn’t that hard to figure out lol
Maybe but the code will not upload ... with a port monitor error.
What ports show up in the pulldown?
Thanks for your help... This is what I see BEFORE the upload...
It is that port that disappears when I try to upload the code.
Presumably it reappears in a few seconds?
Not unless I double click the reset button. Now it apepars to be working .. for no apparent reason!
... 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.
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
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
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
I am making progress! Fingers crossed that I can get the 3.5mm audio out connected without any smoke. 🙂
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.
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?
I haven't seen that one before, but from this thread, it could be a bootloader problem https://forum.arduino.cc/t/solved-getting-sam-ba-operation-failed/541313
make sure you are not already connected to the USB port via a terminal program or Mu, etc.
also make sure that's the right port
I tried to update mine, but the problem is the code can’t still be uploaded
The port changes from com3 to com4, and sometimes it says device or port not found
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
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
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
@turbid mesa can you be specific about which Feather S2 board and exactly which UF2 file?
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
no worries, glad you got it working
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.
does a BOOT drive appear as a new disk?
In Finder, there is no disk or boot drive showing
Port is /dev/cu.usbmodem31101 Serial Port (USB)
2.3.1
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?
I double clicked it now, and no boot drive appears on Finder
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
that is slightly interesting but not sure it matters
so when you press right-arrow to upload, you get the SAM-BA error?
Yes, correct
what version of macOS, and what kind of mac?
Apple M1 Pro, Sonoma 14.1.2
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?
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
and on windows you get the same SAM-BA error?
Yes, correct.
are you using the same USB cable on both?
are you using a USB hub?
or direct connect to computer port?
I'm using a thunderbolt hub, with 3.0 usb
how about on Windows
usb 3.2
is that a different machine, or Parallels?
Different machine
and different cable, or same cable?
No, only this one
could you take clear bright closeup pictures of both sides of the board?
That is a 32u4, that is not an M0
you want to choose the Adafruit AVR package and choose the Feather 32u4 board
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
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
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!
the BME280 should be using the same I2C pins (SCL and SDA) as the other I2C devices, so should not interfere with the SPI bus. so very odd that adding that one specific I2C device has that behavior. you'll probably need to provide more information about the setup (photo showing how everything is connected) and complete code listing for what is being run on the UNO.
@leaden walrus Thanks for your reply. I have attached schematic of the connections below (LDR omitted). Code will follow.
need photo of actual setup
this is the BME280?
Yes
if you remove that from the PCB, the SD card starts working? no other changes?
Correct
what's the code being run?
Preparing pastebin, just a sec
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
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.
what's the actual serial output from the two cases? with BME280 attached and then removed.
with BME280
without BME280, data occurs after I pressed button
wait, what happened with RTC :/
have you verified 0x76 is the actual address of the BME280? can do an i2c scan:
https://learn.adafruit.com/scanning-i2c-addresses/arduino
to check
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)
then most likely that BME280 breakout isn't as expected. the adafruit library does a chip id check:
https://github.com/adafruit/Adafruit_BME280_Library/blob/9412f3d1a2e334a3415d79df706dad02925488aa/Adafruit_BME280.cpp#L108-L110
that could be failing
the BME failing to init is preventing the rest of the code from running. see the infinite loop at line 160 in your pastebin.
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?
works on its own using the library example?
https://github.com/adafruit/Adafruit_BME280_Library/blob/master/examples/bme280test/bme280test.ino
BME280 test
-- Default Test --
Temperature = 16.82 °C
Pressure = 1005.00 hPa
Approx. Altitude = 68.88 m
Humidity = 60.87 %
hmmm....yah...that's weird.
Yeah, hence my confusion. I was thinking perhaps the timing of SPI and I2C are interfering? Kinda clueless
try moving the BME280 init code to be above the RTC init code, so BME280 inits first
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
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);
}
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
it's printing RTC module before BME280?
not sure how that's even possible
make sure code is updated as suggested above
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
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
now the RTC fails to initialize
it worked above?
Yes
it's not working if you remove Wire.begin()?
No, then the RTC just fails
weird. leave it in then i guess.
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...
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
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)
are you pressing reset? or are those reboots happening on their own?
on their own
possibly a memory issue? too many things for the UNO
How would I verify this?
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
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
code generally seems fine
@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) ?
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)
could this be specific for ds1307? I have also ds3231
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?
Yes I have it
try the r4
Will do (later tonight). Thanks for your help. Highly appreciated.
Memory issues resolved. Conflicts in libraries... not so much. Looking for other pressure sensor to see if that resolves the issue.
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?
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?
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?
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
Adafruit products usually have at least one guide that describes basic functionality
In this case, the info you're looking for is here: https://learn.adafruit.com/adafruit-3-5-capacitive-touch-tft-featherwing/arduino
thank you 
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
🥳
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
It’s pretty common if you use a null pointer, which is pretty common error in C/C++. Just using the wrong arguments to Serial.print() can cause it
One of the features of Objective-C is it doesn't have null pointer errors in general.
If i connect a adafruit sound fx board (https://www.adafruit.com/product/2220) and control it via TX/RX is there a limit on how many audio files I can play?
i think only limited by storage on the audio fx board itself
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
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
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
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
Are you using the arduino core provided by Espressif at https://github.com/espressif/arduino-esp32 or something else? What is the code you're using that's giving you the core dump?
Somehow fixed it, it was just set to the wrong board l
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
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
Thanks again! by the way, are you familiar with esp32-cam?
nope sorry
alright then, thanks again
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
I think you need to clear the screen before each call... if I understand your problem correctly
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);
}`
Is it possible to get a SDU bootloader for the QT Py SAMD21? If yes, how can I do it?
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.
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.
galago, digispark pro, digistump oak, particle photon, metawear... mostly a graveyard.
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.
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.
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
you could consider using a vector which is like an array that can be dynamically scalable
ahhh I have just learned about it a lil bit but I haven't used it. I might have to check that out, Thank you so much.
I will try and if anything doesn't work the way I want, bring it here again!
Thank you again! @surreal quarry
of course!
Is there a way that I can fade in and out multiple white LEDs with a single PWM~ output from Arduino Uno?
If you want them all to fade together, you can do that with a driver transistor to boost the amount of current the Uno can control.
