#help-with-arduino

1 messages · Page 65 of 1

candid topaz
#

mh, reinstall what? arduino ide boards?

pine bramble
#

I did a total clean up of adruino app and librairies and reinstall the soft

compact karma
#

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

north stream
compact karma
#

how do i open the DXF?

north stream
#

I was unsure what tools you had available.

compact karma
#

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

north stream
#

That's annoying.

#

Freecad won't give you the hole positions?

compact karma
#

nope

north stream
#

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.

compact karma
#

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

north stream
#

I've never used Freecad so I don't know anything about it.

compact karma
#

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

north stream
#

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.

compact karma
#

cool thanks

south stirrup
#

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

safe halo
#

@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();
    }
  }
}

south stirrup
#

@safe halo I looked it up but the full library is restricted

safe halo
#

Wonder how much a full license costs....

south stirrup
#

@safe halo Have you used it ?

#

It's not clear if the lite library supports sensor fusion

safe halo
#

I have one but have not coded it yet

south stirrup
#

ok

opal mirage
#

#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

stuck coral
#

Could you either format it or use pastebin please?

opal mirage
#

one sec

opal mirage
#

there

stuck coral
#

I think you are improperly using the constructor, it requires two pins to be defined for clock and data.

#

Or no, pin and type

opal mirage
#

what does that mean i am new to arduino

stuck coral
#

Line 30

opal mirage
#

if i try that it says dhtpin was not declared in this scope

leaden walrus
#

make sure to copy all of the code from the sketch

opal mirage
#

oh wait

leaden walrus
opal mirage
#

never mind it worked thank you

rose pond
#

Where would I put serial data pin on a arduino uno R3?

north stream
#

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.

rose pond
north stream
#

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.

rose pond
#

Thank you jesus. Thank you. uwu

fierce zealot
#

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

pine bramble
#

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?

pine bramble
#

How do I turn ultrasonic distance that it detects to voice or speech

woven mica
#

Ultrasonic sensor cant detect speech, as speech is in lower frequencies than ultrasound

pine bramble
#

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

north stream
#

Like a distance readback like "Distance is three point two meters"?

pine bramble
#

Yes!

north stream
pine bramble
#

Thank you!

opal mirage
thorn relic
#

Your variable is dht not DHT

twin ginkgo
#

i have a question about the ATMEGA328

cedar mountain
#

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!"

reef ravine
#

Ed "Carnak" Keyes ?

south stirrup
#

@twin ginkgo dont ask to ask

vivid rock
south stirrup
#

hey thanks for the links

#

In my project I managed to run a Madgwick filter somehow

vivid rock
#

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.

south stirrup
#

Yeah wasn't sure if the Uno would be fast enough for it, but looks like it is

glad reef
#

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?

vivid rock
#

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

glad reef
#

Ah, perfect. Thank you. That's what I was looking for.

vivid rock
#

just make sure to use the correct one in your sketch - it is easy to miss that 1

proper forum
#

anyone know of i2c gps modules that can be used on a small drone?

cedar mountain
proper forum
#

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

cedar mountain
royal prism
#

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!!!

thorn relic
#

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

vivid rock
#

@thorn relic do any of ublox offer I2C? I've only seen UART on them

wintry tulip
#

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

elder hare
north stream
#

@royal prism Do you have a specific question?

twilit hare
#

@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
#

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

twilit hare
#

@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

wintry tulip
#

@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

cedar mountain
#

@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.

elder hare
#

@cedar mountain actualy the class name is MYSOCKET 😐

cedar mountain
#

Something you created yourself?

elder hare
#

ye

cedar mountain
#

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.

elder hare
#

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
cedar mountain
#

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.

twilit hare
#

@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

wintry tulip
#

@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

twilit hare
#

@wintry tulip - the top row

wintry tulip
#

Goodgood. I already started hooking that one up 👍

lone ferry
#

I have no idea what you're trying to do, but are you sure you're using that breadboard correctly?

wintry tulip
#

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

twilit hare
#

Well... maybe God wants you to have the right Arduino for the right project 🙂

wintry tulip
#

maybe I should stick to IoT/webhooks projects as that's what this one was made for really

lone ferry
#

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.

wintry tulip
#

yep I wanted to complete the circuit via the breadboard so that's good news 👍

#

think of it like an elaborate single wire lol

lone ferry
#

Cool 😄

wintry tulip
#

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)

thorn relic
#

@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 :/

vivid rock
#

Pins take room - probably they try to make the breakouts as small as possible..

thorn relic
#

Either way, leaving out PPS is a criminal offense 😝

elder hare
#

@cedar mountain it's a IDE error

cedar mountain
#

Gotcha. That makes sense, because it looks like valid code from the compiler perspective. Just fix the variable naming, then.

elder hare
#

thanks 🙂 worked

#

i was tired of using Arduino IDE 🙂 so i switched to VS Studio with platformIO 🙂

vivid rock
#

Do you like it better?

proper forum
#

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

cedar mountain
#

Couldn't say, I'm not familiar with the processor used in that quadcopter.

proper forum
#

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?

vivid rock
#

normally you'd want to turn on the IMU before taking flight
is there any reason not to do it?

proper forum
#

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

cedar mountain
#

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.

shrewd cedar
#

Hello,

I think i have hardware probleme with my elegoo uno R3 board

#

anyone can help me for some test plz

elder hare
#

is there any use in this

#define FRAMES_PER_SECOND  120 // FRAMES PER SECOND (FPS)

FastLED.delay(1000/FRAMES_PER_SECOND);
pine bramble
#

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.

elder hare
#

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

lone ferry
#

value = brightness

elder hare
#

@lone ferry

#

huh?

lone ferry
#

The V in HSV is for the brightness.

elder hare
#

well leds.data()[(ni)] = CHSV(Hue, 255, sin8(a)); sin8 is at that spot :S

lone ferry
#

What is it that you're trying to achieve?

elder hare
#

@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) 🙂

lone ferry
#

Then do leds.data()[(ni)] = CHSV(Hue, 255, LEDBrightness);

wintry brook
#

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!

elder hare
#

@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));

lone ferry
#

I have no clue what you're trying to achieve with this LEDBrightness variable.

shy marten
#

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?

elder hare
#

@lone ferry what im trying todo with the LEDBrightness is to controll the brightness of EACH strip individualy! 🙂

elder hare
#

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;
          }
        
       }
odd fjord
#

it is misspelled initialHue capital H

vivid rock
#

@pine bramble yes, it should be OK

elder hare
#

@odd fjord doh xD

unborn frost
#

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!

north stream
#

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.

unborn frost
#

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?

safe shell
#

You can try sprinkling prints and yields in setup to see how far you get

unborn frost
#

i did that, it gets to the last line in setup

#

"Serial.println("TESTING FOR GOD SAKE");"

woven mica
#

Then the problem is in the loop

elder hare
#

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

wintry brook
#

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.

wintry brook
#

found and fixed the bad copy paste in colorMix. no need to point it out now. 🙂

wintry brook
#

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.

marsh rock
#

probably not a good idea to hook up a motor directly to the arduino even if its a light load

north stream
#

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.

marsh rock
#

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

stuck coral
#

You can make a 15 minute delay, just it's smarter to use a millis comparison

marsh rock
#

oh cool

#

ive never had the need for that long of a delay lol

quaint dune
#

Any here...plz help me to learn something new in arduino uno I have complete basic programs on sensors and complex breadboard connections......

marsh rock
#

you may have to be more specific than that

stuck coral
#

Go ahead and just ask the question @quaint dune luckily for you this channel is just for that 😉

quaint dune
#

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 )....

stuck coral
#

I would work to complete some sort of project, you will learn many skills in even basic projects making things you want.

unborn frost
#

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?

north stream
#

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.

unborn frost
#

do you know how its possible for its mode to switch in the first place?

north stream
#

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?

unborn frost
#

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

north stream
#

There are lots of possibilities.

unborn frost
#

as long as it gets fixed it doesn't matter to me, thanks

marsh rock
#

got any floating pins?

unborn frost
#

not sure what the means...

unborn frost
#

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

safe shell
unborn frost
#

the httpCode is the num im refering to

safe shell
#

-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?

unborn frost
#

#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
im asking what does that code mean, the url is not being called like it should be

stuck coral
#

According to the library source -1 is returned when no info was returned from the request.

unborn frost
#

so what does that really mean? it was working fine an hour ago and then suddenly it started passing -1???

shell cargo
#

Looks like a HTTPS request but you are using HTTP

unborn frost
#

wow, idk how i missed that. ty so much!

shell cargo
#

You might need a fingerprint for SSL

bleak kayak
#

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?

north stream
#

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...

▶ Play video
#

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.

shell cargo
#

Have you tried just running sample code for the adafruit gfx library?

north stream
#

@shell cargo sorry for being late

#

@shell cargo but what do you mean???

#

@shell cargo i dont understand what you mean

bleak kayak
#

file > examples > it should be under custom libraries

north stream
#

@bleak kayak can you please call just for screen share?

bleak kayak
north stream
#

okay

#

one sec

bleak kayak
#

@north stream join general

north stream
#

okay

#

actually whatever

#

sorry

#

my computer is slow so im not able to do anything

#

sorry

bleak kayak
#

yeah okay np

north stream
#

i guss ill have to figure it up by my self

#

anyways thanks

#

bye

bleak kayak
#

can anyone recommend a platform for connecting and interfacing multiple ESP8266's (both inputs and outputs) all over the country to a central database?

shell cargo
bleak kayak
#

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

north stream
#

You want to make web requests without running a web endpoint?

bleak kayak
#

yeah well I'm fine with running a web endpoint (technically I'd have to) but it has to work without port forwarding

north stream
#

I don't see why port forwarding would be necessary unless you're crossing networks

bleak kayak
#

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

elder hare
#

This

#define FRAMES_PER_SECOND  120
FastLED.delay(1000/FRAMES_PER_SECOND)

can this also be used with millis or is it just stupid? 😛

lone ferry
#

But it is using milliseconds?

elder hare
#

no delay is stopping the entire script but fastLED still keeps fastLED.show() running

lone ferry
#

Oh you mean you want to use the function millis()?

elder hare
#

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
    }
lone ferry
#

I don't see why that would not work.

elder hare
#

well i've already tried this and the ESP32 crashes

lone ferry
#

I'd need to see more of the code to be able to tell you why.

odd fjord
#

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" ?

candid topaz
#

if(curtime - lastUpdate > 1000/frames_per_second) {
lastUpdate = millis();

odd fjord
#

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.

lone ferry
#

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. 😄

odd fjord
#

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.

quartz fable
odd fjord
#

change "DHT" to "dht"

quartz fable
odd fjord
#

I wondered about that dht.read11() does not exist -- -- I think it is just dht.read()

quartz fable
#

let me try it

odd fjord
#

where did you get that example?

quartz fable
#

i just search form google arduino project community and get that

odd fjord
#

ok -- is it working now?

quartz fable
odd fjord
#

I'm not sure what library you are using -- do you have a link to the guide you followed.

quartz fable
odd fjord
#

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.

safe halo
#

How do I turn 2 bytes into a 16bit integer?

odd fjord
#

@safe halo are the values signed or unsigned?

safe halo
#

Unsigned. they are 001,067 in Decimal

vivid rock
#

uint16_t n=(byte1<<8)|byte0;

#

byte0 is the least significant byte

obtuse wedge
#

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?

obtuse wedge
#

lets rephrase, I've tried the ACS712 with no luck. Is the WCS1800 board with built in amplifier enough to sense a 180mA change?

north stream
#

I might look at a current transformer. It could be trickier due to waveform/power factor issues too.

reef ravine
#

also, 200mA seems low for a TV, how many watts is it rated for on the rear panel?

north stream
#

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 spruce
#

@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

reef ravine
#

the wonder of these forums, 2 (or a dozen) heads are better than one!

obtuse wedge
#

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 spruce
#

😁

reef ravine
#

@obtuse wedge btw, there may be a menu setting to disable USB power in standby if it doesn't default that way

shell cargo
#

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?

north stream
#

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.

shell cargo
#

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

pine bramble
#

hello there. Does anyone knows how to reset an Arduino Uno. Somehow the IDE is not detecting my usb port anymore...

stuck coral
#

Press the reset button is for a reset, but I assume you men reflash a bootloader?

shell cargo
#

Your COM port? You might need to reinstall drivers

#

Sometimes a PC restart is all that is needed

stuck coral
#

Agreed, and if not, does it work in another computer?

pine bramble
#

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?

stuck coral
#

@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

wanton mirage
#

Trying to figure out where the Wheel() function is inherited from in Adafruit_Neotrellis

stuck coral
#

According to docs there is no public function called Wheel in Adafruit_NeoTrellis

wanton mirage
#

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

stuck coral
#

Link to example?

wanton mirage
#

but the the inheritance chain seems obfuscated

stuck coral
#

Its not a class fucntion

wanton mirage
#

is there some kind of implicit inclusion of libraries that I don't know about?

stuck coral
#

No, its not in the library at all, all the examples define it in the bottom on the file...

wanton mirage
#

what the deuce?? I might have missed that

stuck coral
#

I downloaded the code, no mention of it outside of the examples and each define their own

wanton mirage
#

wow ok, yeah I'm new I guess?

#

uint32_t Wheel(byte WheelPos) {

#

thanks, I feel...not smart

stuck coral
#

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

cedar mountain
#

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.

wanton mirage
#

yeah I had pasted that declaration within loop(), moved it to the bottom but it still tells me it's undefined

stuck coral
#

Code? And its good practice to always have your functions above where you use them

wanton mirage
#

@stuck coral This is a big ugly project. Might not paste well

stuck coral
#

Use pastebin

#

Wont judge

wanton mirage
north stream
#

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.

stuck coral
#

Yeah, does declaring it before loop help?

north stream
#

Yes, I normally declare all of them up top, after any #include or #define statements, before global variable declarations.

wanton mirage
#

No change

#

I'll pastebin the ridiculous error log

#

scroll past whitespace

stuck coral
#

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?

north stream
#

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.

stuck coral
#

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'

wanton mirage
#

@north stream I put it between setup and loop

stuck coral
#

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

north stream
#

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.

opal mirage
#

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

▶ Play video
wanton mirage
#

@north stream moved up there, now It has a problem with fastled.... looking

opal mirage
#

any idea what to do on the video though?

north stream
#

Which sound sensor are you using?

opal mirage
#

the exact one in the video

#

the red one one from arduino one kit

north stream
#

Have you tried adjusting the potentiometer on it?

#

(I didn't watch the video, so I'm guessing)

opal mirage
#

there is no potentiometer

#

juust the usb the arduino,the wires,the led,and the senser

north stream
#

The one in the still you posted above appears to have a potentiometer

opal mirage
#

oh

#

my bad

opal mirage
#

there is no potentiometer

stuck coral
#

I think he was talking about the one on the sound sensor, but does changing the threshhold help you if you dont have one?

opal mirage
#

i tried adjusting the one on the sensor but nothing happens when i do(potentimeter)]

stuck coral
#

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?

opal mirage
#

after which statement

stuck coral
#

The only if statment in your code

opal mirage
#

on my serial monitor it says 1023

#

but led just stays on all the time

stuck coral
#

Sounds like something isnt connected right, what pin are you using on what board?

opal mirage
#

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

stuck coral
#

what pin are you using on what board?

opal mirage
#

what do u mean

stuck coral
#

What board are you using?

#

Arduino board

opal mirage
#

arduino uno

stuck coral
#

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

opal mirage
#

yea but he said you change to it if u change the code

stuck coral
#

You must use a analog pin labeled with a A, otherwise it will only work as a digital pin

opal mirage
#

ok one sec i will try

#

still same thing

stuck coral
#

Same value printed to console?

opal mirage
#

yea

stuck coral
#

Does your sound sensor have a pot on it?

opal mirage
#

yup

stuck coral
#

If you adjust that while the serial monitor is printing the value does it change?

opal mirage
#

near the pins

#

one sec

stuck coral
#

Also, your code wont turn tthe LED off

#

Only on

opal mirage
#

the potentiometer doesnt do anything when adjusted

stuck coral
#

Oh I mis-read, nevermind ignore that

#

Hm, do you have a multi-meter?

opal mirage
#

no

stuck coral
#

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.

opal mirage
#

dang ok

stuck coral
#

What pin is it on now?

opal mirage
#

a2

stuck coral
#

And you changed soundpin to match?

opal mirage
#

yes

stuck coral
#

And your serial monitor just spews a bunch of 1023 values?

opal mirage
#

yea

stuck coral
#

Hm, yeah, then if its connected right and the pot doesnt change anything I think its the sound module

opal mirage
#

hm ok i'll try and adjust pot again

#

thank though

stuck coral
#

Just to double check, you also changed your code to use A2?

marsh rock
#

arduino uno analog pins are from 14 (a0) to 19 (a5) arent they?

reef ravine
vivid rock
#

people still use the UNO.. wow

north stream
#

For many tasks, it's entirely sufficient, and if you damage the CPU, you can easily replace it.

vivid rock
#

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

north stream
#

I find myself using a variety of boards for different projects, I've used a Uno in the last week even.

vivid rock
#

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

north stream
#

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.

marsh rock
#

i just ordered me some attinys 😄

#

gonna try to make a bunch of solar lights that flash with music

north stream
#

Heh, I just built one of the ATtiny Trinkets into a project

marsh rock
#

they seem pretty dang neat

#

i havent used one yet personally

vivid rock
#

but still, trinket M0 is only $2 more than trinket attiny

north stream
#

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.

vivid rock
#

what is it driving?

acoustic nebula
#

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

north stream
#

Amusingly, I'm also working on AnimatedGif, but on a Teensy 3.6, which needs the newer style SD library

acoustic nebula
#

My code should be faster than the Adafruit version because of the way I handle the incoming LZW data

north stream
#

I don't think I've tried to use SPI on a Trinket M0. I didn't think SCK was even pinned-out

acoustic nebula
#

it's listed on the docs page as being 3 = SCK, 4 = MOSI

north stream
#

Ah, you're right, I was looking at the schematic and there's a lot going on

acoustic nebula
#

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

north stream
#

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?

acoustic nebula
#

just SPI.begin()

#

and SPI.beginTransaction(...)

north stream
#

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);

acoustic nebula
#

thanks

north stream
#

Note that sample code is just lifted from the page and is likely not correct for the Trinket M0

acoustic nebula
#

yep

north stream
#

Reading further, there are pinPeripheral() calls to assign pins to functions, you may need to do that too

acoustic nebula
#

The default setup in SPI.h seems to have the correct connections to match the docus

north stream
#

Ah, that helps.

acoustic nebula
#

yet, it still outputs nothing 😦

#

It's hard to believe no one has tried to connect an LCD to a Trinket M0

north stream
#

I assume somebody has tried, I've found a few posts on using Trinket M0 SPI for DotStars, but they're using CircuitPython.

vivid rock
#

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

acoustic nebula
#

exactly, but that doesn't seem to work 😦

north stream
#

Have you tried using pinPeripheral() to set the pin MUX to SPI?

acoustic nebula
#

that is already being called in the SPI library

north stream
#

Huh, sure seems like it ought to work.

#

I might be able to try it this evening

leaden dew
#

I was wondering if it's possible to use a TMC2208 in UART mode with a nano?

cosmic field
#

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.

stuck coral
#

@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?

cosmic field
#

yeah sorry im new to discord joined out of desperation and i apologize for my text blob. and yes i am at 115200

stuck coral
#

Could we have a pastebin of your code?

cosmic field
#

lemme give it shot. You want code im uploading? Also thanks for your help

stuck coral
cosmic field
#

ok yeah its new ill try that. also this code is provided as an example under arduino io

stuck coral
#

Okay, you could also just send the link for the example on github if you didnt change anything

cosmic field
stuck coral
#

I see a 9600 baud rate Serial.begin(9600);

cosmic field
#

ahh i never thought the code would be setup incorrect

stuck coral
#

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

cosmic field
#

so i change that in the code or settings?

#

sorry major newbie here

stuck coral
#

Yep, either or, I like making everything 115200

#

No problem, youre not the first newbie here, its what we're here for

cosmic field
#

Awesome thanks for help also im kind of into learning this stuff any resources or classes that stand out?

stuck coral
#

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.

cosmic field
#

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

stuck coral
#

None of us but maybe EdKeyes were born with a sodlering iron in our hand. Arduino has OK docs, usable for getting started

cosmic field
#

lol good point

#

thanks for help again

stuck coral
#

No problem! Glad to help

cosmic field
#

oh while im here is there a way to test electrical connections on a sensor with a multimeter?

shell cargo
#

Yes and no ... which sensor?

cosmic field
#

bme680

#

also just realized this code is for bme280 which will also complicate things 😆 oh learning is fun

stuck coral
#

Lol, to check connections multimeters have a continuity mode but that error will come up with the wrong sensor

cosmic field
#

awesome had hoped that would work

stuck coral
#

I bet switching a library out would be fairly easy to use the right sensor

cosmic field
#

now to figure out what programming changes need to be made for 680

stuck coral
shell cargo
#

I’d talk to it via SPI/I2C rather than fiddle with a multimeter

#

This puppy doesn’t really bring out any analog levels

stuck coral
#

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

shell cargo
#

Btw, a decent soldering iron goes a loooooooong way

#

Hakko FX888D with chisel tip FTW

cosmic field
#

will do thank you so much.

cosmic field
#

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.

shell cargo
#

Show us your solder job

#

We won’t judge

proper tree
#

make sure they look like VERY SHINY Hershey Kisses!!!!

cosmic field
#

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

#

and if u tell me to desolder it all and start again i wont be offended lol.

reef ravine
#

is that a short near SCK on the 680?

cosmic field
#

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.

reef ravine
#

some tips

cosmic field
#

just hoped i could blame programming and not my solder job

reef ravine
#

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

cosmic field
#

ok ive got wire ball but spoge is good as well?

reef ravine
#

wire ball works too

cosmic field
#

ok yeah im learning the pad pin method i was doing it was wrong for a while

reef ravine
#

like "brass steel wool"?

cosmic field
#

yeah came with setup

reef ravine
#

works great, clean the tip, clean the tip, don't think about it, clean the tip lol

cosmic field
#

what is best way to clean solder off of the board?

#

yeah im a clean freak so that has helped

reef ravine
#

solder wick or a "solder sucker"

cosmic field
#

just tight on that proto

#

ok cool ill grab some

#

i have a sucker

#

ill try it

reef ravine
#

wick might be better, just want to remove some solder

cosmic field
#

yea clean it up a bit

#

clean freak like i said

reef ravine
#

heat both parts (quickly) then apply small amounts of solder, don't press the tip too hard to both parts, contact but no pressure

cosmic field
#

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.

reef ravine
#

i've seen worse from a first timer

cosmic field
#

lol thanks

#

its ok to laugh at the new guy it motivates them to get better!

reef ravine
#

often all the pins get soldered together, sure to trigger "check your wiring" (or release the magic blue smoke)

cosmic field
#

ahh i could see that

reef ravine
#

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

cosmic field
#

ok that makes more sense ive only welded so def not same tactics.

reef ravine
#

NO, you're not going for welded plate strength, just flow of solder 🙂

cosmic field
#

yeah prolly why i have so much on my bottom act like i was building a wall lol.

reef ravine
#

proper solder technique would yield really poor welds

#

and vice versa

cosmic field
#

yeah its definitely becoming clearer, now to find my short so i can get this thing running!

reef ravine
#

it may also be open, the solder can flow "around" a pin and not make contact

cosmic field
#

ahh i do have one that kinda looks that way

reef ravine
cosmic field
#

so too much heat could mean the board is bad?

reef ravine
#

it may delaminate the pad from the PCB, yours didn't look that way though

cosmic field
#

ok ill hope for the best

reef ravine
#

generally you really need to press and hold too long to ruin the board

cosmic field
#

ok def have one or too that have the too much heat look

reef ravine
#

the ones in the pic look like "cold joints", lots of solder but may not be connected

cosmic field
#

yeah i was having heat issues at first not sure what setting to put it on.

reef ravine
#

adjustable iron?

cosmic field
#

yeah

#

has cel and far

reef ravine
#

where is it set?

#

or better phrased, what is it set to?

cosmic field
#

i wanna say 250 -275 cels usually

reef ravine
#

crank it up a bit, 350

cosmic field
#

ok sounds good. got a little smoke but thats ok

reef ravine
#

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

cosmic field
#

ok yeah i think my solders ok i have 1mm and .6 and they both say flux 1.8%

reef ravine
#

fine

cosmic field
#

awesome well im gonna go make a mess and see what happens. Hopefully ill be back with good news but thanks again.

reef ravine
#

np, good luck and happy hacking!

distant merlin
#

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.

stuck coral
#

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

thorn relic
#

apt install libfl2 libfl-dev

quartz fable
lone ferry
#

You mistyped min_temp as main_temp.

quartz fable
#

haha yeah mybad😅

#

now its work

median marlin
#

.-.

distant merlin
#

Thank you @thorn relic. That fixed the share library issue.

fallen notch
#

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.

north stream
#

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.

fallen notch
#

thankyou

north stream
fallen notch
#

ok thx for the help ill do some more research

proven mauve
#

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

onyx axle
#

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.

arctic minnow
#

Voltage drop is different for different LEDs: https://en.wikipedia.org/wiki/LED_circuit

In electronics, an LED circuit or LED driver is an electrical circuit used to power a light-emitting diode (LED). The circuit must provide sufficient current to light the LED at the required brightness, but must limit the current to prevent damaging the LED. The voltage drop a...

proven mauve
#

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

arctic minnow
onyx axle
#

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 🙂

arctic minnow
#

Diode on left, Capacitor on right. 104 means 100nf

vivid rock
#

@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?

proven mauve
#

@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 🙁

onyx axle
#

Thanks once again @arctic minnow

pine bramble
#

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?

north stream
#

Sounds like a memory problem more than a serial problem but perhaps I am misreading

pine bramble
#

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

north stream
#

I wonder if the reader is sending it twice.

pine bramble
#

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.

north stream
#

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.

pine bramble
#

Oh cool, the delay in the while loop solved the double open problem.

#

But it makes it slower to read lol

north stream
#

Yeah, the real fix would be to rewrite it to multitask instead of using delays

pine bramble
#

how would i go about that?

north stream
undone harbor
#

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?

odd fjord
#

@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

undone harbor
#

Geez... guess I was overthinking it :)... thanks.

arctic slate
#

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

cedar mountain
#

You'll probably want to use the Servo library, since ESCs usually take a pulse-width signal like that to control their throttle.

arctic slate
#

I have no idea how to use an arduino

#

Im only know how to upload it

cedar mountain
#

It's a great time to learn, then! You should be able to find a suitable tutorial for the Servo library to follow.

arctic slate
#

Ive run into a problem...

#

I might have to hold on my project

#

that will give me time to learn

rotund condor
#

anyone around who might be able to help me with an issue?

#

be willing i suppose is the right question to ask

stuck coral
#

If you have a question, just feel free to ask

rotund condor
#

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

stuck coral
#

I see what you are trying to do, does it not display right?

rotund condor
#

the code controls the display

#

right now i just have to manually input what number i want on each digit

stuck coral
#

Yes, but Im going to guess the numbers dont display right, is that correct?

rotund condor
#

no they do

stuck coral
#

Really? Okay

rotund condor
#

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

stuck coral
#

not how digitalwrite is supposed to be used but clever

rotund condor
#

im open to suggestions if you think theres a better practice

stuck coral
#

So what is the current issue? And I mean, this works unless you planned your pins out really well

rotund condor
#

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

stuck coral
#

As a secondary device on the I2C bus?

rotund condor
#

this device will be the slave

#

its whole function will be to control the display.

stuck coral
#

Does this help you?

rotund condor
#

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

stuck coral
#

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?

rotund condor
#

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)

stuck coral
#

Its hex

rotund condor
#

oh duh hex

#

and i get segment 7 and the decimal point to light up

#

or rather segment G and DP

stuck coral
#

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

north stream
#

Maybe ```arduino
digitalWrite(2, (V & B10000000) ? HIGH : LOW);

rotund condor
#

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;
}
}

stuck coral
#

Yeah, kinda a ugly way to do it but it would work.

rotund condor
#

okay i found that example in an arduino forum post

#

i tried it but couldnt really get it to work

north stream
#

I tend to wrap stuff like that in a subroutine or a #define() to sweep the ugliness under the rug 🙂

stuck coral
#

Might make a constant array

north stream
#

Arduino also has a bunch of useful bitfield macros that will do some of it for you

stuck coral
#

so const uint8_t numbers[10] = {Display0, Display1 ....} then you can just do display(numbers[value]);

rotund condor
#

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

stuck coral
#

Correct. Then use the value from i2c as a index in that array. Let me finish it and I think you'll get it

rotund condor
#

okay thank you very much

stuck coral
#

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

rotund condor
#

woah

#

if value is 0 it looks at the zeroeth index which in that case is Display0

#

?

stuck coral
#

Correct, then with i2c just give it a number 0-9 and pass as value

rotund condor
#

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

stuck coral
#

Either way, but then youre limied by bit size unless you send two bytes as a 16 bit value

rotund condor
#

im gonna give this a try

#

thank you so much

stuck coral
#

No problem, have fun

rotund condor
#

it literally just works perfectly

#

youre a genius thanks so much hahaha

rotund condor
#

in case youre wondering i also got i2c working

#

i can send over each digit and it works great

stuck coral
#

Oh awesome!

rotund condor
#

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.

stuck coral
#

Correct, or you can send two as a 16-bit integer

#

Either or, same outcome

rotund condor
#

probably better practice to do the former

#

but that would eb another thing id have to figure out

candid topaz
#

you could do with sprintf on master and sscanf on slave

rotund condor
#

are you saying use uart instead of i2c

candid topaz
#

over i2c

rotund condor
#

you can read serial prints over i2c?

#

i figured those were through the tx and rx lines

candid topaz
#

you can read from serial and send via i2c 🙂

rotund condor
#

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

candid topaz
stuck coral
#

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

candid topaz
#

16 bits value is 2 chars

stuck coral
#

I thought he had only numerical digits

candid topaz
#

and wire library doesnt have parseIntUntil('\n');

rotund condor
#

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

candid topaz
#

but you get "char" on slave side 🙂

rotund condor
#

whats the syntax for like putting code into discord i feel like a total noob lol

stuck coral
#

three `s

rotund condor
#

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

astral gust
candid topaz
#

```

rotund condor
#

oh silly me

stuck coral
#

Close, top and bottom of text, not on the sides of any lines

rotund condor
#

code

#

dope

#

ill try not to forget

stuck coral
#

@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

rotund condor
#

this guy just does not miss

stuck coral
#

Well when I do miss they tend to be doozies

astral gust
#

@stuck coral thanks try it rn

rotund condor
#

no trust me my sample size is huge

astral gust
candid topaz
#

unzip them

stuck coral
#

Correct, but the source folder you have already in Arduino not the zip

candid topaz
#

and thats in downloads.. ok

stuck coral
#

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

astral gust
#

so i renamed the zip deleted the rest the other files then, just add via zip to the library if I understand correctly

stuck coral
#

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

potent abyss
#

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.

stuck coral
#

Do you have a compiler error or does the code compile just not work?

potent abyss
#

Not about the code, the motor cant run.

stuck coral
#

Code with a line number of what you added? Could you make a pastebin?

potent abyss
stuck coral
#

Line number of that issue?

potent abyss
#

If i remove line #193, dribbler works well. Idk why

stuck coral
#

myservo.attach(10);?

potent abyss
#

Yeah, i meant something in servo.h lib conflicted with my ENA PWM pin .

stuck coral
#

Also, do you have a V1 or V2 motor shield?

potent abyss
#

Uhm, i use 2 motor shield, not a great choice ig. L293D for 4 wheels control. And small L298N for one DC motor

stuck coral
#

Does the servo work when you do that and not the motors?

potent abyss
stuck coral
#

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?

potent abyss
#

Mega 2560.

stuck coral
#

Whe n you add that line, does the servo work?

potent abyss
#

yes, servo works, dribbler doesnt work

stuck coral
#

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

potent abyss
#

My bad, that's ENB for controlling L298N. I will look at the lib, maybe there are some problems with the PWM pin

stuck coral
#

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

potent abyss
#

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).
pine bramble
#

howdy everyone. Do you know if it is possible to do a factory reset of Arduino UNO with an other adafruit board?

north stream
#

Factory reset how? Just erase the sketch, or reinstall the bootloader, or what?

pine bramble
#

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/

Instructables

Programming Arduino With Another Arduino: This is my first Instructable. In this Instructable I am going to show you how to program an Arduino with another Arduino. No drivers are needed! This Instructable is also useful for uploading sketches to Chinese Arduino's

#

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

north stream
#

You've lost the USB connection? That's controlled by a separate chip. Does it enumerate?

pine bramble
#

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

pine bramble
#

the USB is fine, other board are recognised

north stream
#

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?

wanton mirage
#

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

north stream
#

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.

wanton mirage
#

I think there's something wrong with the board config I don't think it should just say "usb"

north stream
#

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.

wanton mirage
#

yep yep

#

no joy

north stream
#

Do you have an older computer you can try it with? That's what I do.

wanton mirage
#

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

wanton mirage
#

found a solution!

#

Had to change the "programmer" type in the IDE

marsh cloak
#

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?

acoustic nebula
#

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

north stream
#

I meant to have a look at that with a Trinket here, but life has intervened and I haven't gotten to it.

acoustic nebula
#

no worries

#

it's for my animated GIF project. If the Adafruit product line gets left behind, que será será 🙂

cedar mountain
#

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.

acoustic nebula
#

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

cedar mountain
#

Gotcha. Sounds like you're on top of it already.

acoustic nebula
#

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

pine bramble
#

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!

north stream
#

Do you see anything if you do a USB scan?

obtuse spruce
#

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.

north stream
#

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.

obtuse spruce
#

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

north stream
obtuse spruce
#

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)

north stream
#

Ah, good find! A slightly weird approach, but one that leverages existing serial port control protocol.

obtuse spruce
#

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.

north stream
#

@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();
}

acoustic nebula
#

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

north stream
#

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).

acoustic nebula
#

let me take a photo

north stream
#

I suppose I could take scope photos, but I'd have to round up another probe and a serial cable

acoustic nebula
#

the blue LED is MOSI (stuck high)

north stream
#

That's a headscratcher.

acoustic nebula
#

yep

#

tomorrow I've got a Feather M0 coming; I'll see if that behaves differently

cedar mountain
#

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.

acoustic nebula
#

it really shouldn't matter

#

that LED is drawing maybe 3mA max

cedar mountain
#

🤷 Just my standard debugging technique to always try to remove extra stuff whenever I'm investigating weird behavior.

acoustic nebula
#

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.

inner locust
#

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?

stuck coral
#

Looking at the public API for that library I dont see a function called beginTransmission() or endTransmission()

inner locust
#

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'

stuck coral
#

Not sure, this is an example?

inner locust
stuck coral
#

And have you updated all libraries?

inner locust
#

To the best of my knowledge

stuck coral
#

Yes, I see where the error is in the MIDI library but its odd the example broke

inner locust
#

So I just downgraded to the oldest midi library (4.2.0 instead of 5.0.2) and it compiled!

#

Seems the library changed

stuck coral
#

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

inner locust
#

Thanks for the help =]

stuck coral
#

Or trying to help anyways 😆 Np

inner locust
#

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

solid dawn
#

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? ❤️

reef ravine
#

@solid dawn Which sensor and what board are you using?

solid dawn
#

capacitative soil moisture sensor v1.2

MKR1000

#

picture of said sensor

reef ravine
#

and the ADC readings seem wrong?

solid dawn
#

the readings change incredibly slowly

#

as opposed to how i've seen it work online where it should be immediate

reef ravine
#

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

solid dawn
#

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

reef ravine
#

bad connection?

solid dawn
#

yeah think so.

#

it was essentially like 3 different things going wrong and i just found the last one

#

thanks though

north stream
#

Those multiple things at once situations can be tough, got job getting it sorted out

wooden bobcat
#

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!

cedar mountain
#

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.

wooden bobcat
#

@cedar mountain i just realized that... thanks!

carmine terrace
#

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.

cedar mountain
#

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...

ripe flint
#

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?

north stream
#

I don't think that's normal. Are you sure you're setting the speed on the right serial object?

ripe flint
#

Yes. I am setting them both to 115200 and after the softwareSerial "begins", any Serial.print does not get reported to the serial monitor

north stream
#

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.

ripe flint
#

What do you mean by hanging?

stuck coral
#

Normally means stuck in a loop, or experiencing some issue like an IO error and not handling ir correctly

carmine terrace
#

@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.

ripe flint
#

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

limber rivet
#

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

stuck coral
#

@limber rivet well it's certainly possible, we'd need details to point you in the right direction

north stream
#

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.

limber rivet
#

Yeah idk either I think this is a cool idea but I don't know how to do it

stuck coral
#

Do you have a strip in mind yet?

limber rivet
#

I do have a rgb strip

north stream
#

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.

limber rivet
#

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)

stuck coral
#

So right now in that photo, it has three leads, and they are tied together and connected to 12?

limber rivet
#

No its connected to a rgb controller

#

I controll it with the 3 buttons at the right at the moment

stuck coral
#

Do you have a part number for the controller?

placid aurora
#

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?

limber rivet
#

It came from a Ikea rgb thing 😂
I think it's called ledberg

stuck coral
#

@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?

limber rivet
#

Idk tbh I can look but I have to open it again

placid aurora
#

Yeah Usb connection to pc

limber rivet
#

@stuck coral why do you want to know my mosfets on the rgb controller

stuck coral
#

@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

limber rivet
#

Oh

stuck coral
#

So you want to control that strip in that device right now? Is that understanding it correctly?

limber rivet
#

Well I would say no

stuck coral
#

Then Im confused why you showed me the inside of that when I asked if you had a strip in mind

limber rivet
#

I got confused too

stuck coral
#

@placid aurora they have kits in places for the box that often come with buttons and the case and joystick but Adafruit does also sell the buttons

#

@limber rivet so what strips do you want to use in the project we are currently talking about?