#help-with-arduino
1 messages · Page 65 of 1
I did a total clean up of adruino app and librairies and reinstall the soft
where can i find a spec sheet for the arduino? (dimensions) I am making a case for a project and I cant seem to find any good spec sheets they all have different dimensions, for example the horizontal distance between two mounting holes on one diagram is 1.1mm and on another its 1.3mm
Arduino Uno R3
If you go to the Uno R3 page https://store.arduino.cc/usa/arduino-uno-rev3 and click on the Documentation tab, you can get the Eagle files and board layout in DXF
how do i open the DXF?
I was unsure what tools you had available.
nvm found a site to convert to pdf
um, the pdf was wacky so i opened it with freecad and it still doesnt have any dimensions
nope
Hmm, I'm not sure what to suggest. My next two thoughts both involve installing software (Fusion 360 or Eagle) and using one of them to extract the dimensions.
so i searched freecad dxf, and it said i had to enable it in the preferences, so i did that restarted it, now i see this
just as useless
and not even correct
stupid freecad
I've never used Freecad so I don't know anything about it.
i only started using it a couple days ago, its a pain, hard to initially learn how it works, but then its kinda good to use
i would use fusion 360 but im on linux
and i would have to run it in wine and apparently its not great in wine
In your situation I'd probably just parse the DXF directly: it's an ASCII text file and there are Python libraries available. All you'd need to do is get the positions of the holes. I'm not saying that's an appropriate approach, it's just what I would do.
I admit I'm annoyed that such basic information isn't more easily obtained.
Some poking around reveals that lx-viewer might be suitable, there's also a cadviewer plugin that will let you look at DXF files stored on Google Drive in your web browser.
cool thanks
Any recommendations for an accelgyro with actual support for Arduino Uno ?
Currently using MPU-6050 but it randomly hangs on example code if you enable the DMP for sensor fusion
and the reverse engineered lib for it is very hacky
@south stirrup Check out the BNO055
Hello,
I am trying to open a file in SPIFFS and read the number of lines and the location of the first '\n' in the file .
Once the number of lines has been counted I want to read the last 10 lines into a string and then write that file back to the file so I can reduce the ocerall file sze so I can continue to write to the file without filling up my ram.
This is what I have written so far but I cannot get the received string to populate with anything
Is there a better way to do this??
void Resize_File()
{
float position = -1;
int firstNewLine = -1;
int lines = 0;
char caracter;
String received = "--";
File _File = SPIFFS.open(FILE, FILE_READ);
if (!_File)
{
Serial_Debug.println("Error Opening _File");
return;
}
else
{
Serial_Debug.println("==========================");
while (_File.available())
{
position += 1;
caracter = _File.read();
if (caracter == '\n')
{
if (firstNewLine == -1)
{
firstNewLine = position;
}
lines += 1;
}
if (firstNewLine != -1)
{
received += caracter;
}
}
_File.close();
position = 0;
received = "";
delay(1000);
if (lines > 5)
{
File _File = SPIFFS.open(__FILE, FILE_WRITE);
if (!_File)
{
Serial_Debug.println("Error Opening _ File");
return;
}
else
{
_File.println(received);
Serial_Debug.print("Recieved: ");
Serial_Debug.println(received);
Serial_Debug.println("==========================");
}
_File.close();
}
}
}
Wonder how much a full license costs....
And the official lib are only for ARM ...
@safe halo Have you used it ?
It's not clear if the lite library supports sensor fusion
I have one but have not coded it yet
ok
#include <DHT.h> #include <DHT_U.h> #include <Adafruit_Sensor.h> #define dht_apin A0 // Analog Pin sensor is connected to DHT dht; void setup(){ Serial.begin(9600); delay(500);//Delay to let system boot Serial.println("DHT11 Humidity & temperature Sensor\n\n"); delay(1000);//Wait before accessing Sensor }//end "setup()" void loop(){ //Start of Program DHT.read11(dht_apin); Serial.print("Current humidity = "); Serial.print(DHT.humidity); Serial.print("% "); Serial.print("temperature = "); Serial.print(DHT.temperature); Serial.println("C "); delay(5000);//Wait 5 seconds before accessing sensor again. //Fastest should be once every two seconds. }// end loop()
i write this code in arduino and it gives me an error saying no matching function for DHT dht;
Plz help
Could you either format it or use pastebin please?
one sec
I think you are improperly using the constructor, it requires two pins to be defined for clock and data.
Or no, pin and type
what does that mean i am new to arduino
You should check out the example in the library, but in the source you cannot just construct a DHT class without the two arguments that dont have a default value DHT(uint8_t pin, uint8_t type, uint8_t count = 6); so you need to give it a pin and type. Example is here https://github.com/adafruit/DHT-sensor-library/blob/master/examples/DHTtester/DHTtester.ino
Line 30
if i try that it says dhtpin was not declared in this scope
make sure to copy all of the code from the sketch
oh wait
there's DHT guide here also, which might help:
https://learn.adafruit.com/dht/using-a-dhtxx-sensor
never mind it worked thank you
Where would I put serial data pin on a arduino uno R3?
Hardware serial uses GPIO 0 and 1, which is also the serial link to the host. You can use other pins as serial pins with Software Serial.
How would I connect this to my arduino
Ah, that looks like synchronous serial, not asynchronous serial.
You can use the Arduino's SPI engine for hardware synchronous serial. SPI clock is on pin 13, but the data is unidirectional (data to the Arduino is on pin 12, and data from the Arduino is on pin 11). You would also have to set up the code to do what you need. Again, you could use software synchronous serial, which lets you use other pins, but it's not as fast.
Thank you jesus. Thank you. uwu
can someone point me to a guide for idiots on how to use a esp32 with a tmc motor driver? (or at least with an arduino) ?? 🙂 most of the guides are for 3d printing (boards) I literally just want to drive a single stepper motor with a esp32 (or arduino) but use those fancy stealth mode and homing without sensor
Coding advice needed:
I work with a Pro Mini with several different versions of the same firmware.
I need to use one of the timers for some pin control, but want to make sure I don't use an obviously bad choice, i.e. a timer used by another, imported function.
I already use timer 2 in MStimer2.
In another version of the program, I use wire.h, but not sure if this uses any of the timers.
Also, if I want to use hardware serial pins, do they need to use any of the hardware timers?
How do I turn ultrasonic distance that it detects to voice or speech
Ultrasonic sensor cant detect speech, as speech is in lower frequencies than ultrasound
I mean when it detects distance then can it somehow convert to speech
so it can be played on a speaker the distance between the ultrasonic sensor and the the object @woven mica
Like a distance readback like "Distance is three point two meters"?
Yes!
There are several ways. Easiest way is with something like https://www.adafruit.com/product/924
Thank you!
How do i solve this issue?
Your variable is dht not DHT
i have a question about the ATMEGA328
Heh heh, do you want us to guess what it is? <holds envelope to forehead> "The answer is... a 5V to 3.3V level shifter!"
Ed "Carnak" Keyes ?
@twin ginkgo dont ask to ask
@south stirrup fAdafruit's breakout board for BNO055 together with Adafruit library support sensor fusion: https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/arduino-code
as alternative, look at Kris Winer's work: https://www.tindie.com/products/onehorse/ultimate-sensor-fusion-solution-lsm6dsm-lis2md/
or even better, his newest work: https://www.tindie.com/products/onehorse/max32660-motion-co-processor/
which claims 0.3 degree accuracy
hey thanks for the links
A bit weird that they added another chip for sensor fusion when the MPU9250 already has one (talking about this board https://www.tindie.com/products/onehorse/ultimate-sensor-fusion-solution-mpu9250/)
In my project I managed to run a Madgwick filter somehow
MPU 9250 is officially "Not recommended for new designs"
not to mention that its built-in DMP is not really documented and one has to reverse-engineer it. Madgwick works better.
Yeah wasn't sure if the Uno would be fast enough for it, but looks like it is
Is there any way to distinguish between the native usb serial port and the tx/rx pins on the itsybitsy m0 express in arduino?
I'm using the native usb port as host input and I want to send what I receive over tx
For more context, the itsybitsy is wired over tx/rx to a bluefruit feather. I want to then accept input via serial rx and output to native serial usb.'
I suppose since I only need the communication to go one way, I could only wire tx on the itsybitsy to rx on the feather and then send everything to serial on both boards?
itsybitsy m0 has more than one serial - pins 0 and 1 are tx/rx for Serial1 interface, which is separate from Serial used by USB. So if you use these pins, there is no problem
Ah, perfect. Thank you. That's what I was looking for.
just make sure to use the correct one in your sketch - it is easy to miss that 1
anyone know of i2c gps modules that can be used on a small drone?
Maybe this? https://www.adafruit.com/product/4415
I saw that
would be a pretty good fit
but bonus points if there's a source for the chip itself
I did a few preliminary searches on mouser and digikey to no avail
Yeah, not as easy to come by. Here's a European distributor, for instance: https://www.mirifica.de/en/cd-top/mediatek-mt3333/cdtop-technology-pa1010dv2-cd-pa1010d2_100011_1308/
hi guys i am new to arduino and this server, so if possible pls can u help me with arduino coding?
and i soo want to learn arduino with ur support!!!
Could just get a raw uBlox module, most of the component distributors have them
@royal prism Im sure people will answer specific questions. If you want a tutorial there is more than enough material out there you can find with Google
@thorn relic do any of ublox offer I2C? I've only seen UART on them
eyo, I was hoping to make something with a keypad and an LCD, but all the tutorials online seem to be just for plugging one or the other in, and not both. And the ones that have both seem to have different models to me. I'd like someone to please tell me if it's even possible, as the tutorials online suggest both components will need to use the same pins on the arduino.
I have this arduino https://store.arduino.cc/arduino-mkr-wifi-1010
I have this LCD https://wiki.dfrobot.com/Arduino_LCD_KeyPad_Shield__SKU__DFR0009_
I have this keypad https://components101.com/misc/4x4-keypad-module-pinout-configuration-features-datasheet
is this because i named it the same or? :S
@royal prism Do you have a specific question?
@wintry tulip I took a quick glance... you should be able to use both. The MKR1010 has 22 pins available... the LCD calls for 8 and the keypad needs another 8
I would follow the example pin mapping for the LCD, and use different pins for the keypad
@wintry tulip - also, the keypad you have isn't an adafruit device... but their library should work... https://learn.adafruit.com/matrix-keypad/arduino
thanks very much @twilit hare , which of the 8 LED pins do I need? Are they the ones on the bottom row? I was hoping that I didn't have to plug 16 in so that's good news...
I intend to have my program output to the LED for this project, I don't need to use the buttons on the LED
@wintry tulip you don't need the analog pin (A0) if you do not plan to use the button on the LCD. You will need the other 7
@wintry tulip ... ok... looking at this a little more closely. A few things to "watch out" for. Your LCD is a shield that is designed to sit on top of a "classic" arduino. The MKR1010 is a little different. It's a different form factor, so the shield won't plug in (you'll have to use wires to connect the pins). Because of that, you'll also need to connect ground and voltage pins... which comes to the next "gotcha": the MKR101 runs at 3.3V.... the classic arduino is a 5V device.... so I'm not sure if your LCD will run on 3.3V.
@wintry tulip - are using those devices a "must have"... or do you have flexibility to use different hardware? there are certainly easier "plug and play" modules for you to use... assuming you've got the time (and funds) to procure them
@twilit hare Bits and pieces were bought for me as a birthday gift by someone who doesn't know anything about this stuff (like me!) So unfortunately those are the only components of their kinds that I have. I do have other things though, like a breadboard and what looks like some kind of power supply module, and various basic circuit components like transistors, capacitors, resisters etc.
The power module has a jumper that goes between 3.3V 5V
@elder hare Naming it the same is bad as well, but the particular error is because MYSOCKET isn't previously defined by a header file. The class you're looking for is probably called something else, like maybe just Socket.
@cedar mountain actualy the class name is MYSOCKET 😐
Something you created yourself?
ye
Gotcha. Then there's probably an issue earlier in the file about how that class was defined which is only showing up when it reaches this line.
This also give the same error
//====================================================================================================================== //
// MYWIFI
//====================================================================================================================== //
#ifndef MYWIFI_H
#define MYWIFI_H
//#include <ESP8266WiFi.h> // ESP8266
#include <WiFi.h> // ESP32
const char* ssid = "Altibox625721";
const char* password = "aVqGgfJg";
//====================================================================================================================== //
// CLASS - MYWIFI
//====================================================================================================================== //
class MYWIFI {
public:
void STATICIP() {
if (!WiFi.config(local_IP, gateway, subnet)) {
Serial.println("STA Failed to configure");
}
}
void SETUP() {
WiFi.begin(ssid, password);
Serial.println("");
while(WiFi.status() != WL_CONNECTED){
Serial.print(".");
delay(500);
}
Serial.println("");
Serial.print("IP Adress : ");
Serial.print(WiFi.localIP());
}
};
MYWIFI *MYWIFI;
#endif
Is that a compile error or some sort of IDE interactive-editor error? It might just be getting confused by the duplication of class and variable name.
@wintry tulip ok.... sometime you need a level shifter to shift 3.3V logic to 5V logic (between the arduino and the lcd).... but maybe you can get away without using one. Good luck!
@wintry tulip - one last thing... if you just can't get it to work, then I'd suggest you but a classic arduino uno. it'll be the correct form factor and the correct voltage level. You can get a clone for approx $12-13 USD
@twilit hare lol, I think that will be my best bet too. Thanks for all your help!
One last question though, the 8 pins you mentioned that I'd need on the LCD earlier, are they the top or bottom row?
i.e.
bottom row: A0-A5 plus reset, 5V, VIN
top row: VCC, GND, D0-D3 plus D11-D13
@wintry tulip - the top row
I have no idea what you're trying to do, but are you sure you're using that breadboard correctly?
I've never used a breadboard before so that's likely. I stuck the power supply on for no reason so ignore that bit. I'm using it because I don't have the correct female/female wires to be able to hook the LCD up to the arduino so I have to improvise via the breadboard by doing female to male to breadboard to male to female (only have male/female wires) 😆
I don't think God wants me to have an arduino. He's probably right
Well... maybe God wants you to have the right Arduino for the right project 🙂
maybe I should stick to IoT/webhooks projects as that's what this one was made for really
Just be aware that the holes in each row (a,b,c,d,e) are connected with each other. So the way you've inserted the pins (in a and e) means they're connected with each other.
yep I wanted to complete the circuit via the breadboard so that's good news 👍
think of it like an elaborate single wire lol
Cool 😄
I just realised that the arduino has female ports for all its sockets as well as pins 🤦♂️
I'm guessing that means I have a choice of which to use for whatever port?
(told you I knew nothing)
@vivid rock Yes most of the ublox also have an i2c interface
Its really a shame a lot of the breakout boards for ublox modules just break out uart and leave out piles of great features
It’s not like copper tracks cost more money just route all the pins :/
Pins take room - probably they try to make the breakouts as small as possible..
Either way, leaving out PPS is a criminal offense 😝
@cedar mountain it's a IDE error
Gotcha. That makes sense, because it looks like valid code from the compiler perspective. Just fix the variable naming, then.
thanks 🙂 worked
i was tired of using Arduino IDE 🙂 so i switched to VS Studio with platformIO 🙂
Do you like it better?
Yeah, not as easy to come by. Here's a European distributor, for instance: https://www.mirifica.de/en/cd-top/mediatek-mt3333/cdtop-technology-pa1010dv2-cd-pa1010d2_100011_1308/
@cedar mountain software serial could also work for https://www.adafruit.com/product/790 🤔
idk how demanding running the quadcopter flight algorithms are tho
Couldn't say, I'm not familiar with the processor used in that quadcopter.
it's based on an esp32
also
I have the impression that you can't turn on an imu (accel, gyro, mag) while it's in motion or else it'll think it's still in motion when you bring it to a stop (it assumes it's state when its turned on is the 0)
is that true?
normally you'd want to turn on the IMU before taking flight
is there any reason not to do it?
I'd like to turn it on in my hand
maybe a small battery to keep it on?
initialize it in a static state
then keep the state locked with a battery
The IMU itself can be powered up in motion (after all it'll always be feeling gravity in some orientation, for instance), but sometimes the driver libraries for it will do an initial calibration based on the start-up condition.
Hello,
I think i have hardware probleme with my elegoo uno R3 board
anyone can help me for some test plz
is there any use in this
#define FRAMES_PER_SECOND 120 // FRAMES PER SECOND (FPS)
FastLED.delay(1000/FRAMES_PER_SECOND);
Jumping an input with internal pullup active to VCC - Can I do it?
As I understand it will do nothing, as it'll simply be a 20k-ish resistor in series with two iterations of the same VCC net.
This is my running light animation
void RunningLight() {
const uint8_t num_waves = Spacing; // results in three full sine waves across LED strip
static uint16_t delta = 0;
for (uint16_t i = 0; i < NUM_LEDS_PER_STRIP; i++) {
uint16_t a = num_waves*(i+delta)*255/(NUM_LEDS_PER_STRIP-1);
uint16_t ni = (NUM_LEDS_PER_STRIP-1) - i;
leds.data()[(ni)] = CHSV(Hue, 255, sin8(a));
}
delta = (delta + 1) % (NUM_LEDS_PER_STRIP/num_waves);
}
im using HSV color and i have a variable that stores my brightness LEDBrightness but how would i controll the brightness on this animation? sin8(a) is in the Value spot so
value = brightness
The V in HSV is for the brightness.
well leds.data()[(ni)] = CHSV(Hue, 255, sin8(a)); sin8 is at that spot :S
What is it that you're trying to achieve?
@lone ferry i need to be able to controll brightness for each LED strip 🙂 the FastLED.setBrightness is global and controlls brightness for all strips! so by setting "LEDBrightness" on HSV (Value) i can controll the brightness on each strip (i have 4 strips each on different pins) 🙂
Then do leds.data()[(ni)] = CHSV(Hue, 255, LEDBrightness);
hello. first project in 8 years. wow the libraries are amazing now. fummy i jumped in and read whats happening with led's. I'm working with fastLed too!
@lone ferry then the animation wont work correctly!
In order to make it work i have to make a sin on the brightness value to split up the num_waves :)
uint16_t a = num_waves*(i+delta)*255/(NUM_LEDS_PER_STRIP-1);
leds.data()[(ni)] = CHSV(Hue, 255, sin8(a));
I have no clue what you're trying to achieve with this LEDBrightness variable.
Hello,
I think i have hardware probleme with my elegoo uno R3 board
@tely#5676 I might not be much help since I'm not too familiar with Arduino, but what's going on?
@lone ferry what im trying todo with the LEDBrightness is to controll the brightness of EACH strip individualy! 🙂
why does this say identifier "initialhuye" is undefined ?
void Rainbow() {
static uint8_t initialHue = 0;
byte changeInHue = 255 / NUM_LEDS_PER_STRIP;
// INITS
initialHue += 1;
CHSV hsv;
hsv.hue = initialhue;
hsv.val = LEDBrightness;
hsv.sat = 240;
for( int i = 0; i < NUM_LEDS_PER_STRIP; i++) {
leds.data()[i] = hsv;
hsv.hue += changeInHue;
}
}
it is misspelled initialHue capital H
@pine bramble yes, it should be OK
@odd fjord doh xD
hi, so im working on what i thought would be a super simple project. its a nodemcu connect to a analog water sensor to send a text if there is a leak. I have worked with nodemcus before with little issues. but this time I cant seem to get my serial moniter to work and i think the sketch is stuck in the setup function. it repeats this over and over again:
ets Jan 8 2013,rst cause:4, boot mode:(3,6)
wdt reset
load 0x4010f000, len 3664, room 16
tail 0
chksum 0xee
csum 0xee
v39c79d9b
~ld
TESTING FOR GOD SAKE (this is a println in my setup function)
looking for anyone who can help!
I think "WDT reset" is a watchdog timer reset: that gets triggered if the CPU either gets stuck in an infinite loop somewhere, or doesn't call the code to reset the watchdog timer periodically.
not sure how to fix that, im not doing anything special with the code its the "AnalogOutSerial" example without the use of the LED and Serial changed to 115200 bps. any idea how to fix the problem?
You can try sprinkling prints and yields in setup to see how far you get
i did that, it gets to the last line in setup
"Serial.println("TESTING FOR GOD SAKE");"
Then the problem is in the loop
if i use this
void Rainbow() {
// Variables
uint8_t initialHue = 0;
uint8_t changeInHue = 255 / NUM_LEDS_PER_STRIP;
// INITS
initialHue = initialHue + 1;
fill_rainbow(leds.data(), NUM_LEDS_PER_STRIP, initialHue, changeInHue);
}
the rainbow pattern moves
but if i copy the raw code
void Rainbow() {
// Variables
uint8_t initialHue = 0;
uint8_t changeInHue = 255 / NUM_LEDS_PER_STRIP;
// INITS
initialHue = initialHue + 1;
CHSV hsv;
hsv.hue = initialHue;
hsv.val = LEDBrightness;
hsv.sat = 240;
for( int i = 0; i < NUM_LEDS_PER_STRIP; i++) {
leds.data()[i] = hsv;
hsv.hue += changeInHue;
}
}
the rainbow patterns shows up but does not move :S why?
oh that's right! it was static
i keep missing the small stuff -.-
ty @cedar mountain
Hi. I've written my first sketch in 8 years. As I said when I joined this server all these libraries are amazing! There is so much I don't know. I usually just build the hardware and my friends would come over and we would party as they coded and I soldered. Well I've moved and I don't have those resources anymore and I've had to learn. Could someone please look over my sketch and give advice? On my list is 1: optimize FastLed library for my needs. 2: turn colorMix into an array or use a library function. 3: Better Debounce for the buttons. 4: Debounce the rotary encoders. 5: Headless menu (single WS2811 pixel?) I'll listen any advice thrown my way. This is a dumb RGB/CW/WW strip, 5 n-channel MosFET and 5 push button rotary encoders. https://create.arduino.cc/editor/frustro/4cc58428-4b89-40c5-8507-6bba7174d1fd/preview Thank you.
Arduino Create simplifies building a project as a whole, without having to switch between different tools to manage all the aspects of whatever you're making.
found and fixed the bad copy paste in colorMix. no need to point it out now. 🙂
you can use the blink or fade sketch examples in the IDE or Create site. Both do analogWrite. or you can smoosh them together. There is no RTC (real time clock) so it wont be perfect timing but they will work.
probably not a good idea to hook up a motor directly to the arduino even if its a light load
Even if the current draw is low enough (10mA or less), motors are inductive, so you'd want a protection diode: without it, the collapsing magnetic field when the motor is turned off will create a voltage spike that can damage things.
yup its not about the current draw its about the voltage spikes they can produce due to being inductive
also im not sure you can straight up delay the arduino for 15 minutes. what i'd do is make a counter and add 1 to it after every minute delay and once the counter reaches 15 do whatever and reset the counter variable to 0
You can make a 15 minute delay, just it's smarter to use a millis comparison
Any here...plz help me to learn something new in arduino uno I have complete basic programs on sensors and complex breadboard connections......
you may have to be more specific than that
Go ahead and just ask the question @quaint dune luckily for you this channel is just for that 😉
Can u plz let me know that what next should I learn in arduino uno...(I tried searching this information on net but I didn't get it )....
I would work to complete some sort of project, you will learn many skills in even basic projects making things you want.
does anyone know how to switch a nodemcu bootloader back to normal, I think i may have accidentally switched it. all i can find is that i have to "pull" gpio 2 high and 15 low, does that just mean connecting them to ground and 3v? do i have to have that permanently?
Yes, connecting them to 3V and ground. I think you just have to connect them for long enough for it to boot into the mode you want.
do you know how its possible for its mode to switch in the first place?
I can only guess, but my guess is that its startup code reads the values on those pins and jumps to different code depending on what it finds.
Or are you asking why it's coming up in a different mode than it used to?
why it switched modes, it happend on 2 diffrent nodemcus, with the same project but they arent even using any of the pins listed in the wiki as being used for bootloader config
There are lots of possibilities.
as long as it gets fixed it doesn't matter to me, thanks
got any floating pins?
not sure what the means...
anyone know what it means when the code outputted from a esp8266 get request is -1? i googled it and cant seem to find any info on the codes
@unborn frost Is it the client.connect() that is returning -1? connection failed, no specific reasonhttps://www.arduino.cc/en/Reference/WiFiClientConnect
http.begin("https://maker.ifttt.com/trigger/flood/with/key/CODE"); //Specify request destination
int httpCode = http.GET(); //Send the request
Serial.println(httpCode);
the httpCode is the num im refering to
-1 isn't a valid HTTP code. what board and library are you using?
scrolling up... 8266? sorry, that was in your Q. Can you link to the library?
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
im asking what does that code mean, the url is not being called like it should be
According to the library source -1 is returned when no info was returned from the request.
so what does that really mean? it was working fine an hour ago and then suddenly it started passing -1???
Looks like a HTTPS request but you are using HTTP
wow, idk how i missed that. ty so much!
You might need a fingerprint for SSL
does anyone here have any experience with Arduino + Firebase?
or can anyone recommend a platform for connecting and interfacing multiple ESP8266's (both inputs and outputs) all over the country to a central database?
Hello, anyone knows why my tic tac toe game isnt working? i used this video https://youtu.be/vXuttFxP_to and i also used his code but its not working. When i tried opening the serial monitor and i clicked in an area, it was giving me the right coordinates but on my touch screen, everything is white. i used this touch screen for this game https://www.amazon.com/Elegoo-EL-SM-004-Inches-Technical-Arduino/dp/B01EUVJYME/ref=sr_1_8?dchild=1&keywords=elego+touchscreen+arduino&qid=1594757604&sr=8-8.
In this Arduino project video we are going to build an Arduino Game, a Tic Tac Toe game with a touchscreen. It is an easy and fun project for all ages. Let's start!
In this video we are going to build an Arduino Tic Tac Toe game. As you can see, we are using a touch screen an...
Amazon.com: ELEGOO UNO R3 2.8 Inches TFT Touch Screen with SD Card Socket w/All Technical Data in CD for Arduino UNO R3: Industrial & Scientific
and here's the code, https://hatebin.com/ffovhiqvgf
And on the serial monitor its giving me things such as player's turn and Arduino's turn and other things.
I hope anyone will be able to help.
Have you tried just running sample code for the adafruit gfx library?
@shell cargo sorry for being late
@shell cargo but what do you mean???
@shell cargo i dont understand what you mean
file > examples > it should be under custom libraries
@bleak kayak can you please call just for screen share?
@north stream join general
okay
actually whatever
sorry
my computer is slow so im not able to do anything
sorry
yeah okay np
can anyone recommend a platform for connecting and interfacing multiple ESP8266's (both inputs and outputs) all over the country to a central database?
Yeah adafruit IO is amazing but sadly costs too much for me to pay for the small project I'm doing
Is there a non-intensive way to constantly listen for web requests from the ESP8266?
without port-forwarding or necessarily running a web endpoint
I've sadly had to mark Arduino Firebase as an unviable option due to having to manually set the SSL fingerprints every now and then
You want to make web requests without running a web endpoint?
yeah well I'm fine with running a web endpoint (technically I'd have to) but it has to work without port forwarding
I actually just found this: https://github.com/mobizt/Firebase-ESP8266/
I don't see why port forwarding would be necessary unless you're crossing networks
I am crossing networks XD
the above library allows streaming data so I'm giving it a shot right now
trying to create long distance lamps (with some extra features) using 3 Wemos D1 Minis
This
#define FRAMES_PER_SECOND 120
FastLED.delay(1000/FRAMES_PER_SECOND)
can this also be used with millis or is it just stupid? 😛
But it is using milliseconds?
no delay is stopping the entire script but fastLED still keeps fastLED.show() running
Oh you mean you want to use the function millis()?
yea like
// Current Millis Time
unsigned long curtime = millis();
// Check Current Time against Strip Array Time and update accordingly
if (curtime >
lastUpdate)
{
lastUpdate = curtime + 1000/FRAMES_PER_SECOND;
// Update Code
}
I don't see why that would not work.
well i've already tried this and the ESP32 crashes
I'd need to see more of the code to be able to tell you why.
Does that really work as expected? I'm not sure.. I would try // Current Millis Time unsigned long curtime; //this can be done earlier curtime = millis() // Check Current Time against Strip Array Time and update accordingly if (curtime > lastUpdate) { lastUpdate = curtime + 1000/FRAMES_PER_SECOND; // Update Code }
What do you mean by "crashes" ?
if(curtime - lastUpdate > 1000/frames_per_second) {
lastUpdate = millis();
It is not really clear what the intent is... as I read it -- it seems like lastupdate is actually the desired time of the next update. As noted above, i think we need to see more code to really help.
That code as written is unclear and has a confusing name, but it should work just fine. I'm pretty sure that's not where the problem is. But it's also not clear what the problem actually is and what the code is really doing. 😄
agreed -- I was confused by the "local" declaration of curtime=millis() -- I'm too odd school for that 😉 but I agree, it seems like it should do what it says... whether that is what is really wanted is another matter.
i got problem with this where do i wrong? please help
change "DHT" to "dht"
thats isn't work too
I wondered about that dht.read11() does not exist -- -- I think it is just dht.read()
let me try it
where did you get that example?
i just search form google arduino project community and get that
ok -- is it working now?
its work bro but now is the bottom should i change it to DHT?
look at this example https://github.com/adafruit/DHT-sensor-library/blob/master/examples/DHTtester/DHTtester.ino (you'll have to change it for DHT11) and this guide https://learn.adafruit.com/dht
I'm not sure what library you are using -- do you have a link to the guide you followed.
It also may just be that you needed to use dht.Temperature() and dht.Humidity() -- capitalized T and H --- it depends on the actual library you are using.
hmmm -- that just may be out of date -- try the guide posted above.
here is another guide https://www.makerguides.com/dht11-dht22-arduino-tutorial/
How do I turn 2 bytes into a 16bit integer?
@safe halo are the values signed or unsigned?
Unsigned. they are 001,067 in Decimal
uint16_t n=(byte1<<8)|byte0;
byte0 is the least significant byte
if you want to understand how it works, check https://playground.arduino.cc/Code/BitMath/
hello!
I need to measure current from mains 220Vac. I'm measuring my TV power cable to know when the TV is on or off so I can send IR signal to turn it on or off. Thing is it consumes very little current and my sensor couldn't get it. When its on deep sleep the current is less than 20mA and when its fully on the current reaches 200mA. Can you guys sugest me a sensor for it?
lets rephrase, I've tried the ACS712 with no luck. Is the WCS1800 board with built in amplifier enough to sense a 180mA change?
I might look at a current transformer. It could be trickier due to waveform/power factor issues too.
also, 200mA seems low for a TV, how many watts is it rated for on the rear panel?
It's possible to use something like a V9261F chip and a sense resistor to get accurate readings, but that requires some complexity, expense, and engineering.
@obtuse wedge - a thought: does the TV have a USB port? Those are often unpowered when the TV is off or in sleep. If so... Could be a much easier way
the wonder of these forums, 2 (or a dozen) heads are better than one!
the wonder of these forums, 2 (or a dozen) heads are better than one!
@reef ravine Indeed!
@obtuse wedge - a thought: does the TV have a USB port? Those are often unpowered when the TV is off or in sleep. If so... Could be a much easier way
@obtuse spruce Sir you may just have saved my day!
😁
@obtuse wedge btw, there may be a menu setting to disable USB power in standby if it doesn't default that way
Sense your AC cord current with a coil sensor. Non invasive and you can isolate your controller from the high voltage stuff. Not sure why that AC712 didn’t work out for you. Sensitivity is 185mV/A. You should see 0.2x185mV and 0.02x185mV + VCC/2 (2.5V) on its output. You could add an amplifier to increase your sensitivity if needed. Make sure you match the common-mode of the output.
Oh .... did you rectify the output since you are sensing an AC current?
It could be that the power supply is just refilling reservoir capacitors during the peaks of the AC waveform, drawing narrow high current spikes: an ordinary rectifier will act as a peak detector and make even a low power draw look higher than it is.
Well, rectify and low pass filter ... you should get a good estimate of the rms current
That AC current signal will look rather wonky in the time domain
hello there. Does anyone knows how to reset an Arduino Uno. Somehow the IDE is not detecting my usb port anymore...
Press the reset button is for a reset, but I assume you men reflash a bootloader?
Your COM port? You might need to reinstall drivers
Sometimes a PC restart is all that is needed
Agreed, and if not, does it work in another computer?
i did restart several times and tried different cables. nothing!
though i did config the Uno as a MIDI Interface. Usually i just needed to touch the two last pin to swich mode... but not anymore!
yes i meant reflash a bootloader, factory settings
is it the SAMD library i should check?
@pine bramble search for "Arduino as ISP" if you have a second arduino
It is an example sketch in Arduino that allows you to use an arduino to program another arduino via ISCP
Then you can use the burn bootloader option in tools after selecting Arduio as ISP as the programmer
Trying to figure out where the Wheel() function is inherited from in Adafruit_Neotrellis
According to docs there is no public function called Wheel in Adafruit_NeoTrellis
I'm trying to integrate the basic neotrellis example into my project but I'm getting scope issues with wheel
it works in their example when it is compiled on it's own
Link to example?
but the the inheritance chain seems obfuscated
Its not a class fucntion
is there some kind of implicit inclusion of libraries that I don't know about?
No, its not in the library at all, all the examples define it in the bottom on the file...
what the deuce?? I might have missed that
I downloaded the code, no mention of it outside of the examples and each define their own
wow ok, yeah I'm new I guess?
uint32_t Wheel(byte WheelPos) {
thanks, I feel...not smart
Its okay, I understand the feeling. Check out PlatformIO if youre using Arduino IDE
Then you can ctrl click into functions to see their source
For what it's worth, I totally missed that too... I'm so used to needing to have things defined before they're used in C, that I didn't even bother looking at the end of the same file.
yeah I had pasted that declaration within loop(), moved it to the bottom but it still tells me it's undefined
Code? And its good practice to always have your functions above where you use them
@stuck coral This is a big ugly project. Might not paste well
You asked for it: https://pastebin.com/TVDdaxn9
They don't have to be defined, but they do at least have to be declared. But if you don't feel like doing declarations, the easy way is to put the definitions before the references.
Yeah, does declaring it before loop help?
Yes, I normally declare all of them up top, after any #include or #define statements, before global variable declarations.
Seems you have functions in fucntions due to a bad copy paste... i see a extra } at the end of the file
Oh nevermind, didnt see the second for loop
Hm
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I dont think ive seen that before in a complier message for Arduino, does that give a better hint?
Looks like it's trying to reference something called Wheel() and can't find it. I'm guessing that's some sort of color wheel routine, but I don't know where it would be.
In the code its a function he wrote, where is your new declaration @wanton mirage?
But does map() return a byte type? Im not familiar with that function on a technical level'
@north stream I put it between setup and loop
Try declaring it before its first use
And I take my byte type comment back, I can see it being used in the example like that
I bet thats your issue, I thought you only used it in loop, I misread
Yeah, it gets used in TrellisCallback (line 74) but it's not declared until line 308. So you'd either move it above TrellisCallback or add a declaration for it above TrellisCallback.
need some help...was looking at this videohttps://www.youtube.com/watch?v=RwHGioglbk8 and was having a difficulty where the light always stays on even when theres no sound at all,not sure what to do
Materials required:
1)An Arduino Uno(with its adapter)
2)Sound sensor
3)Jumper wires
4)A LED
Hope this is helpful.
Check out the code here: https://kandrproject.blogspot.com/2018/01/arduino-with-sound-sensor-and-led-code.html
@north stream moved up there, now It has a problem with fastled.... looking
any idea what to do on the video though?
Which sound sensor are you using?
Have you tried adjusting the potentiometer on it?
(I didn't watch the video, so I'm guessing)
there is no potentiometer
juust the usb the arduino,the wires,the led,and the senser
The one in the still you posted above appears to have a potentiometer
there is no potentiometer
I think he was talking about the one on the sound sensor, but does changing the threshhold help you if you dont have one?
i tried adjusting the one on the sensor but nothing happens when i do(potentimeter)]
If you add a Serial.println(soundsens); delay(50); After your if statment and you're quiet what does it print out, and does it change when you make sound?
after which statement
The only if statment in your code
Sounds like something isnt connected right, what pin are you using on what board?
im using three out of four pins on sound sensor,the ground,the DO,and the +. The ground connected to ground,the + connected to 5V,and the DO connected to pin 11,the LED connected to 13 and ground
what pin are you using on what board?
what do u mean
arduino uno
Ah, which pin on the UNO?
I see 11 in your code, but that will not work, note in the video they're using A2
A for analog
yea but he said you change to it if u change the code
You must use a analog pin labeled with a A, otherwise it will only work as a digital pin
Same value printed to console?
yea
Does your sound sensor have a pot on it?
yup
If you adjust that while the serial monitor is printing the value does it change?
the potentiometer doesnt do anything when adjusted
no
If everything is connected right, and you are using one of the analog pins on the arduino, and the analog value read is not changing, it sounds like a bad sound module to me.
dang ok
What pin is it on now?
a2
And you changed soundpin to match?
yes
And your serial monitor just spews a bunch of 1023 values?
yea
Hm, yeah, then if its connected right and the pot doesnt change anything I think its the sound module
Just to double check, you also changed your code to use A2?
arduino uno analog pins are from 14 (a0) to 19 (a5) arent they?
Uno pinout
people still use the UNO.. wow
For many tasks, it's entirely sufficient, and if you damage the CPU, you can easily replace it.
yeah, I know - I just feel nostalgic looking at it. Given that Nano is more powerful, cost half the price, and is smaller, I woudl expect most people to move to mini/nano or other boards
I find myself using a variety of boards for different projects, I've used a Uno in the last week even.
of course for many projects UNO is more than adequate, I use it too occasionally - but would probably not buy another UNO if mine dies
Hmm, good point. These days, if I completely ran out of Uno boards, and I wanted a full sized Arduino, I'd probably get a Metro 328, or if I were pinching pennies, a Seeeduino V4.2 or if I wanted an extra hardware serial port, an Elektor R4.
i just ordered me some attinys 😄
gonna try to make a bunch of solar lights that flash with music
Heh, I just built one of the ATtiny Trinkets into a project
but still, trinket M0 is only $2 more than trinket attiny
The M0 is much more powerful and has way better USB support, but I still had some of the old ones, was driving a 5V peripheral, and have an older computer that still works okay with the ATtiny bit-bang USB.
Normally when I want to drive a 5V device, I look at an ItsyBitsy, but while they're amazingly capable, they don't have mounting holes, so I'd have to use https://www.adafruit.com/product/1116 or come up with some other method of securing one.
The Trinket is utterly dwarfed by what it's driving, but it works fine.
what is it driving?
Can someone help me with a Trinket M0 problem? I'm trying to connect a SPI TFT to it, and nothing appears to come out of the MOSI/SCK pins
@north stream have you ever done this?
I'm working on getting my Animated GIF code to run on the M0. It needs about 22k of RAM for the GIF decode and I'd like to make it work on all platforms with >= 32K of RAM
Soon to be in an Arduino library. Demo image is 128x128 pixels and 15 frames. Display is a ST7735 128x160 LCD @ 30Mhz SPI. First (largest) frame decode time = 840us.
Amusingly, I'm also working on AnimatedGif, but on a Teensy 3.6, which needs the newer style SD library
My code should be faster than the Adafruit version because of the way I handle the incoming LZW data
I don't think I've tried to use SPI on a Trinket M0. I didn't think SCK was even pinned-out
it's listed on the docs page as being 3 = SCK, 4 = MOSI
Ah, you're right, I was looking at the schematic and there's a lot going on
I'm doing the usual SPI.begin() just like for other target platforms. The SCK pin gets stuck high and the MOSI pin is stuck low
They're also RX and TX, I wonder if some other subsystem has grabbed the pins
How are you instantiating SPI? Are you specifying pins and sercoms?
I'm not sure which sercom and pins the default SPI is (might be the one connected to the onboard DotStar). You may need to instantiate one explicitly like ```C
SPIClass mySPI (&sercom1, 12, 13, 11, SPI_PAD_0_SCK_1, SERCOM_RX_PAD_3);
There's a lot of info here https://learn.adafruit.com/using-atsamd21-sercom-to-add-more-spi-i2c-serial-ports/creating-a-new-spi
thanks
Note that sample code is just lifted from the page and is likely not correct for the Trinket M0
yep
Reading further, there are pinPeripheral() calls to assign pins to functions, you may need to do that too
The default setup in SPI.h seems to have the correct connections to match the docus
Ah, that helps.
yet, it still outputs nothing 😦
It's hard to believe no one has tried to connect an LCD to a Trinket M0
I assume somebody has tried, I've found a few posts on using Trinket M0 SPI for DotStars, but they're using CircuitPython.
looks like board definition files for trinket m0 already have pin definitions for SPI interface, so there should be no need to create a new one:
/*
- SPI Interfaces
*/
#define SPI_INTERFACES_COUNT 1 // shared with I2C/UART (can't do both)
#define PIN_SPI_MISO (6u) // PA09 same as D2
#define PIN_SPI_MOSI (4u)
#define PIN_SPI_SCK (3u)
#define PERIPH_SPI sercom0
#define PAD_SPI_TX SPI_PAD_2_SCK_3
#define PAD_SPI_RX SERCOM_RX_PAD_1
this is from packages/adafruit/hardware/samd/1.5.13/variants/trinket_m0
exactly, but that doesn't seem to work 😦
Have you tried using pinPeripheral() to set the pin MUX to SPI?
that is already being called in the SPI library
I was wondering if it's possible to use a TMC2208 in UART mode with a nano?
I have built an environmental sensor on a feather huzzah similar to project in Adafruit examples. I have ran blink test and successful connection of feather to wifi but when i add my sensor hat and try to upload example code i get Compressed 410528 bytes to 301350...
Wrote 410528 bytes (301350 compressed) at 0x00000000 in 26.5 seconds (effective 123.8 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
which seems ok but when i open serial monitor it looks like this
��
⸮/*****����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 3664, room 16
tail 0
chksum 0xee
csum 0xee
v39c79d9b
~ld
�����������������������������������������������������������������������������������������������������������any help would be greatly appreciated. I got about two days of googling and i am def still new at IOT so obvious answers can be possible solutions.
@cosmic field next time could you format that wall of text please or use pastebin? But did you select the correct baud rate in the serial monitor?
yeah sorry im new to discord joined out of desperation and i apologize for my text blob. and yes i am at 115200
Could we have a pastebin of your code?
lemme give it shot. You want code im uploading? Also thanks for your help
Correct, and np. If you never used pastebin I like ubuntu's version https://paste.ubuntu.com/
ok yeah its new ill try that. also this code is provided as an example under arduino io
Okay, you could also just send the link for the example on github if you didnt change anything
I see a 9600 baud rate Serial.begin(9600);
ahh i never thought the code would be setup incorrect
The code isnt, you selected the wrong baud rate in the monitor, either change your monitor baud or update that line to use 115200
9600 is the default, your ESP32 happens to use 115200 for the bootloader, the code is for other devices too
Yep, either or, I like making everything 115200
No problem, youre not the first newbie here, its what we're here for
Awesome thanks for help also im kind of into learning this stuff any resources or classes that stand out?
Well learn by doing, google, Adafruit guides, Adafruit forums, EEVBlog forums, I like reading technical documentation which explains exactly how functions like serial are used.
oh cool now im getting actual error messages to fix my bme wiring oh how i need to improve my soldering.
cool yeah im a software dev so docs are my jam
None of us but maybe EdKeyes were born with a sodlering iron in our hand. Arduino has OK docs, usable for getting started
At arduino.cc
No problem! Glad to help
oh while im here is there a way to test electrical connections on a sensor with a multimeter?
Yes and no ... which sensor?
bme680
also just realized this code is for bme280 which will also complicate things 😆 oh learning is fun
Lol, to check connections multimeters have a continuity mode but that error will come up with the wrong sensor
awesome had hoped that would work
I bet switching a library out would be fairly easy to use the right sensor
now to figure out what programming changes need to be made for 680
Well this guide here should give you most of the info you need, start with an example to see if your setup works than remove the bme280 code in your current sketch and replace with the libray for 680 https://learn.adafruit.com/adafruit-bme680-humidity-temperature-barometic-pressure-voc-gas/arduino-wiring-test
I’d talk to it via SPI/I2C rather than fiddle with a multimeter
This puppy doesn’t really bring out any analog levels
Yes, he was asking how to verify his solder joints, I was answering that but noting his issue is the library
So for future reference, continuity mode can help verify electrical connections
Btw, a decent soldering iron goes a loooooooong way
Hakko FX888D with chisel tip FTW
will do thank you so much.
So im back and after changing it to BME 680 which wasnt much it is saying check my wiring. Now this seems like a semi obvious question but does that def mean its my poor soldering or could it still be based in programing ? Also i do have a good iron just no technique. I will try my chisel tip as round has seemed messy in these tight spots.
make sure they look like VERY SHINY Hershey Kisses!!!!
oh boy here we go they dont look that shiny and i should have eased into this pool instead i went for install on feather proto so ill send a few pics
the bottom seems brutal looking but fully connected
another of the bottom
and if u tell me to desolder it all and start again i wont be offended lol.
is that a short near SCK on the 680?
super possible two big globs near each other but dont seem to be touching. I think its time to go in there and try and clean it up.
some tips
just hoped i could blame programming and not my solder job
make sure the tip is clean, damp sponge or similar
heat both the pad and pin at same time
use as little solder as possible
ok ive got wire ball but spoge is good as well?
wire ball works too
ok yeah im learning the pad pin method i was doing it was wrong for a while
like "brass steel wool"?
yeah came with setup
works great, clean the tip, clean the tip, don't think about it, clean the tip lol
what is best way to clean solder off of the board?
yeah im a clean freak so that has helped
solder wick or a "solder sucker"
wick might be better, just want to remove some solder
heat both parts (quickly) then apply small amounts of solder, don't press the tip too hard to both parts, contact but no pressure
awesome thanks for tips i really appreciate all the help on here. Hopefully i can pay it forward once im done being lost with all this.
i've seen worse from a first timer
often all the pins get soldered together, sure to trigger "check your wiring" (or release the magic blue smoke)
ahh i could see that
when the solder flows remove the solder and pull the tip up, so the solder follows it and you end up with a shiny "Hersey's Kiss" shape
ok that makes more sense ive only welded so def not same tactics.
NO, you're not going for welded plate strength, just flow of solder 🙂
yeah prolly why i have so much on my bottom act like i was building a wall lol.
yeah its definitely becoming clearer, now to find my short so i can get this thing running!
it may also be open, the solder can flow "around" a pin and not make contact
ahh i do have one that kinda looks that way
Soldering
so too much heat could mean the board is bad?
it may delaminate the pad from the PCB, yours didn't look that way though
ok ill hope for the best
generally you really need to press and hold too long to ruin the board
ok def have one or too that have the too much heat look
the ones in the pic look like "cold joints", lots of solder but may not be connected
yeah i was having heat issues at first not sure what setting to put it on.
adjustable iron?
i wanna say 250 -275 cels usually
crank it up a bit, 350
ok sounds good. got a little smoke but thats ok
the solder has flux in it (usually), it helps clean the connection as it solders
the flux smokes
often marked "rosin core"
do not use plumbers acid core
ok yeah i think my solders ok i have 1mm and .6 and they both say flux 1.8%
fine
awesome well im gonna go make a mess and see what happens. Hopefully ill be back with good news but thanks again.
np, good luck and happy hacking!
Hello. Looking for some help with updating the UF2 bootloader and installing CircuitPython on a Feather M0 RFM9x using Arduino IDE version 1.8.13 on a Raspberry Pi 3B+ running Buster. When I try to load the update-bootloader sketch to the M0 I get the error below. Looks like a problem with my Arduino IDE install, but have not found a solution. Any suggestions appreciated:
Arduino: 1.8.13 (Linux), Board: "Adafruit Feather M0, Arduino, Off"
/home/pi/.arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/arm-none-eabi-ar: error while loading shared libraries: libfl.so.2: cannot open shared object file: No such file or directory
exit status 127
/home/pi/Downloads/arduino-1.8.13/arduino-builder returned 127
Error compiling for board Adafruit Feather M0.
You can download a UF2 file and just drag it on the feather after double tapping the reset button to update, I forget where the link to it is
There is a specific update UF2 UF2 file
Aha!
apt install libfl2 libfl-dev
is there anyone can help? ive got an error on this
You mistyped min_temp as main_temp.
.-.
Thank you @thorn relic. That fixed the share library issue.
Odd question can i emulate multiple sound cards with an arduino like a virtual audio driver so like a phical voicemeter if you will.
thx in advanced.
I suspect you'd need something more powerful than an Arduino (and something that can implement different USB interfaces). A Teensy 4 might be a workable choice.
thankyou
I found this https://openaudio.blogspot.com/2016/10/teensy-audio-over-usb.html.
And this https://www.cirrus.com/products/cs42448/.
but im a bit new to Teensy etc and wondered if it would allow me to have more that one input and out put the chip does but again not sure if it would allow multiple USB devices rather than phyical/analog inputs/outputs.
You'd probably have to add on separate DAC boards for more than stereo output. This would be fine for stereo https://www.adafruit.com/product/4384
ok thx for the help ill do some more research
I'm getting this weird issue that if I put a pullup on my SDA line of I2C everything runs great, but if I put on on SCL also it ruins communication over the I2C bus
Hello, I'm a little curious as to what could cause the green led to be much dimmer than all the others, if I disconect the blue next to the green it burns much brighter.
The is my absolute first venture into hardware coding. I'm normally a fullstack web developer, but I wanted to branch out a little.
I've searched around trying to figure out if the colour green requires more current than the others, but I couldn't find any related results in the different requirements on different colours.
Voltage drop is different for different LEDs: https://en.wikipedia.org/wiki/LED_circuit
Meaning, each time the current passes thru an LED it's going to drop the overall current.... somewhere around 1v I think. Different colors drop by a different amount. So if they're chained together, you'll cause drops the farther down the chain you go
So, to prevent that, you use a resistor and dedicated voltage line for each LED
Here is some more info from Adafruit: https://learn.adafruit.com/all-about-leds/the-led-datasheet
Thank you, both of you. This is very interesting. And very far from PHP and Javascript xD
Can any one also help me identify these two items. They are not listed in the Inventory list. But the kit is a second hand, not expectations were low 🙂
Diode on left, Capacitor on right. 104 means 100nf
@proven mauve i2c can be tricky. Could it be that there already is a pullup - sometimes they are built into device/sensor?
what voltage do you use, abd what pullups?
@vivid rock when I use a pro micro, it doesn't need additional pullups, I think the capacitance is low enough that the internal ones that turn on with Wire.begin() are enough. But, adding them doesn't hurt, it still works fine. But when I use a socketed bare ATmega32U4 the communication with my eeprom starts acting poorly without pullups.
But it started getting a lot of misreads from the eeprom over i2c earlier when I changed back to a socket.... and the only thing that is making it run right is to have a pullup on SDA but not on SCL, and I'm not sure why. With the pro micro it runs with both, and the socketed has run with both before. Even if I disable the internal pullups it's the same thing.
Tried different eeproms, and tried moving to a different area of the breadboard, same thing. It's kinda weird
I think when I get rid of the socket it will probably stop being an issue.... been waiting for two weeks for the solderable adapter boards tho 🙁
Thanks once again @arctic minnow
Hello. I'm having trouble with a software serial problem. Basically, I scan an RFID card, it reads into memory, then it opens the door. The problem is with the SoftwareSerial, it stays in memory long enough for it to open twice when the card is not being read. Is there a way to reset the softawer serial pin or something or overwrite what was read so that this doesn't happen?
Sounds like a memory problem more than a serial problem but perhaps I am misreading
Here, I'll send the code:
server.handleClient(); //Check if webpage is requested
// If data available from reader
while (RFIDReader.available()) {
ReadSerial(RFIDTAG); //Read the tag number from the reader. Should return a 10 digit serial number
}
if (RFIDTAG.length() == 10 ) {
DisplayTAG=RFIDTAG;
Serial.println("Checking: " + RFIDTAG);
check(RFIDTAG);
RFIDTAG = "";
delay(1000);
}
}```
Basically it reads the length as 10, twice
I wonder if the reader is sending it twice.
How would I prevent that if it is
The code I was following (i kinda lost the guide lol) had it check if the card was read before but I can't have that because if someone scans it and forgets to open the door, they'd need to scan again.
I think the first thing is to find out what's actually happening, then try to figure out how to fix it.
You could probably prevent it by adding a short delay in the while available loop, so if more characters are received in short order, it reads them out of the buffer too.
Or you could have a "read before" with a short timeout so a real re-read would still work after a second or so.
Oh cool, the delay in the while loop solved the double open problem.
But it makes it slower to read lol
Yeah, the real fix would be to rewrite it to multitask instead of using delays
how would i go about that?
I've been using one of my ESP32 Feathers with MicroPython but now I'd like to switch back to Arduino. Does anyone have a link or the steps I need to follow in order to re-flash the ESP32 to run Arduino sketches?
@undone harbor -- I think you just need to set up the Arduino IDE for the ESP32 and it will flash it.
The bootloader is the same
Geez... guess I was overthinking it :)... thanks.
Hello
I want to make an esc spin my motor at full speed after 10 seconds of powering it on
Can someone help me with the code?
Ill be using an arduino UNO
You'll probably want to use the Servo library, since ESCs usually take a pulse-width signal like that to control their throttle.
It's a great time to learn, then! You should be able to find a suitable tutorial for the Servo library to follow.
Ive run into a problem...
I might have to hold on my project
that will give me time to learn
anyone around who might be able to help me with an issue?
be willing i suppose is the right question to ask
If you have a question, just feel free to ask
I'm trying to write code to drive a 7 segment display without a backpack
my code can multiplex certain numbers to each of the digits
i stored different states of the leds as a byte and set them as constants (i think) so i can just call the correct constant to display whatever digit i want
the issue im running into and im wondering if i coded myself into a corner
is that i want to receive an i2c transmission from a second, master, arduino and use that value to call the different constants
i might be explaining it poorly but thats the code i have right now
its defintely a work in progress but i cant think of a way to convert a value like say "300" into three different functions to call the correct constant to throw on the screen
I see what you are trying to do, does it not display right?
the code controls the display
right now i just have to manually input what number i want on each digit
Yes, but Im going to guess the numbers dont display right, is that correct?
no they do
Really? Okay
i have the delay turned way up so only one displays at once
but if i turn the delay back to 1
it multiplexes pretty well
not how digitalwrite is supposed to be used but clever
im open to suggestions if you think theres a better practice
So what is the current issue? And I mean, this works unless you planned your pins out really well
current issue: in order to get different numbers on the display i have to manually edit the code to change which ones show up
i want to be able to send it a value over i2c and decide itself which numbers to display
As a secondary device on the I2C bus?
hmmm before i dive into how I get a value from the master. i want to use the slave to convert the value it would receive into a tangible result on the screen\
in my head ill be ready to tackle the i2c code once i can manually put a value in the code and have it be displayed with just the slave
Most people setup their wiring or display functions to take a byte value and display the correct number
So if it took 0x1, than display a 1, as the display() function
If you run display(0x3) what shows up now?
okay this might be a really stupid question
but when you say 0x1 or 0x3 I don't really know what that is, is it shorthand for a byte?
to answer your question i just tried running display(0x3)
Its hex
oh duh hex
and i get segment 7 and the decimal point to light up
or rather segment G and DP
Either you will need a long case statment, or I think there is a way to arrange your digitalWrite(2, V & B10000000); to get that to work right but I may be mistaken
Maybe ```arduino
digitalWrite(2, (V & B10000000) ? HIGH : LOW);
so when you say a long case statement you're referring to something like
void myFunction(char fncLetter)
{
switch (fnLetter)
{
case 'X': setupX(); break;
case 'Y': setupY(); break;
case 'Z': setupZ(); break;
}
}
Yeah, kinda a ugly way to do it but it would work.
okay i found that example in an arduino forum post
i tried it but couldnt really get it to work
I tend to wrap stuff like that in a subroutine or a #define() to sweep the ugliness under the rug 🙂
Might make a constant array
Arduino also has a bunch of useful bitfield macros that will do some of it for you
so const uint8_t numbers[10] = {Display0, Display1 ....} then you can just do display(numbers[value]);
that is going way over my head. but it's called a constant array? that gives me a jumping off point to try and do some research on me own
lmao accidental pirate talk
i get about half of that explanation right now
Correct. Then use the value from i2c as a index in that array. Let me finish it and I think you'll get it
okay thank you very much
const numbers[10] = {Display0, Display1, Display2, Display3, Display4, Display5, Display6, Display7, Display8, Display9};
So then, to display any number, you can use your existing display() function, as display(numbers[value]); if value is three, then it will look at the third index which is the fourth value, Display3
woah
if value is 0 it looks at the zeroeth index which in that case is Display0
?
Correct, then with i2c just give it a number 0-9 and pass as value
okay
that looks a lot simpler than what i was trying to concoct up in my head
i have three digits, would it be better to just send three different variables, or convert a single value into its different parts
Either way, but then youre limied by bit size unless you send two bytes as a 16 bit value
No problem, have fun
in case youre wondering i also got i2c working
i can send over each digit and it works great
Oh awesome!
i was worried a bit because i found out you could only send a value between 0 and 255 and i was planning on sending the full 3 digit number and converting it at the slave but it turns out that you can just send three variables one after another and store them just fine.
probably better practice to do the former
but that would eb another thing id have to figure out
you could do with sprintf on master and sscanf on slave
are you saying use uart instead of i2c
over i2c
you can read serial prints over i2c?
i figured those were through the tx and rx lines
you can read from serial and send via i2c 🙂
very interesting
is the compilier just smart enough to assume that if im using the wire library that when i want to print something on the serial lines to just send it over the sda lines?
or am i completely misunderstanding
Why would you create a string from numbers when you can just send a 16-bit value @candid topaz? Thats just adding more data and another function
16 bits value is 2 chars
I thought he had only numerical digits
and wire library doesnt have parseIntUntil('\n');
yes only numeric values for me
currently
im making a clock so i dont see why i would need alphanumeric
i just checked and looks like Wire.beginTransmission(SLAVE_ADDR);
Wire.write(v2);
Wire.write(v3);
Wire.write(v4);
Wire.endTransmission();
gives a 3 digit line on the serial monitor
but you get "char" on slave side 🙂
whats the syntax for like putting code into discord i feel like a total noob lol
three `s
i will keep that in mind if i ever have to transmit text over i2c
thank you
'''Wire.beginTransmission(SLAVE_ADDR);
Wire.write(v2);
Wire.write(v3);
Wire.write(v4);
Wire.endTransmission();'''
hmm
Having problem uploading this libary to my raspberry pi, dont know what to do
```
oh silly me
Close, top and bottom of text, not on the sides of any lines
@astral gust Becuase you cloned it so it has -master at the end
Remove the -master from the folder name of the lib
Then restart Arduino
this guy just does not miss
Well when I do miss they tend to be doozies
@stuck coral thanks try it rn
no trust me my sample size is huge
so like this?
unzip them
Correct, but the source folder you have already in Arduino not the zip
and thats in downloads.. ok
Though if you change the zip any future extractions will be correct. If youre using add from zip then yes
But then you'll need to remove the old one
so i renamed the zip deleted the rest the other files then, just add via zip to the library if I understand correctly
If you deleted the folder in the Arduino libraries folder then yes, but I would have thought just renaming the source folder would have been easier
Anyone experienced Servo.h lib confilct with PWM on arduino mega?
I have my ENA = pin 45(PWM pin ) to control DC motor but if i add myservo.attach(9), it doesnt work anymore. Remove that line, it worked perfectly.
Do you have a compiler error or does the code compile just not work?
Not about the code, the motor cant run.
Code with a line number of what you added? Could you make a pastebin?
Sure. This is my code: https://pastebin.com/L1mxMDcB
Line number of that issue?
If i remove line #193, dribbler works well. Idk why
myservo.attach(10);?
Yeah, i meant something in servo.h lib conflicted with my ENA PWM pin .
Also, do you have a V1 or V2 motor shield?
Uhm, i use 2 motor shield, not a great choice ig. L293D for 4 wheels control. And small L298N for one DC motor
Does the servo work when you do that and not the motors?
https://forum.arduino.cc/index.php?topic=200885.0
I think my problem is kinda similar to this topic
Problem with servo.attach!
Also, still trying to understand the issue, that is my first thought, you are trying to use one timer with two libraries which is why I asked
Also, what board are you using?
Mega 2560.
Whe n you add that line, does the servo work?
yes, servo works, dribbler doesnt work
I also done see your ENA so idk what you mean by thats what you think it is, id think you'd leave that unconnected if youre not doing anything in code. It is possible the Servo and AFmotor library are trying to use the same timer. That is a issue of that old deprecated library
You could replace the library with good ol analog write, or use another library, or go through the work in changing the unused library to suit you but thats a lot of work if you havnt done that before
My bad, that's ENB for controlling L298N. I will look at the lib, maybe there are some problems with the PWM pin
There isnt an issue, the component within the chip that generates the PWM signal without CPU intervention called a timer is being assigned to both your servo and motor, which it cannot do
The chip/library are working as expected
I need to go to sleep, hope you figure it out, I would try not to use the old library, I ran into this issue when I had a similar project years ago. If you need any more assistance EdKeyes and MadBodger both will probably know the answer
Look like the servo.h lib also disables PMW signal to pin 44,45,46
For Arduino Mega it is a bit more difficult. The timer needed depends on the number of servos. Each timer can handle 12 servos. For the first 12 servos timer 5 will be used (losing PWM on Pin 44,45,46). For 24 Servos timer 5 and 1 will be used (losing PWM on Pin 11,12,44,45,46).. For 36 servos timer 5, 1 and 3 will be used (losing PWM on Pin 2,3,5,11,12,44,45,46).. For 48 servos all 16bit timers 5,1,3 and 4 will be used (losing all PWM pins).
howdy everyone. Do you know if it is possible to do a factory reset of Arduino UNO with an other adafruit board?
Factory reset how? Just erase the sketch, or reinstall the bootloader, or what?
im still trying to get my Uno reset to fing the USB connection that i lost somehow... im trying send a test sketch from a Itsy bitsy following this exemple https://www.instructables.com/id/Programming-Arduino-With-Another-Arduino/
first i want to send a new sketch but if you know how to reinstall the bootloader i can use some help
at the moment i have this error avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
@north stream maybe the UNO is dead
You've lost the USB connection? That's controlled by a separate chip. Does it enumerate?
yes i lost the usb connection from my UNO. my computer doesnt recognise it anymore
i dont know what you mean by enumerate :/
if it help, last sketch i programmed was a MIDI interface
the USB is fine, other board are recognised
If your computer couldn't recognize it, I would expect a different error from "programmer is not responding". Does it show up as a USB device?
anyone have experience with trinkets? I'm having trouble uploading code to one. Installed drivers, the boards in the IDE, and uploaded while the LED is glowing
in the console I get: Arduino: 1.8.13 (Windows 10), TD: 1.53-beta1, Board: "Adafruit Trinket (ATtiny85 @ 8MHz)"
Sketch uses 3646 bytes (68%) of program storage space. Maximum is 5310 bytes.
Global variables use 40 bytes of dynamic memory.
An error occurred while uploading the sketch
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
in verbose I see: "avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104)
"
I do hear usb device connection noise when I plug in the trinket
in device manager I see a USBtiny device when it is connected
The ATtiny based trinkets use a clever bit-bang implementation of USB, that doesn't exactly follow the standards. Earlier computers were more tolerant to this, but modern ones don't like it.
I think there's something wrong with the board config I don't think it should just say "usb"
It does take some careful timing of pressing the reset button to get it into bootloader mode: the LED will do a pulsing/fading indication when it is. It only does so briefly, so you have to get to the upload phase while the Trinket is still ready for it.
Do you have an older computer you can try it with? That's what I do.
yep. doing it on my 7 year old system at the moment
getting the same error, I'm guessing the IDE broke compatibilty at some point
I am trying to use a digispark board to create functionally a streamdeck, where I push a physical button and the digispark spends a combination of keypresses to the computer. I seem to have it working in the most basic sense, but it seems to take nearly a full second for the digispark to process a "digikeyboard.h" command like "sendKeyStroke()". Is there something I am missing here, or is digispark just really slow at acting as a keyboard?
I've still had no luck getting SPI working on the Trinket M0. The clock and data signals sit idle.
I can bit-bang on the GPIO pins, but hardware SPI gets me nothing
This was done with bit banging (same pin definitions as SPI)
switch to hardware SPI and no activity
I meant to have a look at that with a Trinket here, but life has intervened and I haven't gotten to it.
no worries
it's for my animated GIF project. If the Adafruit product line gets left behind, que será será 🙂
Do you have a link to your code? That sounds like it's probably just one register somewhere that isn't fully set up, like clock-enabling the SPI peripheral or something.
All I do is SPI.begin()
and then SPI.beginTransaction(settings);
I've tried slow and fast clock settings
nothing comes out
It may be one register not set up, but the SPI class supplied by Adafruit is in charge of that
I looked through their code and it appears to be setting up SERCOM0 properly
It feels like some kind of code regression since the SPI and all of the "variant" code is shared with the ATSAMD51
Gotcha. Sounds like you're on top of it already.
I'm going to try another SAMD21 board, but I don't have any others within reach today.
I could probably get > 12Mhz SPI with bit banging on that chip 🙂
maybe I'll just use that for now
If your computer couldn't recognize it, I would expect a different error from "programmer is not responding". Does it show up as a USB device?
@north stream not at all! nothing shows up!
Do you see anything if you do a USB scan?
I have an odd question about the Arduino IDE and uploading: When I have the IDE compile and upload to my M0 based board via USB... I understand that it does something "sneaky" with the serial port that causes my program that is running on the board to stop, and somehow jump to the bootloader, which then handles the upload. I seem to recall this has something to do with the BREAK signal or some such, and there is co-operative code in TinyUSB and/or the standard USB library to handle all of this - so that code is compiled into my app.
First - am I on the right track about thinking about this?
Now - the question is - this used to work flawlessly - but somehow now it doesn't. Often the IDE will get though about 1/3 of the upload and then stop... and eventually time out with an error. If 'double press' reset to get to the bootloader and upload again, it works.
I suspect that this is because my app does a fair bit with interrupts generated by timers.
Since the M0 handles its own USB transactions, I'm not sure (I assume it's not like the DTR/RTS reset the Arduino uses). But getting stuck partway through is a different sort of thing.
So the question is - is there a way to see the "signal" that Serial is about to jump to bootloading, so I can turn off my ISRs? Or is there some thing else going on?
Do you know the pathway by which the IDE gets the M0 to go to the bootloader?
I suspect the stop part way is because one of my timers goes off (they are on the slow side) - and the interrupt jumps to the ISR... but the code for the ISR has been overwritten with the new version of the app that is being uploaded... and probably the ISR vector is now pointing into junk
I looked around some https://github.com/arduino/ArduinoCore-samd/tree/master/cores/arduino/USB but haven't found it yet
I'm looking in TinyUSB source - and don't see anything that references boot look promising
It is a process called "1200baud touch" - where the IDE drops to 1200 baud for a second, then returns. This is picked up in the USB driver (above the M0 hardware) to signal bootloader time)
Ah, good find! A slightly weird approach, but one that leverages existing serial port control protocol.
And... that calls Adafruit_TinyUSB_Core_touch1200 which in turn calls initiateReset(250); which 250 ms later causes a call to tickReset() to call banzai() which immediately does __disable_irq(); - which blows my IRQ theory out of the water.
But does mean that if somehow I'm allowing tickReset() to get called periodically, that would explain the times when it just fails to start at all.
hrm... okay - food for thought..... I'll have to poke further.
@acoustic nebula Tried hooking up a Trinket M0 with this code ```arduino
#include <SPI.h>
void setup() {
SPI.begin();
}
void loop() {
SPI.beginTransaction(SPISettings(4000000, MSBFIRST, SPI_MODE0));
SPI.transfer(0x55);
SPI.transfer(0xaa);
SPI.endTransaction();
}
Thanks for testing it. I tried it too and it didn't work for me :(
@north stream I now see the clock toggling, but MOSI is stuck high
If I add pinMode(4, OUTPUT), then pin 4 stays low
Feels like my board is defective
I can bit bang data on pin4, but hardware SPI isn't using it
SPI.begin();
pinMode(4, OUTPUT);
}
uint8_t i=0;
void loop() {
static uint8_t ucTest[] = {0,255,0,255,0,255,0,255,0};
SPI.beginTransaction(SPISettings(1000, MSBFIRST, SPI_MODE0));
SPI.transfer(ucTest, (int)sizeof(ucTest));
SPI.endTransaction();
delay(250);
}```
using Arduino 1.8.13 with the latest Adafruit board support
I'm seeing activity on both pins. It is really odd that bit-bang works and hardware SPI doesn't (unless you're using different pins).
I suppose I could take scope photos, but I'd have to round up another probe and a serial cable
the blue LED is MOSI (stuck high)
That's a headscratcher.
Stupid question, does it matter if you disconnect MOSI from that LED daughterboard? I was just wondering if it might have a short which is pulling it always high or something.
🤷 Just my standard debugging technique to always try to remove extra stuff whenever I'm investigating weird behavior.
I'm sure that it's not outputting data because a LCD display attached to it does not budge, yet the same wiring works with bit banging.
I'm playing around with a Feather nRF52 Bluefruit for the first time in a few years. After burning the new bootloader, I was able to upload the LED blink test and it worked just fine. I moved to the BLEmidi example and its not compiling. I'm getting lots of errors that look to all be related to 'error: 'class BLEMidi' has no member named 'beginTransmission'
and
error: 'class BLEMidi' has no member named 'endTransmission'
Am I doing something weird, or is the example out of date?
Looking at the public API for that library I dont see a function called beginTransmission() or endTransmission()
And this is in the getting started guide
Here's an example of the error message:
C:\Users\***\Documents\Arduino\libraries\MIDI_Library\src/MIDI.hpp:505:28: error: 'class BLEMidi' has no member named 'beginTransmission'
Not sure, this is an example?
Yeah, this example - https://github.com/adafruit/Adafruit_nRF52_Arduino/blob/master/libraries/Bluefruit52Lib/examples/Peripheral/blemidi/blemidi.ino
And have you updated all libraries?
To the best of my knowledge
Here's the full error when compiling : https://pastebin.com/bcGj8vCc
Yes, I see where the error is in the MIDI library but its odd the example broke
So I just downgraded to the oldest midi library (4.2.0 instead of 5.0.2) and it compiled!
Seems the library changed
Yeah, I would make a pull request with that library, I see they have made changed to their generic transmission API, then they will probably tell you to make a pull request on the nrf53 midi library
Or sorry, issue not PR
Thanks for the help =]
Or trying to help anyways 😆 Np
Helped me get there! haha
Incase anyone reading this sees this again, looks like Midi Library 5.0.0 is where it broke, anything under that works
Hey, im having some troubles with a capacitive soil moisture sensor.
followed every tutorial in the sun online and my readings are still really weird. would anyone be free to help? ❤️
@solid dawn Which sensor and what board are you using?
and the ADC readings seem wrong?
the readings change incredibly slowly
as opposed to how i've seen it work online where it should be immediate
may be a feature of that sensor, soil moisture generally changes slowly so it may have a slow response time
the "two finger" sensors react quickly
I also have those
but no matter which I use
the readings are erratic and make no sense
its not adjusting at all - it just keeps fluctuating
wait
i might have fixed it
bad connection?
yeah think so.
it was essentially like 3 different things going wrong and i just found the last one
thanks though
Those multiple things at once situations can be tough, got job getting it sorted out
Hi everyone… I’m working with the SI5351 Adafruit clock breakout and am trying to figure out how to use the numbers from the Clockbuilder Desktop ap. I want to generate 16 and 8 MHz, and the generator ap gives:
PLL A
Input Frequency (MHz) = 25.000000000
VCO Frequency (MHz) = 800.000000000
Feedback Divider = 32
SSC disabled
Output Clocks
Channel 0
Output Frequency (MHz) = 16.000000000
Multisynth Output Frequency (MHz) = 16.000000000
Multisynth Divider = 50
R Divider = 1
PLL source = PLLA
Initial phase offset (ns) = 0.000
Powered down = No
Inverted = No
Drive Strength = b11
Disable State = Low
Clock Source = b11
Plugging these values into the example script:
/* INTEGER ONLY MODE --> most accurate output /
/ Setup PLLA to integer only mode @ 900MHz (must be 600..900MHz) /
/ Set Multisynth 0 to 112.5MHz using integer only mode (div by 4/6/8) /
/ 25MHz * 36 = 900 MHz, then 900 MHz / 8 = 112.5 MHz */
Serial.println("Set PLLA to 800MHz");
//Serial.println("Set PLLA to 900MHz");
clockgen.setupPLLInt(SI5351_PLL_A, 32); // was 36
Serial.println("Set Output #0 to 16 MHz");
clockgen.setupMultisynthInt(0, SI5351_PLL_A, SI5351_MULTISYNTH_DIV_50);
this generates a compiler error at the last line shown here:
'SI5351_MULTISYNTH_DIV_50' was not declared in this scope
and from the Adafruit docs:
• For the divider, you can divide by SI5351_MULTISYNTH_DIV_4, SI5351_MULTISYNTH_DIV_6, or SI5351_MULTISYNTH_DIV_8
What am I missing? I understand why the DIV_50 throws the error. I don’t know how to set the Clockbuilder ap up to provide output in accordance with the instructions in the docs.
Thanks!
I think you want to use the setupMultisynth() function instead of the setupMultisynthInt(), since the latter only allows a few dividers, and you want a custom divide-by-50.
@cedar mountain i just realized that... thanks!
Anyone have experience (good and bad) with running an Atmega328p at 16MHz when powered with 3.3V? I know it's out of spec, but asking for a potential customer.
No personal experience, but it's such a bad idea to violate spec like that for any non-toy project, especially when there are so many other better 3.3V processors to choose from which are happy to run much faster...
Hello, I have a question about using software serials in an iot project. Basically I'm trying to connect a NodeMcu module to an arduino mega using a Software Serial connection, but I've noticed that once I set the baud rate to the software serial, I can no longer use the default "Serial" object. Is this normal?
I don't think that's normal. Are you sure you're setting the speed on the right serial object?
Yes. I am setting them both to 115200 and after the softwareSerial "begins", any Serial.print does not get reported to the serial monitor
That is odd. I wonder if the SoftwareSerial .begin() statement is hanging or something. Without the serial monitor output, it can be tricky to debug. When things like that happen to me, I usually resort to blinking codes on on LED.
What do you mean by hanging?
Normally means stuck in a loop, or experiencing some issue like an IO error and not handling ir correctly
@cedar mountain I completely agree, I voiced my concern, but customers have their ideas. In the past I did a project where we lowered the clock to 12MHz, but then there were software issues. I don't know if Arduino support for running at 12MHz has improved since then.
In that case, I need to clarify that the program does not stop execution or seem to be stuck in a loop after the software serial begins. It simply does not report the Serial.print lines in the serial monitor, it will print the software serial print statements
Got an idea I should add a screen to my radio bt speaker with clock and maybe what's playing is that's possible i want to know how I should do it before I start making a big hole
Also can I controll a 12v rgb strip with arduino
Idk what's possible
@limber rivet well it's certainly possible, we'd need details to point you in the right direction
I know of two kinds of 12V RGB strips, both can be controlled via Arduino, but they're done differently. An Arduino can run an LCD screen like that but I'm unsure where it would get the data to display.
Yeah idk either I think this is a cool idea but I don't know how to do it
Do you have a strip in mind yet?
Some RGB strips have separate control leads for the red, green, and blue LEDs, you can switch them with an Arduino using MOSFETs. The whole strip will be the same color. Addressable RGB strips just accept a data stream telling the LEDs what to display. They can have the LEDs different colors, and don't need MOSFETs.
I do have mosfets
I got the arduino kit it came with stuff like this display
It's a Uno
I have 3 buttons to controll it with (can add potentiometer)
So right now in that photo, it has three leads, and they are tied together and connected to 12?
No its connected to a rgb controller
I controll it with the 3 buttons at the right at the moment
Here is inside yes its messy
Do you have a part number for the controller?
Hey guys
What’s up?
As there are many experts in arduino in this server, I guess here is best place for question.
My case is about making an Arcade Stick with Arduino. I would like to make one of themes and don’t have any appropriate tutorial or reference.
Could you please introduce a good reference for this case?
It came from a Ikea rgb thing 😂
I think it's called ledberg
@placid aurora do you want to use it like a USB keyboard? Or are you connecting to something specific?
@limber rivet what is the part number mosfets you have?
Idk tbh I can look but I have to open it again
Yeah Usb connection to pc
@stuck coral why do you want to know my mosfets on the rgb controller
@placid aurora you might check out any of adafruits SAMD21 micros with a USB plug on them to use for a controller
@limber rivet you said earlier that you had mosfets, I thought you meant in your current possession not on the controller
Oh
So you want to control that strip in that device right now? Is that understanding it correctly?
Well I would say no
Then Im confused why you showed me the inside of that when I asked if you had a strip in mind
I got confused too