#help-with-arduino
1 messages · Page 8 of 1
Any suggestions to correctly connect the data point with the expected pin?
Im a bit clueless at the moment 😅
I'm not entirely sure how your DMA is configured, but I assume it would place consecutive samples in adjacent memory locations? Then you'd want to index through active_adc_buffer[] to get the data for each pin.
The pin to bit mapping presumably would depend on the port mapping, but I haven't looked into it.
https://github.com/adafruit/Adafruit_ZeroDMA/blob/master/examples/zerodma_spi2/zerodma_spi2.ino
Could someone give an idea of how to access the buffer in the SPI data register destination of this transfer so that it can be recorded in a file using some SD library?
It doesn't work..
byte data = SERCOM4->SPI.DATA.reg;
what ethernet shields are compattible with the arduino zero
I am trying to upload arduino code to my ESP32-S2 Feather using PlatformIO in Visual Studio Code but I always get the following error after the script is 100% uploaded:
WARNING: ESP32-S2FNR2 (revision v0.0) chip was placed into download mode using GPIO0.
esptool.py can not exit the download mode over USB. To run the app, reset the chip manually
I tried playing around with the reset and the boot button but I never got it working, only showing up as a drive in windows or having all leds blinking or with no lighting at all (in this mode it also shows up as COM port)
Perhaps you need to change the level on GPIO0?
Mystery arduino problem: I'm programming a weather station board, and it's supposed to record the wind speed every x minutes (set to 1 for testing). The problem is that the program will print the number of wind clicks (since the wind speed sensor outputs one click per cycle) correctly, but it won't print the actual wind speed. Instead it just prints 0.00 as the value of windSpeed. Code
wind[0]=wind[0]+windClicks;
Serial.println(windClicks);
windSpeed=(windClicks/((millis()-lastTime)/1000))*2.4; //km/h=(clicks/(elapsed time(ms)/1000))*conversion factor
Serial.println(windSpeed);
rain[0]=rain[0]+rainClicks;
rainfall=rainClicks*0.2794; //mm
rainClicks=0;
windGustSpeed=(1/windGustTime)*2.4;```
The integer divisions are likely destroying the value before it gets converted to float by the 2.4 multiplication.
How do I fix it?
float()?
Easiest way would be to multiply by 2.4 first and then divide afterwards.
OK
That worked
Thanks
I am using the SoftWire library to use software i2c with a bme680, i saw in an adafruit forum post that you have to modify the library in order to get them to work together, i tried to do that and now i am getting “error: expected primary-expression at end of input”
That's probably some sort of syntax error in the edits to the library, like an extra or missing brace.
could use 1.0f and 2.4f as to be even safer as per the C standards
i changed it from Adafruit_BME680(TwoWire *theWire = &Wire); to Adafruit_BME680(SoftWire *theWire = &SoftWire);
does that look right?
No, that looks suspicious if SoftWire is both the class name and the object name. You probably should leave off the = &SoftWire part and pass in your own software I2C instance when you initialize it in your code.
How do I adapt this code to an esp32 s2 feather?
https://learn.adafruit.com/mlx90640-thermal-image-recording/uploading-the-sketch
tldr: Compilation error: 'Adafruit_Arcada' does not name a type; did you mean 'Adafruit_SPITFT'?
@stable forge sorry for the ping but earlier you said the chips were almost identical. What am i missing? the code seems very different.
I've lost the context: could you link to what I said? Get a lnk from the three-dots menu when you hover over the post.
Hiya! I need help with Arduino’s IOT Cloud - I searched, but didn’t see this answered: When are the onVariableChange functions called? When I put a magnet up to this hall sensor, the connected “led” on the dashboard lights up, but onHall1Change() isn’t firing, and i don’t understand why.
#include "thingProperties.h"
const int hallPin1 = 7;
int hallState;
void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1500);
pinMode(hallPin1, INPUT_PULLUP);
pinMode(LED_BUILTIN, OUTPUT);
// Defined in thingProperties.h
initProperties();
// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
/*
The following function allows you to obtain more information
related to the state of network and IoT Cloud connection and errors
the higher number the more granular information you’ll get.
The default is 0 (only errors).
Maximum is 4
*/
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
}
void loop() {
ArduinoCloud.update();
// Your code here
hallState = !digitalRead(hallPin1);
if (hallState) {
hall1 = true;
} else {
hall1 = false;
}
}
/*
Since Hall1 is READ_WRITE variable, onHall1Change() is
executed every time a new value is received from IoT Cloud.
*/
void onHall1Change() {
// Add your code here to act upon Hall1 change
digitalWrite(LED_BUILTIN, hallState);
}
Yes of course, one second.
I apologize. I misremmebered what you had said: "The ESP32-S2 and -S3 feathers are basically identical"
Any idea on how I adapt the code?
hall1 is a variable controlled by buttons in the iot
you need to have a local variable tied to the hallfx sensor
In terms of the board and the features, yes. The S3 will have BLE support (we have very limited support right now). But the ESP32-S2 has been more reliable.
I think may have meant that the TFT Feather and the Reverse TFT Feather are basically identical. They differ physically, based on how the display is mounted.
ah ok
is there any way to adapt this code without completely rewriting it?
it uses tons of arcada.display and similar functions
you'd have to see if you can adapt the arcada library to the TFT feather, or just dispense with it and use the lower level things it provides. You would want to read the librayr. The display has a different resolution and there are other differences. You may want to look at the example programs for the sensor, which won't use the aracada library
ok
i have to be afk in a minute, sorry
👍
So i have gotten to work adapting
Im not sure how i would draw pixels
the arcada version has this
int colorTemp;
for (uint8_t h=0; h<24; h++) {
for (uint8_t w=0; w<32; w++) {
float t = frame[h*32 + w];
// Serial.print(t, 1); Serial.print(", ");
t = min(t, MAXTEMP);
t = max(t, MINTEMP);
uint8_t colorIndex = map(t, MINTEMP, MAXTEMP, 0, 255);
colorIndex = constrain(colorIndex, 0, 255);
//draw the pixels!
arcada.display->fillRect(displayPixelWidth * w, displayPixelHeight * h,
displayPixelHeight, displayPixelWidth,
camColors[colorIndex]);
}
}
i dont know which function to replace arcada.display->fill rect() with
pls ping me if you have any info or questions
hey, so im trying to use a bmp180 atmospheric pressure sensor with my esp32, the thing is that due to gpio availability issues i had to use gpio 14 and 15 for i2c, and i cant get it to work using those pins, could anyone help me with this?
okay noe its working, but it is making the esp32 crash whenever i try to read anything because of a DivideIntegerByZeroException
Could you share your code and the error message? That particular exception should be easy to trace with the code and a line number.
The display is an instance of Adafruit_SPITFT. So you could just use that library standalone.
ok
im confused
so i just use tft.display?
i have a line in the code: // Use dedicated hardware SPI pins Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);
class Adafruit_ST77xx : public Adafruit_SPITFT, and Adafruit_ST7789 is a subclass of Adafruit_ST77xx, so I think you would just do tft.fillRect()
thanks:D
but i am having a problem with max temp
let me show you my code rq
t = min(t, MAXTEMP);
t = max(t, MINTEMP);
Compilation error: no matching function for call to 'min(float&, int)'
line 119
Guys I wanted to pick up an ESP32 just for experimentation, I found a nice Tutorial playlist on Youtube. Can anyone tell me what would be the best thing to get from this link: https://www.aliexpress.com/item/32959541446.html?spm=a2g0o.cart.0.0.44c538daP0BirR&mp=1
Smarter Shopping, Better Living! Aliexpress.com
ima stop you right there
20 is an int, by itself. Or you could cast it t = min(t, (float) MAXTEMP);, but if you are not going to use it as an int, don't bother
const float MAXTEMP = 20.0f; is somewhat better form
take it from somone who spent 4 days and abandoned a project they had put over 12 hours into over a pair of esp 32 boards from amazon that were buggy garbage
the adafuit brand esp feathers are a little more expensive
but they are not trash
alright ill do that
verifying
@rancid patio if you want to run CircuitPython maybe, consider an ESP32-S2 board, because the S2 has native USB. Or ESP32-S3, but its I2C can be flaky.
Well, the issue is I will probably abandon this idea, and this will be another item to add to my drawer, a drawer that is full, full of projects I did not proceed with. Therefore, I'm not willing to spend more than $10 or so on this think. I'm quite confident that Adafruit will charge me like us$15 to ship to Canada, no thanks to that.
what project is it
My friend I want to keep things super simple, and want to follow the playlist: https://www.youtube.com/watch?v=JmDxP4O4Trk&list=PLzvRQMJ9HDiQ3OIuBWCEW6yE0S0LUWhGU&index=2
Before you can program the ESP32, you need to install a driver for the USB-to-UART chip. Depending on your board that might be the CH340 or CP210x chip.
🔗 Driver download links:
- CH340 (Windows & Linux): https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all
- CH340 (macOS): https://github.com/adrianmihalko/ch340g-ch34g-ch34x-ma...
C:\Users\justi\Documents\Arduino\thermalcamfeathers2test\thermalcamfeathers2test.ino:119:18: error: 'MAXTEMP' was not declared in this scope
t = min(t, MAXTEMP);
how
it is saying it wasnt declared
//low range of the sensor (this will be blue on the screen)
const float MINTEMP 20.0f
//high range of the sensor (this will be red on the screen)
const float MAXTEMP 35.0f
should i replace the const with #define
There is no project, as I said already, this is purely for experimentation.
const float MAXTEMP = 35.0f; need = and ;
i was in your position like a year ago. There is no keeping it simple. The tutorial becomes out of date in a month
you will go down the rabbit hole
its best just to accept it
🤦♂️ thanks
The tutorial is not out of date, and never will be as long as I use the parts in the tutorial.
this is what i told myself
every technology tutorial is out of date
and following exactly what they say will not work
there is nothing simple in electronics
but the bliss when you figure it out
Hence my desire to spend $5 on this.
$5 + 20 hours of troubleshooting
$20 + it works
Trouble shooting is part of the process, you don't seem to comprehend that.
this u?
Yep.
so you saying "troubleshooting is apart of the process" but are also saying it doesnt happen if you follow magical instructions
Trouble shooting is part of the process. What don't you understand?
let's not escalate, folks. Yes, some people who bought cheap boards found they had issues, because the boards were missing parts, had bad parts, or incorrect parts, or were poorly made.
sometimes the cheap boards are fine, sometimes they are not
Agreed.
good news and bad news on the scrip
t
good news: IT COMPILED
bad news: only one pixel is working
good news: ONE PIXEL IS WORKING
I imagine this is because you don't know what you're doing. Keep at it and you'll figure it out.
I will never know what i am doing. But i will always be along for the ride
the pixel changes based on what it is looking at
hopefully just a resolution error
progress is being made
🙌
could it have to do with the frame variable being set to 32 by 24?
float frame[32*24]; // buffer for full frame of temperatures
the device res is set on line 83 displayPixelWidth = 240; displayPixelHeight = 135; //Keep pixels square
i don't know - I'm pretty unfamiliar with the sensor and library you're using
ah ok
but I think you got over the hurdle of the arcada library, so now you want to figure out what is different about your display initialization and setup vs the PyBadge one.
i am going offline - it's late here, good luck
thank you
sleep well
i flipped the display pixel width and height
the pixel takes up the whole screen now :D
wait no it's two pixels
:DDDDDD
I am getting output :DDDDDD 🙌
it is either too small or zoomed in
but i am getting there
uhhh the camera only works if i am holding teh cable
i have tried wrapping some tape on the qwiic cable to hold the cables in place like i was but it doesnt do what my hand does
if i am not almost strongly gripping the cable it is all red
re seated the qt cable and tried the second qt connector to no avail
Sorry for the delay, it was really late at my time zone, this is my code:
#include <Adafruit_BMP085.h>
TwoWire I2CBus = TwoWire(0);
Adafruit_BMP085 BMPSensor;
void setup ()
{
Serial.begin(115200);
I2CBus.begin(14, 15);
if (!BMPSensor.begin(&BMPSensor))
{
Serial.println("error initializing bmp sensor");
while (true) delay(1);
}
}
void loop ()
{
Serial.println(BMPSensor.readTemperature());
delay(200);
}
Hey guys sorry bothering you, I got a problem here using a arduino D1 wifi, I try using the pin D6 and use the simple howdy code and it is just white
got a 8x8 led matrix and all is going white
I added a delay and i notice that he writes the text and then puts everything white and so on
I know i made some mistake with the orientation but i for now want the code to work
I dont know why this is happening 😦
I don't either. I doubt you need both .clear() and .fillScreen()
yeah that was just a try to see if it helped
I didn't had the clear before and still the same 😦
maybe it is the arduino
I wanted to use one with wi Fi and got this, I managed to create a webserver and get data, but the LEDs are not working
now I just used this simple code to test why it is not working
My mlx90640 thermal camera only works if I tightly grip the qt cable. I have tried two qt cables so far and it only works with my hand, I tried a metal tweezer in the same position to no avail.
Is it a bad connection? Have you tried a different cable?
I have tried two qt cables
Both are from adafruit
Could it be the solder points? They look like they have too much solder
I think it is the library that does not work with this
I got a motor shield for an arduino and i am testing it with adafruit motor shield library. I am getting this strange noise from the shield, what can it be?
btw here is the code
great
now it is stuck in bootloader mode
i factory reset it
now when i upload a script the screen shuts off an the ide erros out of uploading
com11 was the port for it i am 100% sure
now it shows up as an esp32s2 dev moduile
it worked fine last night
i mess around with the frame resolution
now nothing works
why does every project have everything go wrong right at the end
I am trying to understand HardwareSerial vs Uart. On my SAMD21 boards, Serial is class Serial_ and Serial1 is class Uart. When I look at the Arduino Mega, (not SAMD21, but has a Serial1) it uses HardwareSerial for both Serial and Serial1. (This is what the Arduino Editor tells me when I change boards). When I look at the Uart class it looks like it extends HardwareSerial, is that right?
I am trying to use a library that is expecting a type of HardwardSerial and use Serial1 on a SAMD21 board. Not sure the best way to get that. Unless I rewrite the library to use Uart?
i restarted my pc and it magically fixed every one of the compiler issues ✨
camera still doesnt work unless the cable is held close to the qwiic connector on the camera
it will just be all red otherwise
Having a bit of a weird issue, I use 28BYJ-48 stepper motors for a couple of products I sell, I usually use an ATTINY88 to drive a ULN2003 driver
I'm waiting for a bulk order of ATTINY88's to arrive from China so I had to Amazon Prime some Digisparks to get some orders out, but I'm running into some odd issues whilst using the Digispark
Regardless of what code I use to drive the motors, the motor doesn't feel smooth at all, rotates as it should but it feels jittery and vibrates on surfaces and I'm unsure what's going on
ULN2003 hooked up to pins 0,1,2,3 and I'm powering the driver off of a VIN and not from the Digispark so I'm really confused what could be causing this
I'd look at the outputs of the (probably clone) digisparks and see if they're right.
Seems to all be fine
Amazon listing also has many good reviews
I'm using 0,1,2,3 purposely as Pin 5 is reset, I just can't figure out why it works, but very poorly
did you try the other STEMMA connector on the camera board? It's odd you have to hold the wire. if you push on the connector itself, toward the board, does that help? Squeezing the cable will add capacitance, which suggests an I2C signal problem.
support will send you to forums first for diagnosis.
Just to update something, I can use the FastLED but the adafruit neomatrix does not work for me 😦
kinda strange what happens. Maybe it has something to do with the arduino
Already tried the other connector. I can try pushing the connector
weird! why can't my desktop computer connect to my ESP32?
Computer cabled connection
ESP32 Wifi
what router settings do i have to change ?
what Arduino board are you using?
Esp32 s2 tft
and which camera is it? https://www.adafruit.com/?q=mlx&sort=BestMatch
Mlx90640
could you fill in more details in that forum thread, including the ESP32-S2 board you're using, and upload your program? Also closeup view of the board head on (as opposed to the side views) showing the connectors. I don't have one of these cameras (yet), but someone who does can try to replicate the issue. Are the cables you're using from us?
Yep
I'll add some more details
Crap I forget to post a head on pic
How long does the forum usually take?
Hello, I am trying to follow these Instructions https://github.com/painlessprototyping/byo_keyboard_code/tree/master/byo_sample_code/arduino but when I run any of the given code it says "Keypad.h No such file or directory", I don't have a lot of knowledge in this field and could use some help in fixing this error.
Can you find the ip address of the esp32 and confirm it’s on the same network as your desktop pc?
Same subnet*
did you also install the other required library? "HID Project" (see readme)
although not seeing it in that repo either, so not sure
disreguard, for the forums
Is it possible to include a .dat or .bin file in a sketch? I have some raw image/video data in a .dat file that I need to read bytes from.
I guess maybe making it into a header file would work
Yeah, that would be the usual approach if you don't have some sort of flash file system set up.
I might be able to use an SD card if i can find a spare one
I don't know how well it would perform in a header file though, it's a 544kb file
I mean, the obvious question to ask is whether your microcontroller has more than 544K of flash to begin with.
Gotcha. The ESP32 IDF has SPIFFS support for embedding a lightweight filesystem in the flash, though I don't know if that's surfaced in the Arduino libraries.
I'm having annoying uploading issues--my new Gemma M0 was working great, but now nothing will upload to it. I used to get a Windows popup as if it detected a new drive while it uploaded, now it doesn't do that. I didn't change anything that I can think of...
If your Arduino program is crashing, it will not successfully upload. Have you tried double-clicking and then uploading?
How can I define a byte array in a header file and reference it in my Arduino sketch? I've tried every possible solution I could find and it hasn't worked.
Define the array as arduino external byte[number]; In the header so things can "see" it.
Then
Create it arduino byte[number]; In the .cpp file so the compiler will build it and hook you up.
Is there a way I can add it in the header or another .cpp file? It's a rather long variable so I'd rather not add it to my actual code.
It's only added once. The extern one is just kinda' the sales ad for it. The one in the .cpp file is the actual variable.
IF you don't want it in your code, why are you adding it at all?
I just need to reference it from a different file as to not clutter the main file
Alright, I got it to work but the array was too big anyway lol
Hi, I just finished and ordered a PCB design with an AVR chip. While I'm waiting for it to arrive, I'm trying to read up on programming it. I plan to make a little WiFi-enabled debug clip with a Pico W and this guide: https://learn.adafruit.com/stand-alone-programming-avrs-using-circuitpython, but I'm a little confused by the references to "fuses". My understanding is that they're basically little tiny ways of storing super basic data about the program/hardware/something like that, but I'd love to learn more and refine that knowledge. Can someone explain, or drop a link to a resource? Thanks!
This will hopefully help https://www.ladyada.net/learn/avr/fuses.html @raven perch
Thanks, I'll take a look!
yes, I installed the HID-Project Library. Is it possible that I need another Library that isn't listed?
not sure. i took a quick look in those various repos and didn't actually find that header file anywhere. it may be a case of some aspect being out of date. a lot of it looked to be ~2 years old
I dont know where exactly I would find the keypad.h in the files but I browsed through the oder Versions a little bit (around the time the tutorial Was released) and couldn't find it there either
I found this in a different discord about this problem, can you identfy the error with the help of this conversation?
that looks like it is related to python, not arduino
Sorry, just saw this! The program isn't crashing. I get "Upload error: Failed uploading: uploading error: exit status 1" It sees the Gemma just fine, with the correct port.
you're trying to upload an Arduino program, right? Have you tried double-clicking before uploading? Then you need to set the Port in the Arduino drop-down menu, if it is not already correct. Then try to upload.
I think I'm being dense here, but... double click on what?
the reset button on the Gemma M0
Have you read the Learn Guide for the board, including https://learn.adafruit.com/adafruit-gemma-m0/arduino-ide-setup
Yep, but I missed the double-click! I was single-clicking! That was all it was, thank you so much!
Soo, this isn't exactly arduino related, but since there's no "help with microcontrollers" channel, I figure this is the most applicable spot.
I've got a board with a SAMD21 (specifically SAMD21G18A). I'm using all of the TC & TCC peripherals to generate PWMs on a pair of wave outs each. (That is, each of TCC0, TCC1, TCC2, TC3, TC4, and TC5 each make use of two wave out channels. The TCx are in COUNT8 NPWM mode, while the TCCx are in NPWM and RAMP1 mode, simply using a period of 255 so the behavior across TC to TCC is the same.) Through rapid DC adjustments, I'm generating PWMs that generate a sine wave via a half-bridge driver. While any channel pair is in use, the peripheral is left disabled, only enabled as it's needed. (Here's details on how my clocks & generators are setup: https://pastebin.com/6Jg4MSUe)
The issue I've run into seems to crop up around waiting for register synchronization, specifically after enabling any of the peripherals. It never occurs on the first enabling after POR, but occasionally on subsequent enables, the SYNCBUSY flag for that register gets "stuck" as 1, leaving the code running in an infinite loop.
Even attempting to read any of the TC registers via a debugger at this point, causes at at least the debugging session to fall apart. (I imagine the whole chip might fall over, but it's difficult to tell.) If the issue occurs with a TCC, the result of inspecting the TC register is the same! (That is to say, I'm able to inspect the TCC registers, but trying to look at any of the TC registers causes the debugging session to fail/etc.)
Things I've tried:
- Keeping the TC[C]s enabled and just "soft" disabling them by using 0 duty cycles. (The issue then manifests as getting stuck on the SYNCBUSY for the CC registers.)
- Narrowing use to only a single TC or TCC peripheral. (The end application will need to use all of them, but I'm able to reproduce the issue with just using one.)
- Underclocking the CPU/APB/peripherals
- Inserting a handful of
NOPs before the register sets. (the sets themself come after aBLXbranch instruction due to what i'm guessing is coming from C++ code to C code, but the CPU never leaves thumb mode.) - Ritualistic sacrifices in the name of Hecate
Trying to cut down the code to just a reproducible example seems to suppress the issue from occurring as regularly (to the point of seemingly not occurring in some cases,) so this has been incredibly infuriating to track down. Any thoughts or ideas would be very helpful! (Or if you can point to other good places to ask questions like this, too.)
- Have you looked at the SAMD21 errata? there is a SYNCBUSY stuck issue, though it has to do with waking from Standby mode.
you might look at the CircuitPython use of TC and TCC to see if your use parallels it.
Have you searched for the issue on https://avrfreaks.net ?
Yeah, the errata says that the SYNCBUSY issue should have been cleared up from HW revision E and later (I'm on G). That said, I'm not using any low power states (not even so much as a WFI,) and do issue SWRSTs during initialization. The fact that it's listed at all is what has me really worried that it may be a silicon issue of sorts.
I'll take a look at ciruitpython's impl now.
I did search there the other day, and did find at least one post that was relevant … but now when I'm trying to open the page, it's just redirecting me to /error (even though the content starts to load (https://www.avrfreaks.net/s/topic/a5C3l000000UhxNEAS/t182080)
Oh... apparently they "Retired" that entire fourm, and the link they give to where it's archived is broken too. https://www.avrfreaks.net/s/wiki?pageId=a5E3l000000LhsqEAC&pageName=Retired Atmel Forums%3A SMART ARM%2C Capacitive Touch Solutions%2C Internet of Things (Updated 3%2F10%2F23)
yes, I'm finding that pretty confusing
maybe search in the new forum above?
or post your query
I looked for that URL in archive.org, but didn't find it. Does Google have a cached version?
Not that I could get it to pull up; I'm guessing because their forum software is one of those that loads the posts after the page via javascript rather than actually rendering the pages. 🙃
I guess I should try this new microchip forum. I never had much luck with their old forums but maybe they've found some new life in this restructure.
i have found it very variable; if someone happens to see it and know what you're talking about, it can be great, but I have often ended up answering my own question
Haha, too true. It does look like they've imported (at least a large portion of) avrfreaks posts, which just reads odd when people reference it.
So I did just notice this in the errata, which the behavior described is effectively exactly what I see when my issue happens. But for the life of me I've got no idea what would kill off the APB clock 👀
i don't know either. Are you using an external crystal? Any messing around with the clock sources or the PLL's? Is there any chance noise from your I/O pins is getting into the power supply? (e.g. switching transients?) Do you use the USB clock as a synchronization source?
Here's the clock setup:
- XOSC32K is in use, providing a 32,768 Hz crystal input to XIN32 & XOUT32. That crystal is used as the input to GCLK Generator 1 with no divider.
- The FDPLL uses XOSC32K as it's selected input with a DPLL Loop ratio of 2928 (integer part) 11 (fractional part,) providing a 96,000,000 Hz output.
- GCLK Generator 0 (GCLK_MAIN) uses FDPLL as input, with a divider of 1, keeping the output as 96,000,000 Hz.
- The Main CPU clock uses a divider of 2 (CPUDIV reg value 1), providing a 48,000,000 Hz clock to the CPU.
- APBA, APBB, and APBC all have their dividers as 2 (APBxDIV reg value 1), sharing that 48,000,000 Hz clock.
- GCLK Generator 7 uses FPDLL as the input, with a divider of 2, producing a 48,000,000 Hz clock.
- TCC0, TCC1, TCC2, TC3, TC4, and TC5 all use GCLK Generator 7. (According to 37.6, TCC0, TCC1, TCC2, and TC3 are capable of clocking at 96 MHz, but 48 MHz was chosen to keep parity with TC4 and TC5.)
I do worry about power on the board in general, because of the voltages I'm dealing with. (my halfbridge drivers are between a +9v rail and a +48v rail, the chip's +3.3v comes from a LDO on the +9v) I've tested and found the issue happening with both the higher voltage rails shut off via mosfets before they get to the output stages, so I'm relatively sure it's not the cause, but can't completely rule it out yet.
USB pins are exposed but unconnected.
do you have some board like an Arduino Zero or an Adafruit SAMD21 board that you could just test the code on, with the pins unconnected? (Sounds like doing that on your custom board might require desoldering or something)
maybe not with the right crystal
I've got one on order, should be here Friday I think 🙂
I imagine it will be one of those. Coworker was just saying they were ordering some stuff from adafruit and i said "get me a samd21 board" 😅
we have a zillion, hopefully it is one with a crystal (on some we don't have a crystal for cost reasons)
I sent him a message to ask, but even without one it should prove useful if nothing else just to have a completely different environment to test in!
I'm trying to edit the "ssd1306_128x32_i2c" example to use with the 64x32 0.49" SSD1306 and it doesn't seem to want to cooperate. I'm using the Feather ESP32-S3 No PSRAM board to test it and my guess is the wiring or pins I'm using are wrong? SDA and SCL are connected to the SDA and SCL pins on the board, which I think are pins 3 and 4. Here's my code to try to initialize it:
TwoWire wire = Wire.begin(3, 4);
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &wire, OLED_RESET);
I also changed the resolution accordingly
no need to call Wire.begin() like that
the I2C pins are set as part of the board define in the BSP - they are the ones labeled SCL and SDA on the Feather:
https://learn.adafruit.com/adafruit-esp32-s3-feather/pinouts
Try this:
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
That's what the example had by default and it didn't display anything, maybe the address is different for 64x32?
The examples show 0x3C and 0x3D
Also for some reason my computer can't send or receive serial info, it can only upload code. I don't see any output. Last time i used Arduino I remember i had to change the IDE's baud rate but i can't find that option.
I'm also not sure it's able to hard reset my board after uploading code, so maybe that's why?
okay thanks, that means there is a Library missing in the instructions, right?
missing somewhere. but not obvious from a quick scan of the guide and other docs.
@stable forge after going back and fourth with support over my thermal camera, we have determined it was the software, not the hardware.
now the fun part that everyone loves
✨ debugging ✨
okay, thank you for the help
has anyone ever heard of whether or not a person is touching a qt cable affecting an I2c protocol??
I’ve heard of bus capacitance causing issues for faster i2c buses, and though I’ve never heard of someone fixing it by pinching it, touching a wire could theoretically reduce that…
Have you tried reducing the i2c bus speed?
Touching a cable having an effect is usually due to mechanical issues (poor solder joint, etc.), an impedance problem (weak pull-ups in the case of I2C), or a timing problem (going too fast for the length/impedance, often)
You can manage bus capacitance issues by using stronger pull ups
Well, up to a certain point
If combined parallel pull ups down to 1k don’t fix issues, use a buffer to break up the line
I am using arduino-cli to hack an adafruit:samd:adafruit_feather_m4_can. When I set up with "arduino-cli core install adafruit:samd --additional-urls https://adafruit.github.io/arduino-board-index/package_adafruit_index.json" it installs about 1.5 Gb of files in ~/.arduino15/. Much of it is in ~/.arduino15/packages/adafruit/tools, especially 500 Mb each in arm-none-eabi-gcc/ and CMSIS/. Do I need all this? Is it possible for me to trim the install? (or am I installing too much stuff to begin with?)
I guess there's a bunch of files in ~/.Arduino15/staging/ too (about 400 MB) that probably aren't needed after initial install. I am wondering how I can do the equivalent of a "make clean" after I install arduino-cli so I can only keep what I need to do my work.
i was actually gonna try that today
i could only find two possible lines that could be the problem
mlx.setRefreshRate(MLX90640_8_HZ); is set to 2 hz in a test program that doesnt have the touch issue
Wire.setClock(1000000); // max 1 MHz no clue what this line does but it isnt in the test script that i got to work without touch
likely a timing problem
1MHz is on the high side for off-board I2C. Try commenting out the Wire.setClock(1000000) or change the value to 400000?
ah, ok
ill try that after i lower the mlx refresh rate 👍
If that is the issue, but you want to keep the high speed, consider https://www.adafruit.com/product/4756
interesting
this could help with my fps
thanks!
ill update you when i get back to my pc
Could someone possibly help me with trying to wire a Tft display to my mkr 1010wifi?
This is the tft display I am using. Everything I find online about hooking these up have differences in the pin outs and with the boards they use. Most use Arduino uni but for what I’m trying to do I need to use the 1010wifi. If anyone has any ideas please let me know
lots of tft displays I see wired online have an SDA off the display and mine doesn't have that for example
SDA will be your MOSI pin
It’s not great nomenclature using SDA but it’s basically your serial data from your microcontroller or host going to the display
SDA is a lot more confusing in the context of an SPI device like this one. Looks like the mkr wifi1010 has default spi pins on d8 (MOSI) d9 (SCK) and d10 (MISO). VCC and gnd evidently go to your +3v3 and GND pins, and everything else can be assigned a gpio of your choice.
LITE is best connected to a PWM-capable pin if you want brightness control.
it fails to get an image from the camera if it is 400000
wait
it works now
i commented out the line
it finally works
LETS GOOOOOOOOOOOOOOOOOOO
it is stable at up to 4hz
any clue on how to horizontally flip the image coming from the mlx 90640 thermal sensor?
float t = frame[h*32 + (31-w)];
I believe that invert it horizontally
testing
Anyone have a good link to a guide for getting the feather huzzah to appear on a Mac?
it works, thanks!
I’m on a recent so build and I have an Intel chip. So as far as I can tell the legacy concerns with arduino are not a concern
But, alas, no com port in the arduino IDE
does it need to be placed in boot mode
You may need to install a CH340 driver to talk to the onboard USB-serial chip on the Huzzah
I think yes - and I’ve tried doing so. I read in the Adafruit guide to press 2x quickly.
Yes - I think that is correct. However I don’t think that’s the driver I saw last night on the guide. I will research and report back.
I have tried “the driver” solution again today. Where are @north stream you seeing CH340 as the driver?
Order #:
2974505-8934427858
Product in Question:
https://www.adafruit.com/product/2680
My OS:
Ventura 13.1
Processor:
Intel
Silicon Labs Driver:
CP210xVCPDriver
Arduino IDE:
2.0.4
***Yes, I am using a known "good" USB cable for data and power.
OK you've signed up for Adafruit.io and you're ready to build something cool and Internet-connected. All you need is this starter kit which will get you going with lots of parts that ...
@real monolith that feather is probably using the CP2104. is the mac responding at all when the feather is plugged in?
No - nothing as far as I can tell
I’m just looking at the desktop and my finder window - should I be doing anything else?
look for a COM port to show up in device manager (whatever that is on mac)
that part has nothing to do with the arduino ide
the mac only sees the CP2104, so if driver is good, cable is good, etc. - should at least get a COM port to show up
On Mac in the terminal, you can use ioreg -p IOUSB to show your USB device tree
They're not COM ports on a Mac- they'll be in /dev like on linux/unix
there have been some known issues with the CP201x VCP driver and some version of mac os
Not surprising heh
If you are using Mac OS 10.12.6 (Sierra) and you cannot upload with the latest Mac OS VCP driver, please try the legacy v4 driver below. Note you will need to uninstall the v5 driver using uninstall.sh (in the driver package)
that's from the huzzah setup page:
https://learn.adafruit.com/adafruit-feather-huzzah-esp8266/using-arduino-ide
but seems probably dated at this point
Ah, yeah that's a pretty old one. And @real monolith said they're on Ventura
I don’t want to get off topic right now - but it seems so, and why isn’t this said at all on the Adafruit site?
Yeah, the guides on this are like 2015…
it is. in the warning call out above.
I don’t read that sentence the way you do
Here's what I would do:
Run ioreg -p IOUSB with the device unplugged, then plug it in and run the same command to see if the device tree changed
That reads “if you are on this specific version (maybe could be interpreted to be mathis version or before) then you will have an issue - use legacy driver”.
I’m using newer-
No difference
So then the CP2012 either isn't getting power, doesn't have the data lines connected, or is nonfunctional
do you have access to another PC as a quick way to test?
that'd work
Okay give me a min to set it up
don't really even need to worry about drivers
Yep, dmesg will show it plugging & unplugging on the Pi
^^ yep
dmesg -wH if you want to be fancy
Okay I’m booting it up -
the -w makes it sit and print new msgs
Step 1 run > dmesg from terminal with no device connected
And then run it again?
With it plugged in?
nope. just run with -w
before plugging in
then plug in
and watch output
[Apr14 21:27] usb 1-1.1: new full-speed USB device number 3 using xhci_hcd
[ +0.137332] usb 1-1.1: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[ +0.000029] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ +0.000020] usb 1-1.1: Product: CP2104 USB to UART Bridge Controller
[ +0.000019] usb 1-1.1: Manufacturer: Silicon Labs
[ +0.000016] usb 1-1.1: SerialNumber: 0136E377
[ +0.099417] usbcore: registered new interface driver usbserial_generic
[ +0.000064] usbserial: USB Serial support registered for generic
[ +0.007199] usbcore: registered new interface driver cp210x
[ +0.000082] usbserial: USB Serial support registered for cp210x
[ +0.000120] cp210x 1-1.1:1.0: cp210x converter detected
[ +0.003350] usb 1-1.1: cp210x converter now attached to ttyUSB0
nothing
as in the command runs and i get a long response, and when i plug in the 'feather' i dont get anything new
ok. should have printed new stuff. like above.
can confirm it updates for usb 3 and usb 2 ports
is anything plugged in to the feather other than usb cable?
two feather esp8266's?
yes, correct
if you have access to the other one, go ahead and try this same check
with that one
i get a message with the second!
it has a lipo batter pack on it - i have it inside it's project enclosure already
should be ok, as long as you got some messages, it at least means the feather is being seen
this was with same USB cable between the two tests?
yes correct
but no "com" ports in arduino ide
but i now get a SLAB_USBtoUART appear
based on the pi dmesg test, getting no messages, it seems like there's a hardware issue with that one feather
not getting COM ports could be for something else - like driver issues
but it should have at least generated messages on the pi as the other feather did
Okay that makes sense re one board being seen by the pi and the other not (one of them is defective)
yep. we can replace it. but can't do that here through discord. will need to post in the forums:
https://forums.adafruit.com/viewforum.php?f=57
okay i will jump over there in a moment
you can ping me with link to post when it's up and i'll respond there
On Mac OS 10.13 and higher, in addition to installing, you will have to give the CP2104 kernel driver permission to load. You can find out if you need to give additional permission by visiting your Security & Privacy settings system preferences screen after installing and looking for the message that says, 'System software from developer "SiLabs" was blocked from loading', like in the picture below.
that clearly states "on mac OS 10.13 and higher"
which is why I don't think your reading of the lower text, regarding the legacy driver is correct
I am definitely okay being corrected though.
@wise stone are you still there?
this says to use version 2.5.1
@real monolith looks like this post is here maybe?
https://forums.adafruit.com/viewtopic.php?t=200600
however, it does not say to what software this is refering
if it's referencing the arduino IDE - the latest stable build is 2.0.4
probably the Adafruit IO library
yes that is me - I'm "poundCake"
Just checking back on my last question - if the adafruit site is saying "be on 2.5.1 or above," how can this be done if the arduino IDE is 2.0.4? (assuming the 2.5.1 is referencing the arduino IDE and not something else that i'm missing)
I don't want this to sound rude - because I don't mean it to be - but it could be written clearer on the site
instead of
If you want to use this board with Adafruit IO Arduino - make sure you're on version 2.5.1 or ABOVE.
it could say
If you want to use this board with Adafruit IO Arduino - make sure you're on version 2.5.1 or ABOVE of the Adafruit IO Arduino software.
good thing to submit a guide feedback - can do for any guide
see link in left hand nav
I think this is confusing because no where previously, or immediately thereafter is there any mention of Adafruit IO
I have submitted several blatant errors there, and I have not received a reply, nor are there updates to the guides
there is no reply mechanism. but guide author will get notice.
I don't want to seem as rude, because I'm not, and I think this can get lost in typing... but that part of the guide for example is just clearly out of place
and it seems ... weird that it's there
regardless, I'll submit feedback. I see that this guide is currently maintained so maybe someone will read it 🙂
thank you so much @leaden walrus and @zinc mortar
I don't remember where I found that, that might have been a different board. It looks that that product uses a CP2102 as a USB-serial bridge.
I think I'm heading in the right direction - thanks everyone who chimed in 🙂
Hi all. I have a weird scenario. A client is asking to retrofit a project that uses 9 photo-resistors. Due to the nature of the existing setup, switching to another sensor type is not possible, so we have to stick with photo-resistors. I’d like to use a Leonardo but there are not enough analog inputs to cover all 9 sensors. Is there a way to bus them all together in series and read the collective value across all 9 from a single analog pin? We don’t need to know the value of each sensor, just the collective value of all 9.
Maybe an analog multiplexer ? you can choose which channel to read from via select lines and then read each sensor one by one
Definitely considered that too. Just figured since we only need the overall value, I wondered if there was a simpler solution (other than getting a Mega or larger board). Essentially we only need to know how many sensors are receiving light input vs if they’re covered/in the dark. I’ll look into a multiplexer more though! Thanks!
You do need analog value right ?
If yes , then you do need an ADC somewhere to make measurement , even if you want a collective measurement
but if you just care about if they are fully in light or dark , then maybe you could just hook them up to digital pins and read the value 0/1 there
Right. Definitely! I’ll give that a try too. I’m limited with both digital and analog pins for this problem and others, so it’s seeming that a larger board may solve some of these issues.
One last suggestion if you have decided to use them as digital inputs - maybe consider a PISO shift register. that way you could read 8 (or more) sensors with just one digital serial input
That’s more along the lines of what I was thinking! Much appreciated!
They're just resistors, so you could put them all in series and read an analog value from the total resistance if you want. It might be a little tricky to interpret the value, but it sounds like you don't need a ton of accuracy.
Looking for help with this board
Have Mac Arduino 1.8.19… the latest RP2040 board package…. The library for Pico-PIO-USB
But getting an error when trying to compile
Ahhh figured it out .. you have to make a selection in Tools to make a change
Yeah the way this is set up, there won't be much flux with the values
I did think of putting a comparator on each photosensor to provide a fixed voltage, then using resistors to encode each sensor with a different voltage (allowing all the sensors to be queried at once with a single analog pin), but that's a lot of chips, and will give confusing results if more than one sensor is triggered at a a time. Therefore I think a shift register or GPIO expander is likely a better solution. While such an approach is slower than directly reading GPIO pins, ordinary cadmium sulfide photoresistors are fairly slow devices anyway, so that doesn't seem like much of a drawback.
Have you see the photoresistor camera?
6x8 array of photoresistors uses to create an extremely low-resolution camera.
Can someone tell my why my arduino nano sometimes calls the UpdateRGB(FadeDelay); before the NRFSendFeedback() function? there is a Serial.println() line in NRFSendFeedback(), which tells me when the function is called (for debug) but it seems like sometimes its called after the LED's got updated (faded to the new value, which takes a sec or two) if (ReceivedMessage[0] == 301) { NRFSendFeedback(99); if (ReceivedMessage[4] == 0 && LEDstate == 1) { RGBVals[0] = 0; RGBVals[1] = 0; RGBVals[2] = 0; UpdateRGB(FadeDelay); LEDstate = 0; } else if (ReceivedMessage[4] == 1 && LEDstate == 0) { RGBVals[0] = NewRGBVals[0]; RGBVals[1] = NewRGBVals[1]; RGBVals[2] = NewRGBVals[2]; UpdateRGB(FadeDelay); LEDstate = 1; }
}
cant help without full code.
its long af but here you go 🙂 https://pastebin.com/SNwywgxT
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.
Ok , I cant see any obvious problem.
What i think might be happening is, say you receive a message which satisfies the else if() condition , at which point
else if (ReceivedMessage[4] == 1 && LEDstate == 0) {
RGBVals[0] = NewRGBVals[0];
RGBVals[1] = NewRGBVals[1];
RGBVals[2] = NewRGBVals[2];
UpdateRGB(FadeDelay);
LEDstate = 1;
}
this block will get executed
and after that you receive a new message immediately which satisfies the above if condition and then this block gets executed
if (ReceivedMessage[0] == 301) {
NRFSendFeedback(99);
if (ReceivedMessage[4] == 0 && LEDstate == 1) {
RGBVals[0] = 0;
RGBVals[1] = 0;
RGBVals[2] = 0;
UpdateRGB(FadeDelay);
LEDstate = 0;
Try adding that int variable in your serial.println() in the NRFSendFeedback() so that you can see which condition is calling that function
ok seems like you're right. it only happens if i press on ReceivedMessage[4] == 1 right after off ReceivedMessage[4] == 0. which wont happen often so no problem. Thanks
np 👍
Why that processor? There are so many available to choose from. Wouldn't it be better to get one that suits your hardware?
Definitely haha. The Leo is the most robust HID device available, so it covers most of what we want to do. That was why we were avoiding having to go with a Mega, since I've not had much luck getting the Mega to work as an HID
yeah, mega wont work as an hid.
Teensy?
wouldnt pi pico be a cheaper alternative ? Because a whole teensy for reading some photo resistors sounds kinda overkill
Whatever, just saying there are a lot of choices.
can you get rid of the bootloader on a arduino zero
You should be able to use the SWD connection to write the entire flash with your own code if you like. You would presumably build it with a different tool set than Arduino (although you could leverage its internal tool chain)
quick question, I found that Arduino IDE use different programmers for different avr chips, is there any reason for that ?
for example, programer arduino for 328p; wiring for mega2560; avr109 for mega32u4
It basically boils down to the protocol used to program the chips, which in turn depends on which bootloader is installed. As the ecosystem evolved, adding new chips and designs, along with improvements in bootloaders, different chips generally started with whatever bootloader (and protocol) was current at the time of introduction, and then often stayed that way, so as not to break older designs. You can, of course, install a newer bootloader into an earlier chip, and shift to the matching protocol. Generally this is more trouble than it's worth, but for an early chip like the mega168 with its 2kB bootloader and limited flash, it might be worthwhile to install one of the 512-byte bootloaders in order to free up some flash for your program.
I have a bunch of older Adafruit 5 volt and 3.3 volt Trinkets laying around (with the older micro USB connector). I was using a 5volt Trinket and uploaded the blink sketch, and set the on and off delay to 250 milliseconds. This should give me a LED blink rate of 2x per second. From within the Arduino IDE, I set the board to "Adafruit Trinket (ATtiny 85 @ 16Mhz). The blinking rate of the LED seemed too slow, based on the frequency I set the blink rate to. I changed the Arduino IDE board to "Adafruit Trinket (ATtiny85 @ 8Mhz) and then, the blink rate seemed correct. Is the default running frequency for the 5volt Trinket 8mhz? And if it is, how can I set the board to run at 16mhz? For the older 3.3volt Trinkets, what is the default frequency and what is its maximum frequency that it can run at.
Did you set the delay() times to 250ms? Note that since there are 2 delays per blink, that would yield a blink period of 500ms (2 per second)
@livid osprey @gilded swift thank you both for you’re replies and sorry for not getting back to you sooner. I did end up getting the tft to work so thank you both for the help and replies! Much much appreciated 😊
When I choose the 8Mhz Trinket board setting in the Arduino IDE, I get the 2 blinks per second, since I set both the on and off delay to 250msecs (which is correct visually). But, when I choose the 16Mhz Trinket board, the speed is half. I believe the 5 volt Trinket is supposed to be a 16Mhz version, according to the Adafruit store. Hence the confusion.
I don't think those Trinkets use crystals, so I guess you'd have to read the fuses to see how the chip is configured
Are you using https://www.adafruit.com/product/1501? The internal oscillator defaults to 8 MHz, but can be doubled in software…. Somehow.
The 5v Pro trinket with the atmega328 would default to 16MHz, if that’s what you’re using.
Speed being halved when selecting double frequency is normal, as your delays are counted by clock cycles, and with less speed than expected, your compiler is asking for more clock cycles than you’re supposed to have with your settings.
Howdy all. A much as I really do enjoy Arduino/CP/Adafruit (love it), you sure can have frustrating days. Just spent all day after church trying to make CP work with a ATTiny1616 and ESP32 Feather S2 TFT - but the Learn guide pins definitions are wrong (I guess). So, let's do Arduino. Fine. Kept getting "esptool.exe" not found. ESP32 WAS working before in Arduino. And, of course, on my PC, a simple compile takes like 3 minutes...So I finally found where someone in the forums said ESP32 quit working after upgrading the Arduino IDE, which I had to 2.0.4. My mistake... So, another 10-15 minutes uninstalling and reinstalling the ESP32 Board. Upload works now.
if you think there's an issue with the pins in a guide, could you explain the issue ? It should be fixed or clarified in the guide
which language is recommended for ESP32 circuit python or arduino ide
The third major choice to also consider is the native ESP-IDF, which is more complex but more powerful.
Using this one.
Yep, those default to 8MHz.
Thanks Neradoc. This is the guide:
https://learn.adafruit.com/adafruit-attiny817-seesaw/analog-in
No matter what pin I tried to read analog, it always said "invalid ADC pin"
Well, never mind... after getting back to trying CP again on the ESP32, I did circup update --all which updated adafruit_seesaw, now it works fine. Should have known... I'm just dumb. I did the circup update on the board maybe a month ago, so I thought it was good. Oh well. All works great now, even my neo strip.
yeah I was looking at the library and was thinking that might be the issue, the pin mapping for the attinyx16 boards was fixed last week
Cool thanks!
I am looking for some information on the pinouts and pin labeling on the tft display on the pyportal, the pinout page "https://learn.adafruit.com/adafruit-pyportal/pinouts" says this "YD on board.TOUCH_YD or Arduino A4
XL on board.TOUCH_XL or Arduino A5
YU on board.TOUCH_YU or Arduino A6
XR on board.TOUCH_XR or Arduino A7", however it says I can measure between X+ and X- (xl and xr here) but the pinout diagram picture thing says the pins are A2(YD),A3(XL),A4(YU),A5(XR), I got so many different choices and all I want to do is be able to somewhat map my touch on the screen in one of four quadrants
Hi! I'm having some trouble with my AirLift Coprocessor breakout board where after I have uploaded new sketch code on my Arduino several times without powering down, the AirLift gets stuck in a constant rebooting mode when it tries to reconnect to WiFi. I am using the latest firmware (1.7.4) and WiFiNINA library (1.3.0). All Adafruit versions. I wrote a little sketch, which is Teensy microcontroller specific, and I have a detailed post on the Adafruit forum (https://forums.adafruit.com/viewtopic.php?p=969038#p969038). I'm wondering if anyone is experiencing something similar?
I tried a few more tests here just now, and I have found that it is related to the voltage supplied to the AirLift. In my previous tests I was powering everything at 3.3v, and after the 3rd-4th sketch upload/reboot the AirLift would go into a continuous reboot. However, if I change to powering everything at 5v, then all the problems disappear. The AirLift will connect to the WiFi with every reboot. So, even though the AirLift product page (https://www.adafruit.com/product/4201) seems to suggest that 3.3v or 5v can be used, it appears that only 5v can be used when restarts are required. I can't explain why, I can only report what I am seeing. I'd love to know if anyone else is experiencing this issue when using the AirLift at 3.3v. Even though my sample sketch is Teensy specific, you can use it for any microcontroller by removing the reboot code, and then uploading it to the microcontroller multiple times using the Arduino IDE.
I was vaguely wondering if it was a power supply issue, but I too don't know why it only appears in that situation. Perhaps some additional power supply stiffness (capacitance?) might help it ride through the usage spikes. Thanks for following up and explaining what you found!
It might have to do with the regulator not liking 3.3v because even the datasheet uses 4.3v as its test characteristic to output 3.3v
https://www.diodes.com/assets/Datasheets/AP2112.pdf
Interesting. I don't know why 3.3v would not work only after several reboots though.
how man ma is your power supply for 3.3v
the learn guide does say it can be powered with 3.3v, but needs 250mA https://learn.adafruit.com/adafruit-airlift-breakout/pinouts
regulator data sheet does say it will operate on 2.5v - 6.0v
but if the input 3.3v supply voltage is sagging, that could be trouble
anyone had any luck reprogramming the ATTiny1616-based seesaw breakouts with megaTinyCore's SerialUPDI programmer? i've got a 2.2kohm resistor wired between a USB-to-Serial cable's RX and TX, then connected the cable's RX to the breakout's UPDI pin through a 470 ohm resistor and when trying to flash a basic blink sketch, it just tells me it's failing to sync with the programmer
granted i did try getting that figured out late last night and haven't had time after waking up to play with it more today since i've got to run to work, but still figured i would ask in case someone who's done it before notices anything dumb with my setup that asleep-me didn't catch
I have a problem, when the ws2812 5v strip is turned off for a while, the first leds turn on. install a 10v 2200uf capacitor. how can I solve that?
in the video I turn on the light in another room and ring the doorbell. It affects the led strip.
Possibly the data line is left floating if the LED controller is powered off, so the strip is picking up noise on that pin and interpreting it as a control signal. Maybe a pulldown resistor would be helpful?
@loud mural @safe shell I'm using this Sparkfun power supply (https://www.sparkfun.com/products/13032) to power my breadboard to run my Teensy and the AirLift. Specs say it provides 800mA current. I've never had a problem with power using it before.
my only other concern that I was wondering was if the regulator is after vin on the airlift and the voltage drops a little through the regulator, i couldnt tell if its bypassed under a 3.3vin or not.
The schematic seems to suggest that you could try powering through the 3vo pin and bypass the regulator but it's probably not a good idea if the input isn't stable.
And it might act weird because some parts aside from the regulator is connected to VIN
My guess is that there's a significant enough voltage drop that just crashes the airlift once it draws enough power at 3.3v. Enough to keep it awake, but not working.
And I know these airlifts (or esp32s in general) draw quite a bit at startup that tests flaky or unstable power connections.
Pretty sure after looking thru the PicoDVI Adafruit Fork examples, that there is not a way to implement the DVI breakout board with the Pico. Only the Feather, Pimorini, Sock... seem to be tested, but not with the breakout of course.
I made my own board, but looking at the product page and the common_dvi_pin_configs.h file, I believe you need to use pico_sock_cfg
static const struct dvi_serialiser_cfg pico_sock_cfg = {
.pio = DVI_DEFAULT_PIO_INST,
.sm_tmds = {0, 1, 2},
.pins_tmds = {12, 18, 16},
.pins_clk = 14,
.invert_diffpairs = false
};```
GP12 to D0+
GP13 to D0-
GP14 to CK+
GP15 to CK-
GP16 to D2+
GP17 to D2-
GP18 to D1+
GP19 to D1-```
Since it's pio, the tmds pairs only list the first pin. 12/13, 18/19, 16/17 and for clock 14/15. I'd have to go back and look into the code, but I believe invert_diffpairs false is correct. If it doesn't work, you can create a local instance and change it to true and pass that to the constructor.
hello! I get this when trying to upload to my adafruit ESP32 feather board. Does anyone know what might be wrong?
I only have one RESET button on it so I get confused when I search for a solution on the internet and it tells me to hold the BOOT button and then pressing the RESET button?
Other tutorials with boards with only one button tells me to just press that only button and then it should work, but it still don't
It seems like it gets started, but then the data stream gets lost. I'm guessing either a mechanical problem (loose connection, poor power supply), or another process on the system is trying to attach to that serial device and "stealing" the data, or something is resetting the driver or bus partway through.
Ah ok, I dont think it is connection or power problems since my ESP8266 boards work fine. But I know the ESP32 draws more power, but uncertain that this jump in power draw is big enough to cause the problem.
I have not confirmed or denied the fact that another process could be stealing the data as u mention, but I have read that this could be the case aswell. Have just not yet manage to figure out how to track this down if it were to be the case:/
You don't happen to have anything connected to pin 12? It should look like this
Serial port /dev/ttyUSB1
Connecting.....
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c8:f0:9e:4b:6d:88
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x0005dfff...
Compressed 18960 bytes to 13073...
Writing at 0x00001000... (100 %)
Wrote 18960 bytes (13073 compressed) at 0x00001000 in 0.4 seconds (effective 365.9 kbit/s)...
To me it looks like the chip isn't going into boot mode. That is supposed to be done by one of the transistors next to the CP2104 chip. They are the three pin devices next to the square chip. One is connected to reset and the other is connected to GPIO0 (Boot).
The reason I ask about pin 12, is that can cause the module to fail to boot if it is pulled high...
Ok, yeah I don’t have anything connected to pin 12, but I also havn’t checked if it is pulled high or low
Make sure you don't have another connection to COM5 open, say in a terminal program like putty or Tera Term
Yeah I have no other programs open able to access the COM port
which esp32 board is it, and does platformio have the correct board set? We don't use platformio, so this is not familiar. also we can't see the command line. Are you sure the COM port is correct?
you might try the same thing with plain arduino
note that there is Feather ESP32 V2, and Feather HUZZAH32. These are different boards.
Yes, I have selected ”Adafruit ESP32 feather” in platformio. I have also tried getting help from this discord server before regarding the same issues I had back then (about 5 months ago). And then I used the normal arduino IDE. Now I’m trying again with visual studio since someone from either this server or arduinos own discord server mentioned that it had worked for them when using VS and not arduino IDE
Ever since I bought the boards about 2 years ago I have not managed to get them to work (first I bought 2 adafruit esp32 breakout boards https://www.adafruit.com/product/4172 and when they didn’t work I thought it was due to the external usb serial hub so I bought 2 adafruit ESP32 feather boards https://www.adafruit.com/product/3405 )
Squeeeeze down your next ESP32 project to its bare-bones essential with the Adafruit HUZZAH32 Breakout. This breakout is basically the 'big sister' of our HUZZAH 8266, but instead of ...
Thank you mucho! I'll set this up today and try it! I have the breakout already which works just fine with the pre-compiled UF2's on the Pico.
im trying to connect a tp4056 to a 3.7 battrery so thaat i can then connect it to my wemos d1 mini. stupidly i ordered the tp4056A instead though which dont have pads to connect to an output. is there anyway to modify it to connect to my wemos d1
Working perfectly! 16bit_hello. No changes to code, except "Pico_sock"... It's the same pins config as shown on this Learn page for the breakout:
https://learn.adafruit.com/adafruit-dvi-breakout-board/overview
Thanks!
All I can say would be to start with the simplest examples here: https://learn.adafruit.com/adafruit-huzzah32-esp32-feather/using-with-arduino-ide. You can clean up the COM ports in case they are causing trouble, using the USB cleanup tool mentioned here: https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#device-errors-or-problems-on-windows-3094694
If you have another computer to try, even a Raspberry PI, you could try Arduino on that, to see if the issue is your particular Windows computer.
Okey, thanks for all the help!
I'm using a Joy Featherwing with a Teensy 4.1 and when I run the example "joy_featherwing_example" arduino code: the analog stick works fine and prints out coordinates when moved, but the buttons are acting like they are constantly being pushed and spam print messages stating as much
Anyone know how to fix?
Hey All, not exactly an Arduino question, but I'm not sure if there is a better channel here. I'm trying to find a working example for Raspberry Pi Pico W MQTT client, using the lwIP libraries included with the C/C++ SDK. Does anyone have a resource I can reference?
This is the gist of what I have, but I think I'm doing something wrong.
I get a success result from mqtt_publish for 4 iterations, but then start to get a failed result, and the messages never make it to the broker.
does Adafruit have separate reference doc for standard Arduino functions?
because Arduino reference doc has board-specific info
Generally the functions that aren't tagged by board are the standard ones.
The Arduino programming language Reference, organized into Functions, Variable and Constant, and Structure keywords.
The Arduino programming language Reference, organized into Functions, Variable and Constant, and Structure keywords.
analogWrite() works fine with 12 bit data on a SAMD51, at least on the DAC ports.
i'm trying to get the Adafruit-MCP23017-Arduino-Library working with platformIO and a pi pico. are there any examples using this library with hardware addressing that i can be pointed to? i'm using the MCP23S17 device. thanks!
doesn't look like their is a specific example:
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library/tree/master/examples
but here is the PR that added it, which might be useful:
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library/pull/78
i see, thank you! some better docs would be helpful. 🙂
Trying to follow the guide and am getting and error with the default example, https://github.com/SwiCago/HeatPump, https://chrdavis.github.io/hacking-a-mitsubishi-heat-pump-Part-1/
I recently installed 4 heat pumps in my house to provide heat in the winter and AC in the summer time. While the weather year round in Seattle is fairly pleasant, there is about a month in the summer where life is miserable if you don’t have air conditioning - a rare luxury in residential homes in the Pacific Northwest. I had 4 Mitsubishi MS...
Apparently whatever target CPU you have has USBCDC as the type of Serial, and the library expects a type of HardwareSerial *. It's odd for the library to have such as specific type (I would have expected a generic type such as Stream), and I'm unsure what USBCDC presents. You could, I suppose, try casting it and seeing what happens: hp.connect((HardwareSerial *) &Serial);
That got it to compile, I am now getting the error above. I am using a Lolin s2 mini esp32 device.
I don't think that's an error, it's just saying that setup can't start the chip automatically for you, so press the reset button to restart it.
Under tools there are also options for USB CDC on boot and USB DFU on boot. Do you know what these are?
CDC is "communications device class", basically supporting a serial port via USB. DFU is "device firmware upgrade", which is presumably used to flash a new program onto it.
Thanks!
i'm struggling with docs while using busio and the mcp23x17 library with the pi pico. i need to change the MOSI, MISO, and SCK pins used, but i'm not getting it. i can't find any examples demonstrating this. i've been through the githubs with the libs. is it possible to change these pins with the pico and the adafruit libs? thanks!
i owe you some beer, or something. thank you!
Helloooo, I could not decide which channel to post to, but I am quite the noob and trying to design a simple circuit for controlling 12V LEDs with an arduino nano.
I believe I will be using a 12v power supply to power the lights and arduino. The 12v will be stepped down using a L7805cv voltage regulator to power the arduino. The 12v power will go straight to the LEDs. This will need to fit in a nice little case (3d printed) and I was wondering how I should physically be splitting the 12v power from the power supply? Since the 12v will power the LEDs and will also go to a step down for the arduino, I will need to split this somehow. Obvious solutions are to solder two wires from the 12v DC connector, or perhaps splice a wire to the 12v and send it to the step-down? Though these seem messing and even potentially a heat/fire hazard. Anyone have better suggestions?
I'd probably just solder two wires to the connector.
Yeah, that seems reasonable
Thank you! I mostly just need reassurance that I am not doing something terribly wrong haha
Hello,
I am using the Adafruit sh1107 screen and looking to remove the splash screen.
https://github.com/adafruit/Adafruit_SH110x/blob/master/Adafruit_SH1107.cpp
I can see there is this #ifndef SH110X_NO_SPLASH so at the top of my code before the includes, I have put #define SH110X_NO_SPLASH yet the splash screen still shows. I feel I am missing something rather obvious, any pointers?
Thanks
You may need to put the #define before the #include
Is it possible to screenshot/get a pdf of my code on the IDE?
Is anyone familiar with the w5500 ethernet shield library? There was a mention to use the standard Ethernet library since the Ethernet2 library is deprecated. The Ethernet library does not have the utilities functions however. I'm trying to make a controller that will have several sockets/ports and would like to see if there's any way to do that with the Ethernet library where it'll close a socket if no data is sent/received for a certain period of time. Any help would be appreciated
Most operating systems offer screenshot functionality. Also the saved files are just text files with a .ino extension, you can open them with a text editor and print to PDF.
looks like the W5100 utilities also seems to work with the w5500 board, at least from initial testing
I'm trying to figure out how to manually close a socket and found this datasheet: https://cdn.sparkfun.com/datasheets/Dev/Arduino/Shields/W5500_datasheet_v1.0.2_1.pdf . Not exactly sure how/if I can use the commands there in the Arduino utility library: Sn_CR 0x08 looks like the right command, but how would I actually write that in code for say, socket 0, or socket 1? Would it be something like W5100.writeSnCR(0 , 0x08);
Why not call stop() on the EthernetClient object?
that didn't appear to work
but the writeSnCR did make the socket go to 0x0
now I just need to figure out how to have 3 timers or so
I know the Mega has 6, but not sure if they're usable for this
and if that's even the best way to go about it
basically going to have 3 sockets, but if the client has some issue and fails to close them remotely, I want if no data is received for a few seconds to close the socket
Timers might not be your best bet- you can't call things like millis() in an ISR. If it were me, I'd check the time of last receipt and handle closing sockets in the main loop
does the time rollover affect that or is that not something to worry about?
It won't affect you- it rolls over at 49 days
Even if it rolls over, your deltas still work
yeah, it'd have to be at the exact few seconds of the rollover and even then, it'd just close a socket to then be re-opened anyways
It'll still work even during a rollover
The key is to make sure you are always subtracting the "last received" time from the current millis time
So you'd do like unsigned long last_rx = millis(); when you get a packet, then in the loop you'd do unsigned long delta_ms = millis() - last_rx;to get the time in milliseconds since you last got a packet
Because of binary arithmetic, that will work for rollover
Yep!
I'll give that a go, the next hurdle after this will be trying to figure out how to use an IR emitter/codes for a couple TV's ha
For that, this works well: https://github.com/Arduino-IRremote/Arduino-IRremote
Hello all, does anyone have any idea how I can display static text and also then display scrolling text on a P4 rgb matrix panel? Seems that whenever I enable double buffering my static text doesn’t display and when it’s disabled my scrolling text looks like crap? Any ideas?
Other problem I have is this block is not running when called through the setup function```c++
void keep_left_arrow(){
for (int i = 0; i==1; i++) {
// Clear background
Serial.println(i);
matrix.fillScreen(0);
// Draw big scrolly text on top
matrix.setTextColor(matrix.Color333(255, 0, 0));
matrix.setCursor(textX, 1);
matrix.print(F2(str));
// Move text left (w/wrap), increase hue
if((--textX) < textMin) textX = matrix.width();
#if !defined(__AVR__)
// On non-AVR boards, delay slightly so screen updates aren't too quick.
delay(20);
#endif
// Update display
matrix.swapBuffers(false);
}``` if I place everything inside the for loop function in the void loop() it runs perfectly
the text file thing completely slipped my mind. Thanks for the help
I have a Feather M0 that I was happily uploading test code from vscode to, but now after a few cycles ( and I tried to get serial working ) it will not be detected by my windows PC, I get USB device not recognised. Any hints on how to get back to baseline
of course rebooting my computer resolved!
hmmm, lost the port again, pretty sure it will come back with a PC reboot, but I must be doing something silly, it should not be this hard
I want connect this LED Driver Module to Arduino but i the board is clustered and i cant seem to figure out which pin in where, cant even find he vcc and gnd pins in it. Are there any other methods to find the correct pins cause i cant buy a new board now and im running on a deadline so the sooner the better
Looks like some of those solder connections are bridged? 😅
Also is there any sort of datasheet for that or anything?
High voltage caps an opto coupler with a high voltage gap under it. Doesn't look like something you would want to connect to an Arduino.
Couldn't find any
That's what I thought too. I should get a replacement
Is is a switched-mode AC-DC constant current driver i wanted to use as a LED Driver Module to control the brightness of my LED Strips but looks like my deadlines is done for lol 😂 but yeah thanks for the replies @tame topaz @tame topaz
Check what leds you have then look at examples of how other people have used Arduino to drive them. You may find something that suits what you need. Google is full of various led driver circuits.
That looks like a mains powered LED driver. In order to control it with an Arduino, you'd need to either switch mains voltage (either with something like a PowerTail or directly with a triac if you have the necessary experience and precautions to work safely with mains voltage), or get creative and modify its feedback circuitry (near the optocoupler) to let the Arduino override it. What are you looking to do? Just on/off functionality, or dimming, or what?
I'm using PIR, LDR and ULTRASONIC sensors to sense the light and darkness, Motion and Distance of object to adjust the brightness of the lighting accordingly
So the LED Diver is used to control the brightness of the LED after getting the information through Arduino from the sensors
I don't think that LED driver is capable of that
What do u suggest i could use instead?
Since you're on a short timeline, maybe just leave the driver alone and PWM the LEDs with a transistor?
uint32_t val;
for (uint16_t i = 0; i < 128; i++) {
val += analogRead(A0);
}
val = val / 128;
//Serial.println(val);
float val2 = val / 4096.0 * 3.3 * k;
Serial.println(val2);
return val2;
}```
strange problem... it outputs 71233.54
if the Serial.println is uncommented, it returns 2066 and 20.09, which is correct
how can Serial.println change the value of variables?
Don't you have to include something special on Arduino to make Serial.println handle floats?
IIRC Arduino Serial.println handles floats since like forever..
Note that you are not initializing val to 0, so it probably is starting with a different value depending on subtle compiler differences between the two code versions.
the initializer... I must had too much python recently
It'd be nice if the compiler had that warning enabled by default
Hi, I've got some Arduino code that a friend wrote for me. It works great, but I think it could use some refactoring. Where should I start/what should I consider? Thanks.
https://github.com/2231puppy/E-Fidget/blob/main/Firmware/E-Fidget-Current/E-Fidget-Test.ino
Hi~! I have a question I am using a Arduino for the software and using a ProTrinket 5V device to program it with, trying to make two different pins have two different effects and I have the code that I will type down below, the Arduino software says its fine but when i upload it doesn't work. Hope someone can help with it. Thanks
What kind of “not working” are you observing?
The nested loops may not be doing what you're looking for, that will multiply the delays
hey, i might have posted about this in the wrong channel before 😅 i’m trying to get a tft spi ILI9341 screen to accept my commands i’m sending with an uno, but even after requesting the power mode (which i thought should return 0x08) i get all zeroes. it still doesn’t send a single 1 if i send the command to disable sleep mode
i drive a 1 to the reset pin, CS is 0, DCX is 0 and then i set it to 1 to read commands
i read/write on the negedge of the clock
is there something i’m forgetting or something specific i’m supposed to do before i send commands?
Have you looked at the existing driver? https://github.com/adafruit/Adafruit_ILI9341
Hi, I need some quick help... I'm trying to connect an SG90 servo to my UNO and the board is shutting down instantly, is the servo making a short circuit? Or can I fix it by using an external power source?
I generally run motors (like servos) on a different power supply than my logic for that sort of reason.
I was gifted a bunch of these single color LED panels. 2 8x8 LED matrix on each panel, with 24 pins on the back.
I'd like to learn how to interface these with an Arduino. My GoogleFu has failed me, I'm apparently not asking the right questions. Any info is appreciated!
Since the back of the PCB has no matrix driver you might need to add your own.
would be similar to this https://www.adafruit.com/product/1079
Looks like they only make the display, there's no multiplexer chip on the PCB. You need a multiplexer to drive that many LED's.
Great tip, thank you. I suspected some sort of driver would be required.
@clear flax Here's an example of an Adafruit 8x8 backpack. Notice it has a chip on the back to drive the display. The chip will have an Arduino library associated with it. Since your board has no driver chip there's no library to be used without a controller chip. https://www.adafruit.com/product/1048
and here's one that comes pre-soldered with the display, chip, and board assembled. Should give you a better idea of what needs to be done. https://www.adafruit.com/product/1080
Thanks! That tells me what I need to know!
@clear flax You could use this to wire up to the pins on the display board you have. https://www.adafruit.com/product/1427
The HT16K33 chip is used in many Adafruit products and has great library support.
ive noticed that nothing will power on it just says done uploading and nothing happens to the code
i’ve read through that yes
i’ve also read through the docs
i actually used some of that code
Oh, do you see any errors in your serial monitor? I think you might have an index going out of bounds…
Your second for loop in void loop() appears to be incrementing leds; did you mean blueLeds?
hello, i have a quick question: i'm using an oled screen, and it doesn't work with the sh1106 library, it uses only the sh110x, and i've had a couple of problems using it, mainly from the lack of documentation,
my question is; how do you lower the contrast / brightness of the screen using the sh110x library, and if someone has the sh110x commands, please link them and thank you
Hi everyone, quick product question, im trying to find a microcontroller with on board lipo charging like the feathers but at 5v, using it as something that will be plugged in wall power long term but could be unplugged to be wireless temporarily.
You need 5v IO? 5v outputs aren’t very common among newer chips, and older boards don’t usually have onboard charging.
Closest thing I can see would be an Arduino Uno (or similar) with a lipo shield
didnt know a lipo shield was a thing, if I can wire the shield with a arduino micro that would be ideal
thank u
Cytron has one for an uno from factor, not sure if there’s anything in a smaller form factor for the micro
If you’re okay with external wiring, there are other products like adafruit power boost or seeed lipo rider
Where did you get the display from? Do you know for sure that it’s an sh110x?
from a local store, and yes, i've tried to used the sh1106 library and the whole screen was white, and when i tried the sh110x and a couple of commands, it works fine
Which commands did you use? I believe sh1106 contrast is 0x81, but I can’t speak for all sh110x…
i don't even know the command that lowers the contrast that's why i'm asking 😅
@livid osprey I started to look at the lipo breakout (backpack) and found one for a trinket which has the 5v , thank you for your input it greatly helped
I am attempting to implement a post request to a https url with ignore certificates.
I have a working proof of concept in python from a pc, so I know how to construct the url / headers / payload and see a correct response. Using requests lib.
But I am struggling to work out which libs I should be using to achieve the same on arduino C, in my case an adafruit M0 wifi. I have it happily connected on my wifi, making NTP time requests etc, so I know that it is generally working, I have shifted the wificlient up to WifiSSLClient and it all still works, but just not sure what lib to import etc to get my HTTPS post capability.
Noting I am coding in VSCode
Any pointers would be greatly appreciated, been grinding this for a few hours, just need pointing in the right direction...
Hello, question for the most professionals. I want to include a button_2. but i want button_1 to do case 0 and case 1 and button_2 to do case 3 and case 4. help thanks!
how can I do it?
You wouldnt want a switch, but a couple of ifs over the bools (state of each button)
Also, thats far from a "most profesionals" type of question, and sending text is easier (at least for the people helping) than a pic
Typing on phone errors to be expected (also, never used arduino). I would do something like this```c
pin_t buttons[2]; // no idea what this type is
bool states[2]; // remember previous state
// loop over the buttons
for (uint8_t i=0; i < 2; ++i) {
bool state = digitalRead(buttons[i]);
if (state == states[i]) {
// no change, nothing to be done
continue;
}
// we only get here on presses/releases, add a delay for debounce
delay(20);
//update state
states[i] = state;
// do whatever
if(i == 0 && state) { // 1st button pressed
...
}
Could maybe delegate into a different function for each button, specially if you add several ones or their logic becomes longer, as in ```c
switch (i) {
case 0:
button0(state);
break;
...
}
Well did a lot of digging and convinced myself to try to use the WiFiSSLClient implementation from wifi101, went and got my cert from the site of interest, and understood I needed to try to load it to the m0 wifi via the wifi 101 Firmware Updater. Made sure I changed the pins for my board. Upload the updated sketch, But launching the firmware updater from the Arduino IDE, and it just shows "no supported board connected". Tried everything iI can think of. Is there any experience out there on updating the firmware / uploading certs to the Feather M0 wifi? this is a little frustrating 😦
If I can't get the WifiNINA Firmware Updater to work, then I can't update the certs and I can't get this to work for my HTTPS post...
Sup, I bought an arduino pack and wanted to know what this is and how I can use it?
It is a 3.3/5v power supply for a breadboard. You plug it in to the breadboard and set the jumpers to provide power to the outer rails of the breadboard. Then you attach either a usb cable or barrel adapter to power your project. For USB you need a type A to type A cable (probably came with it)
Alright, thanks 👍🏻
Hello how can I draw a dotted line with https://github.com/adafruit/Adafruit-GFX-Library/blob/master/Adafruit_GFX.h ?
Hey! Does anyone know of a small analog timer for Arduino projects? I’m working on some automation that works on battery and I only want it to work during the day. I’m trying to figure out a way to connect the battery to the Arduino via a timer without using up any additional battery.
Preferably something like this for a small circuit
That sort of device actually uses AC power to run a motor to move the dial, I think, so it's not particularly low-power. You might consider something like a real-time-clock chip, as those can use very low currents and will often have an alarm interrupt output that you could use to wake up the Arduino from deep sleep mode, or to kick on a load switch.
I’ll check that out thanks!
Not sure if this is the right place to ask or not, but I've been having some issues with STM32 code
I previously wrote a library that can initialize and read from a bmp581 sensor over i2c, and it was working well. I recently had a new version of my pcb come in, and it works great, except for the fact that this library no longer works 😅 . In my function for initializing the power mode, I am able to read the current power mode, but when I write the new power mode and read again to verify that it switched, I just get "0"...
Is the previous power mode a nonzero number, or could it be that you're always reading 0 from any register?
I'm trying to use the IR remote library https://github.com/Arduino-IRremote but can't seem to get the example for it working. I'm trying to use these hex codes from https://support.justaddpower.com/kb/article/250-vizio-ir-control/ to put in the SimpleSender program but it's throwing an error "Compilation error: invalid digit "9" in octal constant". This looks like it's because I have 0's in front of each value throwing it off?
not quite sure that's the right program to use either/command type
Yes, C interprets numeric values with a leading zero as other bases. 0x means hexadecimal, 0b means binary, and just 0 means octal.
is there any way to convert them with a function?
I suppose I could do it manually too
I'm not quite sure what you mean by "convert". The base just affects how you type them, but once they're in the code, they're just numbers (integers) you can calculate with.
I'm just wondering how to take and change the codes from the ir database/website to something that the IRremote library can utilize
I imagine I would have to remove the spaces at the very least
I'm not sure at a quick glance. The website seems to be doing some weird "hex in ASCII format" protocol.
Good morning, fine feathered friends! I'm looking to get some help/advice with SWD on a Feather RP2040. Is this a good channel for that? Or is there somewhere more specific?
What about SWD?
I soldered an SWD header on and plugged it in to a Segger J-Link Mini. My computer is seeing the J-Link, but it says it can't find a connected board. Also, GDB seems to be crashing or closing. Not sure if hardware or software problem. I'm on an M1 Mac. Wondering how best to proceed.
Oh, and I also get this
I use the gdb server directly usually and it has to specify the core to connect to too
I don't see it specifying it there
@halcyon vale for example JLinkGDBServer -if SWD -device RP2040_M0_0
OMG
btw, is it normal that the J-Link doesn't show up here?
hmm, I think the Terminal version of this got a little farther, but the Arduino IDE is still having issues where GDB is closing
When I run in Terminal, it hangs waiting for GDB connection 🤔
I don't use Arduino at all
I don't suppose there's a way to do this with lldb?
oh huh, I may not have GDB installed because everything on the Apple side is lldb these days
you'll want the arm gdb too
arduino may have installed it somewhere but I think you can brew it too
mm, this one? brew install --cask gcc-arm-embedded
already installed, apparently. I think I did this before, because it was in my zsh history
do I need OpenOCD? Or is that just for this one tutorial?
JLinkGDBServer does what openocd does
so you can connect to it from gdb directly
Gotcha. If it says it’s waiting for a gdb connection, do you know what that means? Do I need to launch gdb myself?
ya, launch it yourself and then tar ext :2331 to connect to the jlink gdb server
gdb will need to know the elf file as well
k, just gotta figure out to launch gdb, since it's apparently not in my $PATH
also, the what file
wait, is an elf file like a DWARF file? Is this stuff just infected with Tolkien memes? 😆
yup "Extensible Linking Format", from what I read the other one was indeed named as a joke
how do you launch GDB?
also how do I give it the elf file? I don't know about an elf file on disk
aha! Had to watch the installer closely. It installed a bunch of stuff, one of which was /opt/homebrew/arm-none-eabi-gdb, which is in my $PATH
It worked! I launched gdb in one Terminal and the j-link debug server in the other, and used the tar command above to connect
now I just need to figure out how to do all the things with GDB (or, preferably, get it working with the IDE)
What do I do with the elf file? I found it after compiling.
Also, I'm not able to just run the program normally via the j-link, never mind debugging. Should I be able to?
I get this:
Scanning for RP2040 devices
No drive to deploy.
Failed uploading: uploading error: exit status 1
oooh, I think the default program running on these things is CircuitPython. Going to try uploading a sketch the normal way first to jog it into the right mode. (I bet I could do something with the boot select switch, but I dunno)
No dice 😢
ChatGPT helpfully told me about JLinkCommander, which I used to verify that I was able to connect to the Feather and identify the Cortex-M0 core, so I think that rules out a hardware/connection problem, right?
Ya, seems like it. I don't use Arduino + GDB so I can't really help there.
you give it the elf file on the command line. my guide above covers the basics of gdb
Is there a better venue to get help directly from Adafruit?
Dose anyone know of any code that works with a Arduino pro micro for a 9 key macro pad
for a pro micro
you could use QMK. I guess Arduino also has keyboard libraries.... you should ask a more specific question of what you are struggling with
any code that works
since code depends on how you've wired things up, there's a good chance that there is no pre-written code that works on your project, but making your own from scratch shouldn't take a lot of effort/time
I think you're right. I posted on the forum: https://forum.arduino.cc/t/gdb-server-quit-unexpectedly/1122761
I'm attempting to use the Arduino IDE to connect to a Segger J-Link Mini, which is connected to an Adafruit Feather RP2040 via an SWD header that I soldered on. I am able to use the Segger tools to connect the Feather, so I'm reasonably sure the soldering is fine. When I try to debug a simple sketch in the Arduino IDE, I get this: undefined: ...
Hi, I was wondering if anyone knows of a low-cost projector. The cheapest I could find was DLPDLCR2000EVM which is quite expensive ($100). I'm trying to make my own HUD with an Arduino. I see HUDs and projectors on the market that costs less than $50 which means the projector module they use costs much less than that. Thanks in advance for pointing me in the right direction.
Often it's easier to use a small LCD or OLED display and some optics
Would it be bright enough for day time use?
OLEDs generally would not be great outdoors. With LCDs, it would depend on the backlight. Note that even commercial AR displays are still struggling to get sunlight readability, so set your expectations for what you can do with $50 appropriately.
In that case, could you give me some examples as to which backlights to look at? I'm thinking mostly about vehicle applications so I hope the ambient light intensity wouldn't be as bad as in direct sunlight.
I don't have any recommendations offhand, I'm afraid. Have you considered a smartphone-based system? I've seen some products which reflect a phone screen up into the driver's line of sight.
I've used my phone for that, unfortunately it only has 800 nits sustained and 1200 nits peak (which is almost never). It gets hot and drains battery like crazy because it uses GPS and display at max brightness all the time. I was hoping that I wouldn't have to stress my phone every time I drive. Either way, thanks for your help.
For that kind of brightness, you may be better off with a CRT display
I have this mic preamp board and I saw online that you're better off using a "clean" power source like a battery for powering the board itself so it isn't influenced by noise from your main power supply
But having to change out a 9V battery with a regulator in a circuit to make sure the preamp works is kind of lame, plus batteries in general are just eh.
Is there a circuit or a module or something I can use to turn the power coming from my main supply into a cleaner form that I can give the preamp?
I found some people talking about capacitors online, and also something about a "low dropout regulator"
Yes, filtering/decoupling (resistors, capacitors, and inductors) can help, as can regulators (linear regulators, not switching regulators).
You can also use isolated power supplies to avoid "ground loop" and noise pickup from wiring issues.
Note this might be more at home in #help-with-audio than here
The board I'm using actually has a linear regulator on it, which I just noticed
But in order to test if it's working, I need to get this SD card working
void setup() {
Serial.begin(9600);
pinMode(A0, INPUT);
Serial.print("Checking for SD card... ");
while (!SD.begin(4));
Serial.println("done!");
wavFile = SD.open(filename, FILE_WRITE);
while (!wavFile);
Serial.print("Writing header... ");
writeWavHeader();
Serial.println("done!");
Serial.print("Recording... ");
}
It gets stuck at Checking for SD card
I have CS to pin 4, SCI (or CLK as written in the docs) to 13, MOSI to 11, MISO to 12, and VCC and GND wired up.
Got it, had to format as FAT32 instead of exFAT
I'm looking at this page: https://github.com/SpenceKonde/ATTinyCore/blob/v2.0.0-devThis-is-the-head-submit-PRs-against-this/avr/extras/Ref_Micronucleus.md
How do I set the bootloader entry method on the ATTiny841?
I have a program that should allow me to record data to a WAV file on an SD card
And at the very end I have Serial.println(SD.exists("data.wav")); which prints 1
But when I plug the SD card into my PC, it's blank
What gives?
Oh, I got it to work once, and now the SD card isn't even recognized by my PC
And now it's recognized but it's corrupted...?
I think something is not working
My end goal is just to write this to a file
Hello, I just got my hands on some light modules on a wire that I'm trying to get working with an Arduino Uno R3. The light modules are half spheres with what seems to be 4 RGB Pixels controlled by a LPD8806S 14120 chip. They have 4 input wires for 12V, CI, DI & GND, as well as output wires 12V, CO, DO & GND. I tried using the Adafruit LPD8806 Arduino Library found on github with no luck. Some of the lights turn on when connected, but I'm not having any luck programming anything.
Any help would be much appreciated.
If I remember correctly, there should be 24 half sphere modules across the wire.
try CircuitPlayground.strip.getPixelColor(n);
where n is the pixel number
np. a little weird that its not exposed at the CircuitPlayground level, like setpixel is
but luckily strip is public, so can just access directly
Is this the right channel for my support topic?
Yes, but I know nothing about that chip
No worries. Thanks though.
I’m building a project with the Adafruit Trellis MIDI keypad that’s also going to include a looper station (which I needed an Arduino DUE for). I decided to just use the DUE for both because it has two SCL and SDA pins. Buuut the Wire.h file included in the code for the Trellis is apparently incompatible with the DUE? Anyone run across any similar problems or know of any fixes?
There are a few slightly different I2C/TWI implementations. They all do approximately the same thing, but it can take some poking around in files to figure out how to adapt from one to another, or tell a particular peripheral how to use a particular bus.
Still looking for help with this. Thanks!
Probably with a #define for the one you want to use?
Sounds about right, but I can't find any docs on it.
What in particular are you trying to accomplish? Build a version for a new CPU with a particular boot mode?
hello, quick question:
how can I have two separate instances open of the Arduino IDE? Need to read two serial comms because im testing a client/server project with ESP32s, thanks in advance!
literally clicking on "New Sketch"
Hi, I have an ESP32S3 TFT board, that I can't upload sketches to any more. I can still boot into the filesystem mode and copy the factory firmware that way, but even if I do, the micro doesn't boot into the default sketch. I also can't connect to the device via serial tools or the JTAG bridge and the LED is full brightness white. Any ideas, why that may be the case and hints on how to fix this?
I also just tried to upload the factory firmware .bin (not the .uf2), same result
Never mind, I was finally able to recover the device, I'm not exactly sure which try, order or how
I everyone, recently I have discovered the new W5300 toe shield from Wiznet, it's a shield for rj45 and I was wondering if it is possible to use it with an esp32 such as the seeed studio esp32-c3 or the firebeetle esp32-e ?
as far I can see we can use parallel bus interface to control it but I don't know how does it work and if it is possible to use this with my boards
W5500 is supported in Arduino and CircuitPython. W5100S in CircuitPython (not sure about Arduino). Not sure how different W5300 is from those. edit: example W5100S board with Arduino: https://maker.wiznet.io/scott/projects/getting-started-with-w5100s-ethernet-controller-and-arduino-ide/
I'm designing a custom PCB, and I hope to be able to take advantage of Micronucleus. I just can't figure out how to use the darn thing :/ I want to know how to set the boot mode I put in an order for PCBs that depend on x pinout or y feature.
Are you using an already-supported chip, or adding a new one?
I think I'm gonna go with a different solution, but thanks for the help.
I think I was in the wrong support chat.
I'm having trouble with a tutorial I was following on the website.
I have a pre-written project designed to work with ST7735 and ST7789 SPI LCDs.
I thought using an ILI9341 would be plug and play, but it's proven to be pretty tough to figure out 😅
Could you share the relevant code you’re having issues with, and a link to the tutorial you’re referencing?
Hi!
Thank you, this is the tutorial.
Presently my code is essentially the direct code from the tutorial.
Ah, this. The main changes that have to happen include 1) the inclusion of the Adafruit ILI9341 library, 2) the DISPLAY_WIDTH and DISPLAY_HEIGHT, and 3) the “tft” object, which in this example is type ADAFRUIT_ST7789, but needs to be ADAFRUIT_ILI9341 and use its own constructor.
Aside from that, just make sure your wiring matches that of the tutorial, and understand your frame rate may be slower than the original project intended due to more data per frame. I don’t know of anything else in the code that would be an issue, but if you do run into errors, feel free to share those here as they appear.
Oh awesome!
So I've been picking through the ILI9341 library to make sense of things.
I swapped over all of the values, when you say the ILI9341 needs it's own constructor is that the issue on line 243 where tft.init is called but doesn't exist in the 9341 library?
I was thinking the line defining what the object tft is. In the code, the method Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST); is what we call in programming a constructor, as it’s a function that “constructs” the object for the first time. You’ll need to replace this line with the appropriate code for the ILI9341.
As for the lack of an init() function, I’d be surprised if that was the case, but I can’t say for sure offhand.
How could I pass a file stored on an SD card by an Arduino to a raspberry pi?
Oh I can plug the arduino to the pi via USB and do serial stuff, duh.
Looks like everything was good, I misread the compiler error.
init() became intiSPI() and everything else copied over 1:1
Did it work?
Yup! Everything is excellent. Thanks a ton Hem!
Hello can anyone help me im using a MAX 4466 connected to an Arduino uno as input, the microphone doesn't pick up any sound unless I tap on it. is there any way to fix that as im using this microphone for locating the position of the person who is speaking.
Digital input or analog?
To locate a person, you'd need more than one microphone and some software to capture the timing
Analog and im using 4 microphones
The code functions as intended but only when you tap the microphones as it rotates towards the stronger signal, sorry I didn’t mention this before it’s a robotic head that faces the person speaking using servo motors
Weird, there's not much to it, just power, ground, signal, and a gain adjustment. How are you reading the data?
Hello, I am trying to identify the model of this TFT LCD and use it, any help will be apriciated
It looks like the touch model LCD using the ILI9341 IC to me. https://www.aliexpress.us/item/2251832829271342.html Adafruit has a library for that IC: https://github.com/adafruit/Adafruit_ILI9341
I habe already found it, it's ILI 9488
Thank you though!
Can anyone help me? I am struggling to get the touch portion working correctly
What happens? Does it work at all?
Hey there, was hoping I could get some pointers here for getting Serial1 to work the way I need it to on a Feather M0
How all do I set SERIAL_8N1 and inverted logic for the port?
not super familiar with working with M0/SAMD stuff
I'm unsure if Arduino supports details like that, you might have to crack open the data sheet, find the appropriate registers, and write to them directly.
Ah dam. The ESP32 stuff supported it super easy but the SAMD stuff seems to be slightly different.
With the esp all you had to do was add "true" at the end of the Serial1.begin to switch on the logic inverter.
SAMD doesn't seem to like it though.
Sorry for just seeing this. Well right now, whenever I try to test the touch it says there is always preasure and I can't seem to find what's causing this
does anyone know what pin i should try to use to read battery voltage on the rp2040 feather with dvi?
you have to connect Vbat to one of the analog pins with a voltage divider
Does anyone know why my ESP8266 is timing out? It works fine with AT commands I was able to connect to my network but doing it within the IDE only returns timeouts?
Power supply? Flow control?
whats the max recommended cable length between MCU and NeoPixel?
cause i have a 1m ribbon cable that carry's + - and Data to the NeoPixel and for some reason the NeoPixel is flickering when changing the color a lot (fading colors)
If the lead carrying the 0 volt reference between the MCU and NeoPixel is also carrying the power return, an effect called "ground bounce" can corrupt the data. I like to run a separate return wire from the strip to the MCU (for a clean data reference) and another to the power supply (for the power return). Additionally, you can add capacitance at the NeoPixel end to absorb power spikes, and include a small amount of resistance (100-1000 ohms) in series with the data line to absorb reflections.
I found some code ages ago for the 28BYJ-48 motors and it was running PWM and the movement was really smooth and quiet
I've somehow lost the code a few months later and I cannot find it online at all, anyone have any ideas?
Also I've seen that you can drive the motors with A4988 drivers
Any advantage? For my projects my motors just rotate, under barely any load
They're low power motors, so you can drive them fairly easily with ordinary TTL gates as "drivers". But of course, using drivers specifically for stepper motors will work too. Some of the fancier drivers give you some handy options which may or may not be useful to you in any particular application.
Yeah I'm looking into using TMC2208's
Smoothness is the goal and that ties in with silence too
I've just had a bunch of these PCBs made which is bad timing
But will make the same shield but for TMC2208's
I've noticed what code you use really dictates the volume/smoothness of the motor, and they are decently quiet with the code I am running with the ULN2003's but it could be better
As you can see I've got a blank space where a decoupling cap could go, I haven't noticed any difference with or without one, is this naughty???
That's Earl "Madman" Muntz's approach to engineering: delete a component, and see if it still works. Frighteningly, it's often a valid way to do things. The chips are pretty tolerant to noisy power, so as long as your controlling logic has clean power of its own, it's probably fine. You may be rounding off the drive waveforms to the motor slightly, which could reduce torque, speed, vibration, and noise. Since you may not care about the first two, doing without the capacitors might actually be an advantage.
With more delicate circuitry, you do need to pay more attention to power quality, noisy power can slowly degrade some circuitry. But stepper drivers? Those have to be robust to spikes, surges, brownouts, and the like.
Hi
I am using your library to connect VL53L1x to an ESP32
After connecting the sensor to the ESP32 I upload your library with no error message, but I can't get any measurements.
I am connecting the SDA to GPO21 and the SCL to GPO22 and of course the V5 and the GND
I can't figure out what is wrong. Do I have to declare the IC2 different in your library?
Can you please give me some advise. I am using arduino IDE
the default pins used for i2c will be set by the board being selected in the arduino ide
there's unfortunately no real standard for specifying alternate pins in user sketches
however, ESP32 does have this:
https://github.com/espressif/arduino-esp32/issues/3779
In the esp32 data sheet they the following
Then this does not work because of the code ?
can try an i2c scan for a basic check:
https://learn.adafruit.com/scanning-i2c-addresses/arduino
@mystic walrus (sorry I directed you to the wrong place)
When I run the I2c scan this happens
@safe shell not a problem, hope I am in the right place now
looks like its returning something for every address. could be a wiring problem. can you post photos of the setup showing how everything is connected.
try powering with 3V instead of 5V
Still the same
I check and the correct power goes in
It is so frustrating looks like everything is ok, I even tried with different esp32 and still the same,l
Can someone give me an advise ? What should I do ?
Basically what people said: that "answering on lots of addresses" either points to a hardware issue (stuck signal, missing pull-up resistor, voltage mismatch, bad connection, etc.) or a broken chip.
@north stream I purchased an arduino uno r3 and the problems is till the the same. The connection are checked and they are fine. I guess the only thing now is to replace the Vl53 sensor
If you have any other I2C devices handy, it might be worth trying it with one of them to verify the wiring
Unfortunately I don’t. It’s the first sensor I bough. I would be incredible unlucky to spent two day to work it out and then at the end the sensor is faulty
That doesn't happen often, but it has been known to occur. And yes, it's supremely frustrating.
The only other option is the pull up resistor, but I saw plenty of videos without the pull up resistor
Pullups are definitely required for I2C, but many sensor boards will include them already. Adafruit's generally will, for example.
I will order them one TOF sensor from adafruit. Do you know how I can get them in UK
Pimoroni typically sells quite a few Adafruit products
My sensor is from pimoroni. Does it say in the data sheet if requires pull-ups
This one?
It kind of looks like there are pull ups on it
This is how I have it connected
Looks like you have 3.3V connected to 5V
The sensor has from 3 to 6
I think the sensor has a "3-6V" input pin, so it probably has an onboard regulator.
And it doesn’t print out found for any?
No, I will make a shot video for you
Okay 👍🏻
Very strange..
Maybe the sensor is dead
It appears that pull ups are present on the board, so the only other thing I could this is maybe swap the pins for SCL/SDA on the incredibly unlikely chance they are backwards
Which one are the pull ups ? When I swap the SCL/SDA
Tell you what, this is really annoying 😂😂😂
The pull ups are the flat rectangle with 8 pins
Might be worth picking up a $25 usb logic analyzer
You can then see what the Arduino is sending, verify the frames being sent
I will have a look. I will post here when a new sensor comes is an I will try it
I hope is that
I am using the Round rect screen from the store, and I am trying to get a pic from a sd card to wirte to the screen. I keep getting"Initializing filesystem...SD begin() failed
" in the serial monitor. Does anyone know what I am doing wrong
I have the SD CS pin hooked up to Digital 4 and I am using the pinout provided on the learn guide.
DC -- 8
RST -- 9
TFCS -- 10
The power is connected to 5v and ground
Can you share your code too?
For the sake of maybe the speed is too fast, change SD_SCK_MHZ from 10 to 1. Im not sure how fast spi on the atmega328p on the uno can do.
It says 16MHz the clock speed so never mind on that idea.
Did you format your SD Card at all?
So sorry for the late response! Let me change that setting
That did not work like you said. I don't think I have formated it. How could I check that? I am new to the sd card code and everthing. Because you know about my watch, this is what will hold all of the icons that will be used, just like an Apple Watch.
Try following this learn guide and doing the minimum example https://learn.adafruit.com/adafruit-micro-sd-breakout-board-card-tutorial/arduino-library?view=all&gclid=CjwKCAjw04yjBhApEiwAJcvNoQVnlBlScO0eSm3ytscgiUGwWt8ksH4lOXUF02Xklb3H_3rEnKM8txoCVYkQAvD_BwE
Don’t worry about the display yet, just try and get the sd card working. You’ll want to make sure the sd card is formatted properly and that you. An at least write and read from it
Ok I have downloaded the formatter fro the learn guide and formatted it but iot is still not working
And the SD card is properly inserted into the slot?
I’m not sure if yours is a push to secure/release or the other kind
It is a San disk that I bought Mandy a month ago from Walmart so I guess it is the most recent
I meant the card holder on the display
It is like the one in the picture from the learn guide that you sent
I have been using all of the formaters and it is only formating it to exFAT or NTFS. Is this because I am using a Sandisk ImageMate sd card.
This is a pic of what my card looks like
Do you have any smaller Sd cards to try?
Microcontrollers generally don’t play nicely with cards over 8GB in my personal experience haha
Fat32 is the upper limit for most, and if your on an arduino uno, ideally you find something small enough for Fat16 or Fat12.
When arduino uno was the big kid on the block, SD cards were still in the megabytes haha
Ok do you have an SD card you would recommend that is from Amazon or something so I can get it faster than ordering it from adafruit
You usually can find 128mb sd cards fairly cheap
Thank you, would it be possible to use a 7,6,5,4 gb sd card. My files are fairly small, but I plan on using a ton of icons
I don't recommend any SD cards from amazon, but Microcenter and other reputable sellers have nice 8GB Sandisk cards for affordable prices.
Ok, do you know about the storage size like I mentioned above
Usually they're powers of two, I haven't seen 5, 6, or 7GB. 4GB is getting harder to find, but there's probably stock available somewhere, possibly in bulk for an attractive price.
Ok, thank you, @livid osprey , and @gilded swift for all of the help. I hope I get it to working!
I think I found the problem
In the store they say that you need to use this type of sd card(pic 1) which is not a SD card it is a SDHC card.
In the card that I have, not only does it have to big of storage, It is SDXC (pic2).
I think HC is "high capacity", and XC may be even more. I doubt you'd find 4GB HC cards.
I found a 8gb that they recommend I will just order it from Adafruit
I found this one that looks like Adafruit’s one, and it is already formatted to FAT32 which means I can go back and program it to FAT16. Think this is good?
That looks like an amazon listing, and amazon is full of fakes.
@gilded swift @north stream
I just got a new sensor and worked beautifully.
How can I decrease the amount of measurement that the Vl53l0X
If I want to make a ruler and the target is completely static the dimensions keep bouncing a lot
One thing you can do is take several measurements and average them, that will tend to smooth out the variation
Looking at the page for the feather 8266, I don't see any mention of PWM in the bullet list of specifications. Is the ESP8266 capable of hardware PWM, even on a single pin?
Looks like it only supports software PWM
The 8266 is fairly outdated. You could get more features from the new Feather Huzzah esp32, plus I believe you’d get hardware PWM
is there a way to remotely upload code to the arduino we have a vpn thats connects us to the local network somewhere else
Has anyone know about connecting the adafruit PDM MEMS Microphone to a ItsyBitsy nRF52840.
I wired it all up and it just reads -8 the whole time
I used the pdm serial monitor exapmle code and it just reads -8. Says they’re a device
This is my wiring diagram for it
Everything in the diagram is wired and everything but the microphone works
Not sure if this is the channel for it. If not tell me where
That pin on the ItsyBitsy is a 5V output only pin designed to run things like NeoPixels. It can damage 3V devices and cannot read data.
According to your diagram, the GND on the microphone is connected to Strip2 ground. Both of these should be source from the ItsyBitsy G pin.
Using a Neo Trinkey M0, I'm trying to analogRead() either of the pins used for touch sensing to seed a random number generator. Seems like this should work based on the pinout diagram, however the code seems to hang in the analogRead() function. Has anyone experienced this before, or otherwise might know why this wouldn't work? It works fine on the QT Py M0. Also, I tried this on 2 different Neo Trinkey M0 boards and the result is the same on both of them 🤔
should just work. are you testing with a simple sketch to verify it's hanging on just the call to analogRead()?
Maybe that’s it. So it’s not getting power correctly?
The output is 3v I looked it up before making the diagram
Ohhhh wait I see what you mean
Is the thing probably damaged then?
i should add both strip have the same power and ground not shown here
I'm not sure. I'm guessing the code was expecting to read data from that lead, not send any, so it may not have produced any 5V signalling, so it may not be damaged.
Yep, I've removed all code except for that basically. I put a print statement before and after the call, and only the first one prints. I have to reset the board to upload code again
weird. if you dump sketch code here, i'll test and see if i get same behavior.
I'm stumped. Not only is my stripped down sample working now, my original sketch is working too. I have no idea what was happening here. Was banging my head against it for at least an hour this morning. Oh well. Thanks for the offer to help anyway, I appreciate it!
Your diagram show Strip2 power coming from the ISM330DLC VIN (which wouldn't work). So, I assume the diagram is incorrect.
That’s the power output of the strip
They’re dotstats
They have another power and ground that’s not on here
Hello, i need help,
i have 2 servos hooked to same power source (4aa in series)
(like seen in the image below) and it is causing trouble (when it didn't before)
The servos start to jitter (and wont play an animation, sometimes one will begin spinning 360 even tho is a 180 servo)(the same problem happens when i try to connect a servo to the other power source which only has one servo)
How can i fix this?
Which wires are connected where, exactly?
Red=positive
Brown/black =ground
Yellow=PMW
Can your system run one servo just fine?
Yes, even 2 (tho it has started to cause trouble, when there is 2)
If you have a scope, try measuring the voltage at the power source. I imagine AA batteries might be having trouble delivering enough current to two servos and the voltage is sagging as a result?
ok. i'm seeing it too. here's test sketch:
int count = 0;
void setup() {
Serial.begin(9600);
while (!Serial);
}
void loop() {
Serial.println(count++);
if (count > 5) {
Serial.println(analogRead(2));
}
delay(1000);
}
the serial output freezes after 5
That's interesting 😮
Sorry i don't think i do, i don't even know what that is ( im new to this and really dumb)