#help-with-arduino

1 messages Β· Page 104 of 1

lapis meteor
#

yessir

faint raft
#

thanks

lapis meteor
#

Lmao

#

i expected the lights to go boom boom boom

#

but it happened opposite

faint raft
#

How do you mean, opposite?

lapis meteor
#

well

#

i expected it to be fast

#

snappy

faint raft
#

and what happened instead?

lapis meteor
#

it just blinked first light and slept

#

lemme add an else statement

faint raft
#

well, your sleep is like 0-5000, so they could sleep for 5 seconds

lapis meteor
#

oh yes

faint raft
#

so, to be clear, if you remove the randomness, can you turn all the LEDs on?

lapis meteor
#

lets see

#

randomness

#

what a mess

faint raft
#

πŸ˜„

lapis meteor
#

digitalWrite(13,HIGH);
delay(100);
digitalWrite(8,HIGH);
delay(100);
digitalWrite(7,HIGH);
delay(100);

#

good?

#

well nothing is turning on

faint raft
#

Not sure what your actual wiring is like, but you might need resistors on all the LEDs.

lapis meteor
#

oki doki

#

how do i use breadboard

#

i think i destroyed it

faint raft
#

something like this:

lapis meteor
#

kkkkk

#

++_++

faint raft
#

disconnect power before you mess with the breadboard

lapis meteor
#

ok but what power

faint raft
#

the power to the arduino

lapis meteor
#

oh

#

aight

#

can i use any wire for arduino to breadboard

faint raft
#

maybe, what wires are you trying to use?

lapis meteor
#

normal wires colorful covering

#

is it easy to destroy breadboard pin

faint raft
lapis meteor
#

Is this a broadbeard too

#

Bread board*

faint raft
#

yup

lapis meteor
#

does anode & cathode both produce electri-city

#

Is this wire ok

#

@faint raft ayo

faint raft
#

yup, that wire is fine

lapis meteor
#

lkkkk

#

so i treat + & - with 100% equality ?

faint raft
#

with those wires and the resistors, yes

lapis meteor
#

YAAAAAAAAAAAY

#

should i read sum server rules

#

i better treat those rules as a server manual

#

why does the resistor keep falling or did i became weak from my laughter spells

#

jk btw ive never laughed this much before

#

is my breadboard too smol or should i cut the resistoru

faint raft
#

I mean... Bend the resistor's legs. Like a spider, preparing to jump for your face.

lapis meteor
#

lmao

#

lmmo

#

do the blubs only need to be in pos neg

#

physics debugging

#

my first time

#

i hope the metal does not goes in my food

#

i just ate a grape with my resistor

faint raft
#

stick those grapes right in your face-hole

lapis meteor
#

lmmo

#

now i know why my physics teacher was the only teacher trying to understand me

faint raft
#

Why?

lapis meteor
#

cuz

#

im 16

#

most quiet kid of my class

#

quiet kid memes motivated me to do java

#

and java & cpp are my fav

#

i almost failed in every subject including computer xd

faint raft
#

Why?

lapis meteor
#

cuz

#

i had very bad interest

#

nothing interesting

#

im still in school tho but pandemic

#

ive also managed a 300k subs channel before only to loose it

faint raft
#

I would have loved to be in school during the pandemic... would have kept me the F away from all the kids that bullied me.

lapis meteor
#

woah

#

bully

faint raft
lapis meteor
#

yes

#

but

#

my bulb should go in positive

faint raft
#

look for the longest leg

lapis meteor
#

kk

#

is dat a pos leg

faint raft
#

the longest leg is +

#

and then you stick that in your bread-hole

lapis meteor
#

wow

#

kkk

faint raft
#

maybe not three Ks, mkay?

lapis meteor
#

sure

lapis meteor
#

i just realized if i flip my breadboard everything will trip

#

Good enough?

#

wait i just assumed that blue is 1

#

pos

#

nvm i was right i overthunk that

#

oh well nothing is starting

#

no lights

#

int ra; //random
int dv; // delay
int pin; //actual pin

void setup() {
Serial.begin(9600);
pinMode(2,OUTPUT);
delay(1000);
pinMode(-3, OUTPUT);
delay(1000);
pinMode(-6, OUTPUT);
delay(1000);
pin = 13;

}

void loop() {
digitalWrite(2,HIGH);
delay(100);
digitalWrite(-3,HIGH);
delay(100);
digitalWrite(-6,HIGH);
delay(100);
// ra = random(4);
// if (ra==3){
// digitalWrite(pin,HIGH);
// delay(random(5000));
// digitalWrite(pin,LOW);
// delay(random(120));
// pin = 8;
// ra = random(5);
// }
// if (ra==2){
// digitalWrite(pin,HIGH);
// delay(random(5000));
// digitalWrite(pin,LOW);
// delay(random(120));
// pin = 7;
// ra = random(5);
// }
}

#

wait

#

nvm

#

ok so what is wrong

#

help

#

nothing's working hmm

#

it was like $50 should'nt be that bad

faint raft
#

why do you have negative numbers on your pinModes?

lapis meteor
#

cuz it was a negative pin?

#

one second

#

everything fits in the breadboard nicely

#

is the bread road broken

#

well tensorflow is not this hard but um

#

should i test a motor

#

why cant i control z in irl

#

wait imma use google

#

my arduino is working perfectly nothing else is

faint raft
#

Are you following any kind of guide for this?

lapis meteor
#

nop all my brain

#

but u can recommend me a course

#

one second i should wear gloves

#

just realized unity is a million times easier

#

ok enough if i cut black part of the wire end will something happen

faint raft
#

don't cut any wires

lapis meteor
#

lmao

#

electro cute?

faint raft
#

Chaos Cat.

lapis meteor
#

lmao

#

Current

#

hey i should use the screen i got

idle nymph
#

@lapis meteor what are you trying to do?

lapis meteor
#

I am just trying to light leds

#

but with bb

idle nymph
#

well

#

can you send a picture of the breadboard from the top?

lapis meteor
#

AM I only capable of writing code or is just bad

#

sure

#

I thought if I can do cool things in unity why not irl

elder hare
#
void LEDPattern::Twinkle()
{
    int i = random(_NumLeds);
    _Leds.data()[i] = PaletteMode(i);
    fadeToBlackBy(_Leds.data(), _NumLeds, _ledsettings._pattern_fade_amount);
}

This makes a twinkle effect on my strip! when i set the Update (millis) in the main loop to very slow like 127 the fading becomes choppy! is there any way to smooth this out? i noticed that fadeToBlackBy uses uint8_t on the fadeAmount would it be possible to make and use a float variant of that fadeToBlackBy to smooth out the fading when Update is slow?

idle nymph
lapis meteor
#

okk

#

should i try with 1 now

idle nymph
#

I have here a 1K Ohm resistor conected to the cathode of the led, and red wire is connecting anode to digital pin on Arduino

lapis meteor
#

1k ohm

idle nymph
#

it doesnt matter

lapis meteor
#

is my arduino not getting enough power

idle nymph
#

It is connected to your PC, right?

lapis meteor
#

ofc

idle nymph
#

Then it’s ok

lapis meteor
#

okk

idle nymph
#

Now, find the GND pin on your arduino and connect it to the negative power terminal on the breadboard

lapis meteor
#

ohhh ground pin

idle nymph
lapis meteor
#

do i need to make any further changes in the code

idle nymph
#

Your code should look like this for turning on a single LED:

int ledPin = <yourLedPin>;

void setup() {
  pinMode(ledPin, OUTPUT);
}

void loop() {
  digitalWrite(ledPin, HIGH);
}
lapis meteor
#

alright amazing

idle nymph
#

If you want to do blinking led you could try adding a delay after each digitalWrite, like this:

digitalWrite(ledPin, HIGH);
delay(500); // in miliseconds
digitalWrite(ledPin, LOW);
delay(500);
#

Let me know how it goes.

lapis meteor
#

did not worked

#

oh my

idle nymph
#

how did you do it

#

send code and picture of breadboard circuit

lapis meteor
#

Ok wIt

#

Wait

idle nymph
#

brown wire is connected to gnd right?

lapis meteor
#

Yes

idle nymph
#

you should put brown wire on the same row as your resistor

lapis meteor
#

okkk

idle nymph
lapis meteor
#

oh my i made it blink

idle nymph
#

good

lapis meteor
#

my finger is thick for the circuit

#

is there an instrument for it

idle nymph
#

what do you mean?

lapis meteor
#

i mean

#

the circuit is somewhat smal

#

there's less gap in between of things

idle nymph
#

oh

#

you could try using a pair of tweezers or something

#

i guess

lapis meteor
#

oh

#

is it not going to give an electrik shoclk

idle nymph
#

well, you're using 5V

#

so no

lapis meteor
#

okk

#

can't believe even my circuit wants me to be fit lmao

#

how do i increase 5v to 50

idle nymph
#

50V?

#

why

lapis meteor
#

ig

#

well to make things easier

idle nymph
#

you can't do that with arduino and it's high voltage lol

lapis meteor
#

duh

idle nymph
#

your led will burn

lapis meteor
#

lmao

#

step motor

#

is it easier than led

idle nymph
#

probably kind of the same

lapis meteor
#

is it more code-able

#

ok whatever

idle nymph
#

i think

#

i have never done anything with a motor before

lapis meteor
#

why not

#

well can anyone recommend me a good course on these somewhere

idle nymph
#

well, it's the same principle as LED, and programming it is the same

lapis meteor
#

oh

lapis meteor
#

wow

idle nymph
#

Electroboom, element14

lapis meteor
#

it's too fast, i watch some vids at 2x some at slower

idle nymph
#

also adafruit youtube page

#

is really good

lapis meteor
#

wow

#

can i get the link for it to open instantly

#
idle nymph
#

this is it

lapis meteor
#

great

idle nymph
#

i can only do 110 at my best lol

lapis meteor
#

oo

#

i was a gamer

#

until i left gaming for data science now unity then micro controllers

#

anyways cya, i love this server

idle nymph
#

Glad I could help.

faint raft
#

I've been having the worst of luck with getting the Seeed Wio Terminal connected to WiFi and SSL with mTLS against an MQTT server (Mosquitto). If I connect using the IP address it complains about missing domain name, but, sometimes it actually works, and I can send a message to the server. However, it's intermittent and the device will lose connection and then kind of get stuck in a re-connection loop. Attaching my code for your perusal.

The certificates.h file contains output from pycert_bearssl.
https://github.com/OPEnSLab-OSU/SSLClient/tree/master/tools/pycert_bearssl

#

Any help appreciated!

vapid tusk
#

Hey Gusys

#

I just bought the Adafruit_MCP4725 DAC

#

The Problem is that my sine wave is delayed due to other code execution, how can have a smooth sine wave

#

Thats my code

north stream
#

Alternatively, if your other code operates in small enough chunks, you can periodically check millis() and use that to decide when to send samples.

vapid tusk
#

is this only code based possible or do i need to trigger the input for example with an 555 timer ?

north stream
vapid tusk
#

@north stream thx bodya πŸ˜€

thorn bronze
#

So appreciate the help here. @north stream @livid osprey I’ll be back with the project tomorrow and will give it a try.

faint raft
#

More appropriately, what did I do wrong? πŸ˜„

vapid tusk
#

Maybe the SSL Certificat is not trusted

faint raft
pine bramble
#

anyone know what this error means?

#

Error: lo register required -- `sub r10,#1'

#

i'm running the acceldemo example code for the LIS3DH triple axis accelerometer on a STEMMA QT PY (SAMD21)

fathom summit
#

Sounds like you are trying to build your library for a target it does not support

#

This error comes from the assembler, and it is very probable your target MCU does not have a compatible instruction set to the inlined assembly in the library

#

Try building for another processor type, and see if the error goes away

#

If your library (or any of its dependencies) does not include any inline asm, perhaps your toolchain is broken somehow

#

Do you know in which file the error occurs?

pine bramble
#

so. i found out if i turned off "here be dragons" in optimize it works

#

and use standard.

#

i haven't tried the other ones

fathom summit
#

So, toolchain error

#

Generally, it is a good idea to leave all optimizations off while debugging

pine bramble
#

sure. but it still seems a bit strange that one would work and other wouldn't

fathom summit
#

IDK what software you are using, but here be dragons may be referring to enabling experimental optimizations that may not be completely ported to THUMB

#

Hence the generation of assembly that won't run in THUMB processors

pine bramble
#

i am using arduino ide 1.8.15

fathom summit
#

Oh, makes sense -- This forum post https://community.platformio.org/t/test-fails-to-start-with-build-option-ffast-math/25342 says that here be dragons refers to --fast-math

#

Which tries to optimize away mathematical operations.. Probably something in there broke your code

pine bramble
#

interesting

fathom summit
#

--ffast-math tends to break math in general development too.. It disables IEEE float compat

#

From man gcc:

#
   -ffast-math
       Sets the options -fno-math-errno, -funsafe-math-optimizations,
       -ffinite-math-only, -fno-rounding-math, -fno-signaling-nans,
       -fcx-limited-range and -fexcess-precision=fast.

       This option causes the preprocessor macro "\__FAST_MATH\_\_" to be defined.

       This option is not turned on by any -O option besides -Ofast since it can
       result in incorrect output for programs that depend on an exact
       implementation of IEEE or ISO rules/specifications for math functions. It
       may, however, yield faster code for programs that do not require the
       guarantees of these specifications.
pine bramble
#

thanks

#

thats really interesting

restive heath
#

Hey y'all, seeking help on an LED icicle project:

https://learn.adafruit.com/holiday-icicle-lights-with-flair/hardware

https://learn.adafruit.com/holiday-icicle-lights-with-flair/arduino-code

I'm using a Feather M4 Express
with Feather-Header.

I have a lot of questions as I'm troubleshooting, but the first ones are:

Can someone help me with the M4 Express pins vs M4 Header pins?

The Board pins, on the Bat side, are:
SDA, SCL, 5, 6, 9, 20, 22, 23, 23, USB, En, Bat

And the board pins on the Header-Bat side are:
0, 1, 2, 3, 4, 5, 6, 7

And the pins scoped in the Code, are:
int8_t pins[8] = { 13, 12, 11, 10, SCK, 5, 9, 6 };

The SCK pin is on the Opposite side of the board, and opposite side of the header pin?/Ground-side. --- all my data pins are on the Bat-side of the header 0 - 7 pins, so, is SCK even used (since it's on the Groun-side)?

Does it matter which order the pins are scoped? is:

==
int8_t pins[8] = { 5, 6, 9, 10, 11, 12, 13, SCK };```
?

3.
I have data pins soldered to Feather-Header Bat-side pins 0, 1, 2, 3, 4, and 5
Which Feather M4 pins are actually being used though? -- 5, 6, 9, 10, 11, 12    are mapped to Feather-Header Bat-Side pins 0, 1, 2, 3, 4, and 5, respectively?

related to question 1: 
e.g. Are the Feather-Header pins also getting SCK Ground-side pin data? If not, why might you think the author says the SCK pin needs to be defined?
fathom summit
#

(FYI: GCC is the compiler used by Arduino)

obtuse spruce
#

@restive heath - So - I see that rather than stacking the Feather M4 and the NeoPXL8 FeatherWing - you've chosen to wire them

#

Normally you'd just stack them using stacking headers - and all the connections from the M4 to the XeoPXL8 would made and correct... and you'd could ignore that part.

restive heath
#

Is there a pin mapping/table somewhere?

This is what I just troubleshot:

int8_t pins[6] = { SCK, 5, 9, 6, 13, 12 };

// SCK == PIN 0
//int8_t pins[8] = { SCK };

// 5 == PIN 1 not pin 0.......
//int8_t pins[8] = { 5 };

// 9 == PIN 2
//int8_t pins[8] = { 9 };

// 6 == PIN 3
//int8_t pins[8] = { 6 };

// 10 == PIN NOT IN USE
//int8_t pins[8] = { 10 };

// 11 == PIN NOT IN USE
//int8_t pins[8] = { 11 };

// 13 == PIN 4
//int8_t pins[8] = { 13 };

// 12 == PIN 5 SPLAT STRIP
//int8_t pins[8] = { 12 };

obtuse spruce
#

The NeoPXL8 maps 8 pins of the M4 to the 8 outputs down the center (0 to 7).

#

which pins of the M4 is somewhat configurable via the little solder jumpers on the NeoPXL8 board. Did you solder any of those?

restive heath
#

no.
I followed the tutorial linked. No jumpers mentioned/soldered.

obtuse spruce
#

Then by default, outputs 0 to 7, come from SCK, D5, D9, D6, D13, D12, D11, and D10 in that order

restive heath
obtuse spruce
#

on the product page

#

it does matter which order the declaration in C++ is made. You want:

restive heath
#

Fantastic.

I missed that. Certainly needed it.

Now, the header, pins 0 thru 7,
the neighboring pins, they are duplicates?; there are two sets of 0 thru 7 pins?

obtuse spruce
#

Down the middle? One rows are the data pins to the neopixel strips - the other row are all ground

#

(sorry had to help son for a moment... back)

#

You want them in the order that the code is expecting them... which, oddly, isn't in 0 to 7 order:

#
int8_t pins[8] = { 13, 12, 11, 10, SCK, 5, 9, 6 };
restive heath
#

Very cool. This is all info I was wanting about 1am Friday night πŸ˜… πŸ˜‚ I think it's close; I only have 5 drip strips -- not 7, so I need to refactor to get the Drip Strips and Splat strip acting as such -- and now that I have the Pin Mappings, and that the code is expecting out of order pin mappings, that clears out a lot of fog

obtuse spruce
#

(back again - more son helping had to happen)

#

are you just modifying the OozeMaster 3000 code as per the Icicle example?

#

Which NeoPXL8 pins do you have the drips on - and which do you have the "splat" row on?

#

I can show you how you modify the code to handle your setup

restive heath
#

Fantastic! I've been trying to refactor it without much success. Learning a lot though.

Yes, I am modifying the OozeMaster code 3000 per the Icicle example - mostly -- I only have 5 icicles, instead of 7

So,

The data pins are 0 thru 5:
icicle 0 on pin 0,
icicle 1 on pin 1,
icicle 2 on pin 2,
icicle 3 on pin 3,
icicle 4 on pin 4, and

splat-strip on pin 5

Next piece is getting the splat strip to be a splat strip.

And then, maybe timing of the splat strip LEDs -- mapping led0 to icicle 0, led 1 to icicle 1 --- but we'll find out

edit:

My Splat strip is stuck on icicle 0 =/ but also Icicle 0 is working as an icicle

edit 2:
GOT IT.
if (N_DRIPS < _num_of_data_pins_in_use minus 1) { ...

//SET NUM OF ICICLES (total_num_of_icicles, icicle_strip_, splat_timing)

set(5, i, x);
}

obtuse spruce
#

And - you have it working? or still wrong things on wrong pins?

restive heath
#

it's working. I'll post a pic in a sec. Just adjusting the gravity

obtuse spruce
#

Some days I wish I could adjust gravity.... πŸ˜†

restive heath
#

Can't really see the drips from far away -- they're too far back on the ledge. I'll move them forward tomorrow.

BUT IT WORKS.

Thanks for helping today, @obtuse spruce !

obtuse spruce
#

Looks great, @restive heath

north stream
lapis meteor
#

arduino is not ooop

#

such a screwed thing

#
int ra; //random
int dv; // delay
int pin; //actual pin 
int bulb2;
int randomik; 

void setup() {
//  Serial.begin(9600);
  pinMode(13,OUTPUT);
}

void loop() {
  digitalWrite(13,HIGH);
  
}```
#

im frustrated with its physics

#

im getting a raspberry pi if i cant deal with this cotton candy of wires

#

certainly my creativity is dying

#

Wow it got stuck to the woodπŸ‘Œ

#

Mr brain, it's broken

#

How much will I get a raspberry Pi for

#

Does it requires physics

#

at the rate everyone

odd fjord
pine bramble
#

like D1-D2-D3-D4-D7 but it is the default script:

north stream
north stream
livid osprey
# lapis meteor im getting a raspberry pi if i cant deal with this cotton candy of wires

Just letting you know, the breadboard-side of circuit design is identical between Arduinos and Pis. C++ is definitely capable of OOP, but basic circuit fundamentals is a strict requirement for any of these electronic projects. A Pi will allow access to Python, but will certainly open a new can of worms with learning to configure and setup your build environment.

#

Definitely go through the breadboard basics in Jerryn's link, and consider playing with an Arduino simulator like Wokwi (https://wokwi.com/arduino/new?template=arduino-uno) or TinkerCAD Circuits (https://www.tinkercad.com/learn/circuits) if you want to connect wires to components without risking any permanent damage to your own hardware.

Create a new Arduino Uno simulation project, run it in your browser and share your code and schematics.

#

And if, after you get past the hurdles of circuit design, you decide the C++ in the Arduino IDE is still not for you, there are a plethora of CircuitPython or MakeCode devices that allow for more streamlined software development. None of this bypasses the process of how to put together components from the hardware side, but if you have a goal in mind, we can certainly help you find the right resources to get you where you want to be.

#

I don't think basic circuit fundamentals classify as physics in terms of difficulty or academic rigor, but definitely has a basis in said field. I've seen people who struggle with basic physics create some really neat electronic designs, so it isn't strictly required to make stuff these days.

north stream
#

There's also Rust, Lua, Forth, and several other possibilities.

idle nymph
#

@lapis meteor what are you trying to do?

#

i can help:)

#

If you are just trying to light up an LED using the Arduino Uno, I can guide you step by step and explain everything

proud lion
#

Hello - I am having issues compiling code for my Adafruit Metro ESP32-S2 Express using Arduino. I'm not using CircuitPython because I need to connect to a WAP2 Enterprise so must use Arduino. I have a Mac and am following the Adafruit set-up tutorial and have installed the esp32 board on Arduino. I've successfully installed the METROS2BOOT drive and can see it on my computer. However, the board does not show up under Port on Arduino. When I put the board in bootloader mode, it shows up under Port, but the METROS2BOOT drive disappears from my computer. I try compiling the Blink sketch, but I get the following error: "Error compiling for board Adafruit Metro ESP32-S2." I've been searching for a solution for hours but am having no luck. Any suggestions?

pine bramble
#

Hi

#

I am having issue with the QtPy ESP32-S2 with Arduino

#

When I connect it to the PC it doesn’t make the noise of the USB detection and it doesn’t show in the Device manager

stable forge
pine bramble
#

I did

#

But nothing happens

stable forge
#

do the lights come on?

pine bramble
#

There are 2 buttons on the board

#

Reset and another one

#

I don’t think it is BOOT button

stable forge
#

yes, that is the boot button. The button closer to the USB connector.

pine bramble
#

How do I take it out of USB DFU mode

#

So it can be seen in the Device manager

stable forge
#

It should show up in Other Devices as ESP32-S2. Do you see it there?

#

It is not going to show up as a disk drive. You have to use a specific program to upload to it in DFU mode. The ESP Arduino board package should support this, I think.

pine bramble
#

I see it now on other devices

#

As ESP32-S2

stable forge
pine bramble
#

I did that

#

I followed that link

#

To install the driver

#

But when I disconnect and connect it doesn’t make the USB detected sound

stable forge
#

is there a yellow triangle in Device Manager or not?

pine bramble
#

Yes

#

Yellow triangle

#

On other devices

#

ESP32-S2

stable forge
#

looking... which driver did you install?

stable forge
#

did you mean the Board Support Package? That is not a driver.

#

though it may contain one

pine bramble
#

Yes

#

The board support package

#

With the JSON

stable forge
#

what version of Arduino are you using?

pine bramble
#

1.8.13

stable forge
#

I am installing 2.0 RC, which may include it outright. I'll get back to you in a few minutes

pine bramble
#

OK

stable forge
# pine bramble OK

it will be a while, I need to try it on another machine besides my laptop

pine bramble
#

Is there a way to reset the board ?

#

To factory settings and then try to connect it again

#

I saw something on the adafruit website regarding erasing the ROM

stable forge
pine bramble
#

OK

#

Sure

stable forge
# pine bramble OK

This is getting more confusing. I don't have an easy solution for you at the moment. Asking for more info but it may not be soon. Don't wait around.

pine bramble
#

OK

#

Why is that happening?

#

Is there a reason ?

stable forge
#

the documentation is not answering my questions

pine bramble
#

OK

stable forge
#

I have no trouble doing this from Linux, which has the right drivers built in

#

that would also be true on Mac

pine bramble
#

OK

stable forge
#

Windows does not have built-in DFU drivers

pine bramble
#

I am using a windows machine

stable forge
pine bramble
#

OK

#

No problem

stable forge
#

@pine bramble I am back, if you are around

#

What I found is that even without installing a driver, when I plug in the board and put it in boot mode, a new COM port appears. You can see this in the Ports listing in Device Manager. Open that up, plug in the board with the boot button pressed (or reset with boot pressed), and then choose that COM port in the Port menu in Arduino. I was able to upload. If you are in boot mode, your board will then not restart automatically. Instead you need to press reset, without boot, and the program you uploaded will start. From then on, as long as your Arduino program does not crash, you should be able to upload without going back into boot mode.

proud lion
# proud lion Hello - I am having issues compiling code for my Adafruit Metro ESP32-S2 Express...

Sharing this question again in case it was missed πŸ™‚ I keep getting the following compiling error with the Metro ESP32-S2: Arduino: 1.8.19 (Mac OS X), Board: "Adafruit Metro ESP32-S2, Enabled, Disabled, Disabled, Internal USB, Enabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi), QIO, 80MHz, 4MB (32Mb), 921600, None"

[73397] Error loading Python lib '/var/folders/1f/16yxxxyx7lv6c3hn8htr35gr0000gp/T/_MEIyU41Q3/libpython3.8.dylib': dlopen: dlopen(/var/folders/1f/16yxxxyx7lv6c3hn8htr35gr0000gp/T/_MEIyU41Q3/libpython3.8.dylib, 10): Symbol not found: ____chkstk_darwin
Referenced from: /var/folders/1f/16yxxxyx7lv6c3hn8htr35gr0000gp/T/_MEIyU41Q3/libintl.8.dylib
Expected in: /usr/lib/libSystem.B.dylib
in /var/folders/1f/16yxxxyx7lv6c3hn8htr35gr0000gp/T/_MEIyU41Q3/libintl.8.dylib
exit status 255
/Applications/Arduino.app/Contents/Java/arduino-builder returned 255
Error compiling for board Adafruit Metro ESP32-S2." I've uninstalled and reinstalled Arduino 3 times and can't seem to get it to work. Any help is much appreciated!

north stream
#

It could be the libraries are built for a different version of MacOS

proud lion
pine bramble
pine bramble
#

does someone have the code to write a float/integer to a flash-chip via the serial flash library by paul stoffergen

#

or just logging data from any sensor to the flash chip

unique anchor
#

Hello there chat!

#

In short - I'm using an arduino library (with help of PlatformIO) ACAN2515 to talk to the CAN bus.

The issue is - if I upload or debug, everything is fine,

If I reset or start the program by plugging the pico2040 in, something is missing and the Can chip initialization fails...

The trace goes deep to the internals of the adruino module and I can't really make heads or tails by that point.

Perhaps there is a common knowledge about that sort of thing?

odd fjord
pine bramble
#

ye but thats not there in the examples

#

like maybe a datlogging example

odd fjord
#

The basic idea is that you are writeing a string of bytes to the flash chip. Creating a structure allows you to "pack" your data (floats,integers...) into the structure then write it to the flash. When you read it back, the structure knows how to decode it.

#

THis is the critical part ```// are we recording?
if (isRecording == true) {
// is it time for another sample?
if ( currentMillis - prevMillis > sampleInterval ) {
prevMillis = currentMillis;

  // prepare the record for writing to the flash chip
  // read in the data from your real sensors here!!!!
  oneRecord.recordNumber++;
  oneRecord.timeStamp = currentMillis;
  oneRecord.temperature = getFakeTemperature();
  oneRecord.pressure = getFakePressure();
  oneRecord.acceleration = getFakeAcceleration();

  // write the record to the flash chip
  file.write( (uint8_t *)&oneRecord, sizeof(oneRecord) );
}

}```

pine bramble
#

ohhhhhhh

#

ok now it makes sense

#

thanks jerryn!

pine bramble
odd fjord
#

Glad it helped -- Good luck!

unique anchor
#

Folks, I have fixed that *** issue and would like to write an article. My first actually.... Where would be a good place to drop one, so that it could reach people quickly. I imagine it's a doozie to figure out that stuff for yourself, even though the solution is obvious in retrospective.

fathom summit
#

Your best bet would be to post it on some relevant forum somewhere

#

They will probably have all the SEO stuff figured out, and it will probably show up in google search results

unique anchor
#

I have written the jetbrains for a place on their site

#

it's about integrating pico with their CLion IDE

fathom summit
#

You could also do a writeup in your blog or something and then send it to hackaday

unique anchor
#

So I need a blog... haha πŸ˜„

fathom summit
#

Or a GeoCities page πŸ˜„

unique anchor
#

πŸ˜‚

fathom summit
unique anchor
#

there is a game about that on steam

#

;P

fathom summit
#

I guess you are referring to hypnospace heh

unique anchor
#

yeah))

fathom summit
#

Haven't played it, not enough time. Looks nice though

unique anchor
#

i suppose I'll walk it through on youtube πŸ˜›

arctic grove
#

just wanna ask if someone says "serial 1 pins" does that mean these two pins?

elder hare
#
    fadeToBlackBy(_Leds.data(), _NumLeds, 255);

    for ( float i = 0; i < _ledsettings._pattern_lead_pixel_size; i+= _ledsettings._pattern_lead_pixel_size )
    {
        float pi = _pattern_position + i - _ledsettings._pattern_lead_pixel_size;
        DrawPixels(pi, _ledsettings._pattern_lead_pixel_size, ColorFromPalette(_ledsettings._palette_current, pi * 255 / _NumLeds, Brightness, _ledsettings._palette_blend));
    }
void LEDPattern::DrawPixels(float fPos, float count, CRGB color)

Why does the palette start by the color from the end and then suddenly flips over to the start of the palette? :S

north stream
arctic grove
#

teensy 3.2

north stream
arctic grove
#

perfect and thanks for the link

queen stump
#

guys I have a data exceeds available space issue

In my sketch I have over 400 GPS coordinates, and I guess Arduino can't handle it in the way I "wrote" the code

`static const Position positions[450] =
{

{12.345678, 98.765432},
{23.456789, 87.654321},

....`

so this is how the sketch looks like, 448 more of the brackets with numbers....what methods could I use to shorten this? is there a simple way to shorten this code in a way?

cedar mountain
#

That array would take 3600 bytes, assuming that the Position type is just two floats. What Arduino are you using?

queen stump
#

just a regular uno r3

#

"Sketch uses 12102 bytes (37%) of program storage space. Maximum is 32256 bytes.

Global variables use 3030 bytes (147%) of dynamic memory, leaving -982 bytes for local variables. Maximum is 2048 bytes."

#

this is the message

north stream
#

Depending on the accuracy needed, you might be able to compress that somewhat.

queen stump
#

what are my options? πŸ˜„

north stream
#

The earth has a circumference of about 40,000km, so if 1-km accuracy were suitable, you could store lats and longs in 16 bits, which would halve your storage.

queen stump
#

16 bits meaning...

12.345, 98.765
instead of
12.345678, 98.765432

or something like that?

#

I would like to have some accuracy really

north stream
#

I'd convert the values to integers and store them in 16-bit ints. Unfortuately, the naive approach of just multiplying them by 1000 wouldn't work for some locations, so you'd have to do a little more math to pack and unpack them.

#

For more accuracy, you'll have to get even fancier.

livid osprey
#

You could also connect an external storage chip to hold these values? Perhaps an EEPROM or SPI flash?

queen stump
#

where do I start for converting it into integers?

#

im a noob needless to say, hence asking πŸ˜„

north stream
#

It's one of those problems that gets interesting quickly. A minute of latitude is about 1.8km. However, a minute of longitude varies, from about 1.8km at the equator to zero at the poles. So you could theoretically compress longitude values more in polar regions while still having good resolution. The amount of compression this buys you depends on both how willing you are to indulge in complicated trigonometry and the distribution of your points (if many of them are polar locations, you'll get more compression).

queen stump
#

hooly moly

north stream
#

To think of it another way, the earth has about 510072000 square kilometers of surface area. Assuming you could somehow divide it up evenly and assign each piece to a 32-bit quantity, that yields 0.118 square kilometers per piece.

queen stump
#

i never would've guessed it could get that complex, I figured there's a way to compress it like CSS SASS and such πŸ˜„

north stream
#

That's why I like to do those basic calculations, which quickly yield what the theoretical maximum compression could be. If that's not enough, something else has to budge. Personally, I like Hem's idea of storing the data elsewhere (FRAM chip, SD card, whatever) and not getting into the complexities of trying to compress (and recover) the data, and the attendant loss of precision.

queen stump
#

well I planned on using scaling this gizmo down and using Nano instead of Uno...but now this makes for another challenge

north stream
#

You could, of course, use something like an ItsyBitsy M4 Express, and take advantage of both a smaller board and (much) more storage.

queen stump
#

I might be behind with the times...

#

are there any Nano editions with faster chip?

#

can't be that 328P is where they stopped?

north stream
#

There are things like the Nano Every, with an ATmega4809 chip, but it's not that much larger.

queen stump
#

does code change if the chip changes?

north stream
#

Generally it does, but not a whole lot.

#

An ordinary Trinket M0 (an even tinier board) still has 256kB of flash, a serious improvement over the ATmega328

queen stump
#

oh nice, how come Arduino themselves dont do those kind of fast/compact devices?

north stream
#

They're starting to. The Nano 33 BLE is a much more powerful board.

queen stump
#

so the limit I got on the compiler "Maximum is 2048 bytes" - which part of Ardu specs is this?

#

2048 bytes of memory? or what exactly?

north stream
#

Hmm, that's RAM. I would have thought the compiler would have seen your const keyword and put that data into flash instead of RAM, but apparently it did not. You may need to add the PROGMEM keyword and you might have to use slightly different code to read the values from the array so it fetches them from flash.

#

The 328P has 32kB of flash and only 2kB of RAM

#

If you can find a way to convince the compiler to store that data in flash, your problem might be solved.

queen stump
#

what the... πŸ˜„

north stream
queen stump
#

just added static const Position positions[450] = PROGMEM

#

and it compiled

#

Sketch uses 12102 bytes (37%) of program storage space. Maximum is 32256 bytes.
Global variables use 518 bytes (25%) of dynamic memory, leaving 1530 bytes for local variables. Maximum is 2048 bytes.

north stream
#

Sweet!

queen stump
#

i mean just to nerd out - why did that one word PROGMEM cut down the global variables from 3030 bytes to 518

north stream
#

That was apparently what told the compiler to just have that data in flash instead of trying to build a copy of it in RAM as well.

queen stump
#

awesome! my friend has that 33 BLE or some similar factor Arduino with wifi, will try to make it work without progmem just to see if it works

#

like you mentioned, the code should stay the same?

#

despite different chips used from uno?

north stream
#

Yes, unless you're doing specific things that depend on certain hardware features. In general, the compiler does a good job of abstracting the implementation details so you can use the same source code, but there are some details that are going to vary.

#

If you were writing your code in assembler, it would need a complete rewrite, but a "portable" language like C gives you the freedom to change architectures and the compiler just takes care of the details for you (for the most part).

queen stump
#

if in my case I just compile this "328p" code (so to speak) to the 33 and it works on the first test...are there any chances that the code dumbs out for some reason mid operation, despite first quick test working out fine?

north stream
#

Probably not, but I really don't know enough to be sure.

hot minnow
#

Not sure if this is the right place, but I'm at a loss. I'm happy to ask elsewhere if I'm in the wrong spot. Preface with "I'm an absolute noob at this." I am trying to replicate the exact functionality shown in the video on this page (https://www.adafruit.com/product/3406), though I have a 16 pixel ring.

#

My original goal was, I thought, very simple. A small ring light that I could put on my webcam for video calls (dark environment here). It would be powered via a USB on my PC. The functionality of choosing the color and brightness via the Bluefruit Connect app looked like a nice bonus. But now that the board (Feather nRF52 Bluefruit LE - nRF52832) and LED ring (NeoPixel Ring - 16 x 5050 RGB LED with Integrated Drivers) are here, I can't get anything to work.

#

Am I missing something super obvious, or did I jump into the wrong end of the pool here. How can I get this functionality out of the two devices I have, or even any other devices, as absolutely simply as possible?

north stream
#

When you say "I can't get anything to work", how far did you get? Does the code compile? Can you load it onto the board?

hot minnow
#

I downloaded the library specific to the nrf52 and there's a "neopixel" example within it. It compiles fine. Loads to the board. I can connect with the app. Neither the color picker nor neopixel sections of the app produce any result on the LEDs. I've also tried several of the neopixel test examples that should (if I'm reading them correctly) just loop colors on the LEDs to verify they work. No lights.

#

I've tried to stick to prebuilt examples, either directly through the IDE or other projects utilizing the same hardware, since as is obvious... I feel I'm in way over my head at this point. Haha. I feel like creating and flashing my keymap on my KB was way easier.

obtuse spruce
#

@hot minnow - can you point us to exactly which "neopixel" example you're working with? I'm not finding it in the Adafruit nRF52 core files.

hot minnow
obtuse spruce
#

As far as I can tell.. this board doesn't have a neopixel on it - so this example, for this board, will use the neopixel attached to pin D30 which is, oddly enough labeled 16 on the board, on the short header side, next to the USB power pin.

#

Is that where you've connected the data line of your NeoPixel ring?

hot minnow
#

Yep.

obtuse spruce
#

Oh wait - OOOOOOO pin out diagram is SOOOOOO confusing

obtuse spruce
#

My bad - D30 is the pin labeled 30 on the board - fourth from the right edge on the short header side

#

I think that is where you should have the data line of the NeoPixel ring

#

on that diagram the numbers in white text on back are the physical pin numbers... which don't directly matter for something like this.

#

The number in white text on purple background is the arduino pin number, like 30 or D30 which you use in code to talk about the pin.

hot minnow
#

LIGHT!

#

And now the NeoPixel section of the app works perfectly!

obtuse spruce
#

Congrats!

hot minnow
#

Thank you! Now I can mount this thing and NEVER TOUCH THE CODE AGAIN. haha

pine bramble
stable forge
#

hi, so try what I wrote up. Another staff member also tried it and it worked for him too

#

you can ignore the yellow triangle. The important thing is that putting the board in boot mode will cause a COM port to appear, and that is the one to choose in Arduino to upload. Then after you upload, you must press reset to get the program to run. Once there is a working program on the board, the Arduino program will notice upload attempts (on a different COM port!), and you won't have to use bootmode. again. You can also install the UF2 bootloader, and it can also be used for Arduino uploads, if you double-click reset.

pine bramble
#

It happened to 2 QyPy’s that I have and when I connect them they both show up as COM 6

stable forge
#

did you set COM6 as the port in Arduino and then upload?

pine bramble
#

Not yet

#

It can’t be that two different boards have the same COM port

#

Right ?

stable forge
#

to Windows, they look identical, so yes

pine bramble
#

But when I plug in two different boards they are given different COM ports

#

It only happens to those specific boards

stable forge
#

I believe it is because there is not a unique ID seen by Windows when you plug those in, in boot mode

#

so it can't tell them apart

#

for most other boards, a unique ID is presented. Are you saying you have other identical boards Windows can tell apart? e.g. two Arduino Uno's?

pine bramble
#

When I plug 2 Arduino in my PC I get 2 different COM ports

stable forge
#

I think you will see different COM ports once you have Arduino programs running on these boards, but I am not sure. The on-board chip has to have a unique ID (which I am pretty sure it does) that it presents during USB enumeration

pine bramble
#

What I don’t understand is why they don’t make a sound when i plug them in my PC

stable forge
#

because they are mostly not recognized as a known device

#

I think I saw the same thing

#

nevertheless, the COM port appears, and you can use it

pine bramble
#

But I have another QtPy ESP32-S2 board that when I plug it in the PC it makes a noise and works fine

#

Only these two that I got have it

stable forge
#

that one has the bootloader or a running program on board, which identifies itself properly

#

Try the "factory reset", it will make things easier, I believe

pine bramble
#

OK

pine bramble
#

Fixed

#

Thank you

#

I did a factory reset

stable forge
#

excellent! glad the instructions worked out; we just rewrote them to be clearer

faint raft
#

Hello wonderful people.

vivid rock
#

hi:)

faint raft
#

I am here, with a math problem... I think. So, I am trying to use the freeMemory() function with a SAMD51, but for some reason I am getting negative values. I am going to climb out on a limb and start sawing near the tree trunk... First assumption: my variable storage is not large enough for the entire memory, so it's flipping?

#ifdef __arm__
extern "C" char* sbrk(int incr);
#else
extern char *__brkval;
#endif

int freeMemory() {
    char top;
#ifdef __arm__
    return &top - reinterpret_cast<char*>(sbrk(0));
#elif defined(CORE_TEENSY) || (ARDUINO > 103 && ARDUINO != 151)
    return &top - __brkval;
#else
  return __brkval ? &top - __brkval : &top - __malloc_heap_start;
#endif
}

Required reading: https://learn.adafruit.com/memories-of-an-arduino/measuring-free-memory
Also checked this solution, but it didn't help either: https://learn.adafruit.com/adafruit-feather-m0-basic-proto/adapting-sketches-to-m0

#

Values I am getting:

  • In setup(): -25625
  • In loop(): -33877
#

PLS SEND HALP

faint raft
#

So. I am using CLion with Platform IO for this. Could that impact anything?

#

Maybe I should try to compile with Visual Studio Code? ... BRB... VSCODECOMPILE.exe running...

#

Nope. Same same. But not even really different.

faint raft
#

OK. So, either nobody knows, or everybody knows, and you're all laughing at me. πŸ˜„

#

Anyway, ping me if you have any idea of what's up with this memory thing.

wraith current
#

@faint raftcould it be as simple as the print function casting an unsigned int to a signed int ?

#

probably not. just a wild guess.

vapid frost
#

nvm i think gcc is just doing that because its local

faint raft
lapis meteor
#

how can i start an lcd

#

where do the pins go to?

#

like its a bloody circle with holes and expect wires to go through it???

#

im monke btw

#

i wanna see if it is included in the kit

#

ah yes hookup wires is it?

#

holy, its insanely hard or did i watch a not so good tutorial

lapis meteor
#

nvm i will do that project later on

vivid rock
#

to figure that out, it would help to know exact model of the LCD - are there any marking on it?

lapis meteor
#

1602A

livid osprey
pine bramble
#

okay, next short question

#

it is based around this issue:

#

somebody said he fixed it, but i do not have a clue how and didn't got his answer (yet):

#

I resolved the issue by chunking the binary data 100 bytes at a time and sleeping between sending images. I'm still working on the best timing.

#

code is something like:

#

def sendBinaryToDevice(self, data):
if self.debug:
print("Sending " + str(len(data)) + " bytes of binary data.")
self.ser.write(data)

#

any help appreciated

urban tapir
#

I have an adafruit feather m4 CAN. what's the avrdude -p partno (name) for it? I tried scraping it out of the arduino gui, but I didn't find it. I assume there's a way to find it, what is it? I know the fqbn is adafruit:samd:adafruit_feather_m4_can, but that's different.

livid osprey
#

SAMD (or in this case, SAME) doesn't use avrdude for programming. If you need the chip name though, I believe it's ATSAME51J19A.

lapis meteor
#

lalalalal lalalalala la6

pine bramble
#

Hello can someone help me with what is wrong in this code. I am a beginner so apologies if this is a very silly mistake. I am using the SerialFlash library: https://github.com/PaulStoffregen/SerialFlash for my flash chip and am having an issue with the below code. Basically when I print my read flash chip data it gives 0 on the serial monitor.

#include <SPI.h>
const int cspin = 16;

SerialFlashFile file;
char filename[16];
char buffer1[256];

void setup() {
  // put your setup code here, to run once:
  SerialFlash.begin(cspin);
  Serial.begin(9600);

  SerialFlash.create( "dummy.txt", 16 );
  file = SerialFlash.open("dummy.txt");

  //file.write( (uint8_t *)&oneRecord, sizeof(oneRecord) );
  //file.write((uint8_t *)&noom, 256);
  

}

void loop() {
  // put your main code here, to run repeatedly:
  //file.write((uint8_t *)&noom, 256);
  //file.write(buffer, 256);
  
  Serial.println(file.read(buffer1, 256));

}``` 

the data is already written to the flash chip this is just to read it
this is the read function - 

```file.write(buffer1, 256);```
cedar mountain
elder hare
#

Precision Drawing and fadeToBlackBy

#

i created a thread for a problem i have relating to ESP32 / WS2812B / FastLED, if anyone can take a look! i posted alot of info (the reason for creating the thread)

pine bramble
# cedar mountain It looks like you are calling `create()` each time in the above code, which woul...

ok I changed that but I am still not getting the desired result

#include <SerialFlash.h>
#include <SPI.h>
const int cspin = 10;

SerialFlashFile file;
char filename[16];
char buffer1[256];

void writedat(){
  SerialFlash.begin(cspin);

  SerialFlash.create( "dummy.txt", 16 );
  file = SerialFlash.open("dummy.txt");

  //file.write( (uint8_t *)&oneRecord, sizeof(oneRecord) );
  //file.write((uint8_t *)&noom, 256);
  file.write(buffer1, 256);  
}

void readdat(){
  Serial.begin(9600);
  SerialFlash.begin(cspin);

  file = SerialFlash.open("dummy.txt");
  
  Serial.println(file.read(buffer1, 256));
  
}
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  writedat();
  readdat();

  
}


void loop() {
  // put your main code here, to run repeatedly:

} ```
cedar mountain
#

Is it still printing 0, or does it print 16 now?

pine bramble
#

it prints 16 now, is that what it should be printing?

cedar mountain
#

Yes, because you created the file originally with a length of 16 in the create() call.

#

So it can only write or read a maximum of 16 bytes.

obtuse spruce
#

SerialFlash is a bit funky and doesn’t work like a standard file system. In particular, unless you erase the whole flash chip… you can’t ever recreate a file, or even rewrite it. as such, your older code might have poisoned the file dummy.txt. try the code with a new, previously unused file name.

pine bramble
pine bramble
obtuse spruce
#

At some point i need to package up my flash code as a library. It handles a block of state that you want to persist often, like synthesizer settings, and you want whatever the user last tweaked to be there after a power cycle.. so the code is saving after every knob turn. It handle all layout, erasing, and wear leveling.

urban tapir
elder hare
#

i created a thread for a problem im having relating to ESP32 / WS2812B / FastLED, if anyone can take a look! i posted alot of info (the reason for creating the thread)

elder hare
#

realy need some help with this :/

pine bramble
#
#include "AdafruitIO_WiFi.h"
#include <DHT.h>

#define DHTPin D5
#define DHTType DHT22
DHT dht(DHTPin, DHTType);
 
#define WIFI_SSID       "WiFi Name"
#define WIFI_PASS       "WiFi Password"

#define IO_USERNAME    "your username"
#define IO_KEY         "your key"

AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
 
AdafruitIO_Feed *temperatureFeed = io.feed("Temperature");
AdafruitIO_Feed *humidityFeed = io.feed("MHumidity");

void setup() 
{
  Serial.begin(115200);
  io.connect();
  dht.begin();
 
  while(io.status() < AIO_CONNECTED) 
  {
    Serial.print(".");
    delay(500);
  }
}
 
void loop() 
{
  io.run();
  float t = dht.readTemperature();
  float h = dht.readHumidity();

  temperatureFeed->save(t);
  delay(100);
  humidityFeed->save(h);
 
  delay(5000);
}```
#

I would like to connect a si7021 sensor to an Arduino uno for a class project and then use the built-in esp8266 and use the adafruit io dashboard to display the temperature and humidity but the code I found doesn't help me much thanks to anyone who can help me

#

in this code I would have to change the dht22 sensor to a si7021 sensor but it doesn't work

karmic fulcrum
#

Hey, I am having some trouble getting an Arduino to communicate to a PC over UART. I am using the Python UART library on the PC, and the Ardunio is simply not getting the UART info. Any tips?

livid osprey
#

What UART hardware are you using on the PC side, and how are you wiring it?

karmic fulcrum
#

Never mind. It works on Linux by outputting the plain text to /dev/ttyAMC0 Is there any problem with that?

leaden walrus
#

no

#

double check com port is showing up on PC in dev man maybe?

karmic fulcrum
#

It does. It appears to have been an issue with the Python library, so bypassing the Python library fixed the issue as far as I can tell.

leaden walrus
#

which python library? pyserial?

karmic fulcrum
#

I think so. It was import serial

leaden walrus
#

unless something else is taking the com port when it connects, should work

karmic fulcrum
#

Oh, would monitoring the serial output of the Arduino over the Arduino IDE count?

leaden walrus
#

yes. if arduino serial monitor is using it, then you won't be able to open it in python.

shut echo
#

can i use the imagereader with an ili9486?

#

i cant find a lcd driver from adafruit for it but the driver need to inherit from Adafruit_SPITFT

frigid orbit
#

I need a very specific sensor recommendation

#

When you have a closed room and you open it suddenly and it creates air drag and maybe a change in barometric pressure

#

So, I've tried to search it on the web but the queries I'm using are not giving me any result

#

I need to detect that effect of the door opening and closing in the smallest from factor posible

#

Any guidance?

leaden walrus
#

could maybe also do it optically? like with a time of flight sensor pointed at door?

#

but that may be too intrusive, since it requires hardware mounted to door

shut echo
#

or how do i display adafruit gfxcanvases?

livid osprey
shut echo
#

and what about displaying gfxcanvases

#
tft.drawRGBBitmap(0, 108, canvas.getBuffer(), 320, 372);

does not work

livid osprey
#

You're going to have to share your code for me to have any context of what you're trying to do. Plus button to the left to upload from file, or surround a codeblock with 3 backticks.

shut echo
#
        GFXcanvas16 canvas = GFXcanvas16(320, 372);
        canvas.fillScreen(0x017F);
        canvas.drawBitmap(0, 0, door_rfid, 320, 372, WHITE);

        tft.drawRGBBitmap(0, 108, canvas.getBuffer(), 320, 372);

im basically just trying to only have to draw once to the screen instead of once for every operation

#

just like with the Adafruit_SSD1306 library where you can draw into a buffer which you have to push to the screen later

#

and i guess that is also the purpose of gfxcanvases

karmic fulcrum
urban tapir
lapis meteor
#
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xc3
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xc3
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xc3
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xc3
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xc3
Problem uploading to board.  See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xc3
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xc3
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xc3
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xc3
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xc3
#

help

#

fixed but

#

why it does not work when i plug in wire into pin 0 & 1

rough torrent
#

Pins 0 and 1 on an Arduino Uno are connected to the serial pins which are used to upload code and print to the serial monitor

lapis meteor
#

ohk

lapis meteor
#

how do i use an 8x8 dot matrix

livid osprey
cedar mountain
cedar mountain
#

I'm suspicious because it seems to be drawing into the top 108 rows even though you specified a Y offset. Are you able to use other drawing commands normally with this screen? (I'm wondering if the general TFT setup is correct.)

shut echo
#

no i didnt show the other rows. everything else works

#

what could be the problem is that i had to change the data type from char to uint8_t because i used this converter https://javl.github.io/image2cpp/. is that the problem?

#

just the canvases dont work

cedar mountain
#

Both char and uint8_t are 8-bit data types, so I wouldn't suspect that to cause any issues.

#

Just to double-check, your door_rfid image is 320x372 originally?

shut echo
#

yes

cedar mountain
#

That should produce a bitmap array of 14880 bytes.

shut echo
#

how can i tell how big that is?

cedar mountain
#

You can print sizeof(...) to find out how big the compiler thinks it is, or maybe use the line numbers in the source code if the converter outputs 16 bytes per line or something constant.

#

Or if you drawBitmap directly into the tft and it works, then that would indicate that it's fine.

shut echo
#

yeah it does work normally

cedar mountain
#

Another thing to check is whether the canvas allocation actually worked. That would take up 232KB of RAM, so many microcontrollers will not be able to hold it.

shut echo
#

ah so it doesnt work on the arduino mega?

cedar mountain
#

Yeah, not a chance. That only has 8KB of RAM total...

shut echo
#

ah well i didnt know that thank you

rough slate
#

Hello guys, I want to call the functions on top (ily,tekststart,missu) the whole time individualy without having to wait for the analog and led stuff. How do i do this?

cedar mountain
rough slate
#

I do that to create a wipe effect, so without it it would just be a solid color immidiatly

cedar mountain
#

Ah, gotcha.

shut echo
#

Hey for some reason when using the isTouching method of the adafruit touchscreen libary this error comes up

#
ccZgnUdz.ltrans0.ltrans.o*: In function loop

Error linking for board ATmega2560 (Mega 2560) (Arduino Mega)
DoorOS.ino:429: undefined reference to TouchScreen  isTouching()
 
collect2.exe*: error: ld returned 1 exit status
elfin thorn
#

Hi y'all!

I'm trying to run img2code on my Windows 10 laptop. I installed JAVA but when I type the command, "./gradlew" in the command prompt, nothing happens... well, not in the foreground. It seems something happens very quickly in the background but too fast to see what it is.

The ReadMe files on GitHub and in the Zip are useless - unless one is already a JAVA geek. Thanks!

faint raft
thorn bronze
#

Adafruit soundboard

pine bramble
#

Hi sorry to bother you guys again, my code is not working instead of getting 64 I'm getting 256

#include <SerialFlash.h>
#include <SPI.h>
const int cspin = 10;

SerialFlashFile file;
char buffer1[64];

void writedat(){
  SerialFlash.begin(cspin);

  SerialFlash.create( "dummy.txt", 256);
  file = SerialFlash.open("dummy.txt");

  //file.write( (uint8_t *)&oneRecord, sizeof(oneRecord) );
  //file.write((uint8_t *)&noom, 256);
  file.write(buffer1, 256);  
}

void readdat(){
  Serial.begin(9600);
  SerialFlash.begin(cspin);

  file = SerialFlash.open("dummy.txt");
  
  Serial.println(file.read(buffer1, 256));
  
}
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  writedat();
  readdat();

  
}


void loop() {
  // put your main code here, to run repeatedly:

}
spare cliff
#

Can anyone help with me trying to reset Arduino Pro Micro?

#

I tried to connect rst to the gnd pin but it would never reset

#

It's driving me crazy

#

Idk anything about electronics so forgive me but will this work?

#

Or is this not how you do it

idle nymph
#

Hello! So today I had an idea in mind to make an LED light up only if you do a certain pattern on the buttons (2-5-1), but it doesn’t quite work. I have tried debugging the code and it seems that only the 2nd button works for some reason

#

After further inspection it seems that the 5th button is not receiving enough power

#

I fixed it, somehow the 5th button was burnt or something

#

After replacing it it works

elfin thorn
cedar mountain
pine bramble
#

oh ok

#

so write and read would have to be the size of buffer1?

cedar mountain
#

You can use sizeof(buffer1) instead if you want it to automatically calculate the correct size to use the whole array.

pine bramble
#

ah ok

#

thanks again edkeyes it works great now!

leaden walrus
#

sizeof(buffer1)/sizeof(char) <- just to protect against potentially different char sizes, since sizeof returns total numbers of bytes

cedar mountain
#

Well, the read() and write() calls are expecting a number of bytes as a parameter, I think.

leaden walrus
#

ok. that'd work. it's more of when one is expecting "size of array". (it's bitten me before)

stable forge
small pumice
#

Looking kind of deep into WiFi. ESP8266WebServer has functions like server.handleClient() and server.send() while WiFi101 makes you read and send bits of info at a time (i.e. client.println("HTTP/1.1 200 OK") Is there an include with this functionality for SAMD, specifically M0 WiFi?

#

@small pumice Doh, just found clues in WiFiWebServer on Github. But advice still appreciated if there are other sources.

elfin thorn
#

This is what I get if I'm in the Java directory

#

This is the instructions ver batim in the GitHub page:
"Image2Code is a small java utility to convert images into a byte array that can be used as a bitmap in the Adafruit-GFX-library

USER Guide

To Run

Run the command: ./gradlew run to launch the application.

Using the Application

  1. Click "choose file" button.
  2. Then copy paste the generated code in your arduino sketch.

Dependencies:

  1. Java: If you do not have this installed, it can be found at: http://www.java.com/en/download/ if you havn't already done so.
  2. Gradle: The gradlew will take care of this dependency. Just running any gradlew command will pull down the dependency

#DEV guide:
This sub-project using Gradle to build. To build a runnable jar: ./gradlew jar "

solemn cliff
#

from inside the Img2Code directory

elfin thorn
#

@solemn cliff - Here is what I get:

#

let me see what I can find on the Gradle.org site...

solemn cliff
#

ah

#

gradlew run

elfin thorn
#

Well, I followed the instructions for Windows 10:

Windows 10 and Windows 8
In Search, search for and then select: System (Control Panel)
Click the Advanced system settings link.
Click Environment Variables. In the section System Variables find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New.
In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable. Click OK. Close all remaining windows by clicking OK.
Reopen Command prompt window, and run your java code.

But I got this:

#

That was to make sure Java is enabled.

#

That may be too new of a version of Java - or not new enough?

#

I'm on the latest version, so maybe something in the Java Control Panel?

proud lion
#

Hello! I am having trouble with my Adafruit Data Logger Shield. I've got it connected to an Adafruit Metro ESP32-S2 and I've been able to set up the Real Time Clock. My problem is with checking the SD card. The data logger shield tutorial says to use the CardInfo example sketch in the SD library under the ArduinoTestSuite, but my Arduino IDE 1.8.19 does not display the TestSuite. I downloaded the SD library from github and copy/pasted the CardInfo sketch, but I just get the "Sd2Card does not name a type" error. I've tried using the SD_Test example from the Adafruit Metro ESP32-S2 examples, but the Serial Monitor is just blank. Any ideas of how to fix this?

elfin thorn
#

Does anyone have a very large hammer? I've heard those work wonders!

pallid eagle
#

Can this RFID/NFC https://www.adafruit.com/product/4701 read other tags? The guide says that it can write them so that a phone can detect them but nothing about reading them. I was given one of these as a freebie from Adafruit a year or two ago because I spent a certain amount of money.

solemn cliff
pallid eagle
solemn cliff
#

ah it can read from a phone, but I assume not other tags ?

According to the datasheet, one can even use it as an 'I2C to RFID' transfer system to wirelessly send and receive data from mobile devices (you'll need to write a custom app for that kind of project, though).

#

maybe ST has demo code for that

pallid eagle
#

I mean the actual datasheet

solemn cliff
#

that seems to describe interactions with a terminal

pallid eagle
solemn cliff
#

it has a memory that can be read or written to by both I2C or the phone, allowing for bidirectional communication and data transfer

pallid eagle
#

I’m not planning on using a phone to write it

#

I’m planning on having a small tag that it detects and does something based on getting an input

#

Like an led will turn on when a rfid/nfc tag is nearby

solemn cliff
#

it's a tag not a terminal, that would require completely different electronics

pallid eagle
#

So it can’t sense?

solemn cliff
#

(just a couple trouple of examples)

grim bane
#

Hey all, I'm trying to get this rfm9x LoRa module working on an arduino nano following this tutorial https://learn.adafruit.com/adafruit-rfm69hcw-and-rfm96-rfm95-rfm98-lora-packet-padio-breakouts/arduino-wiring
However it's failing to even initialize. The pins are correct to my understanding and the Nano itself works. The wiring goes as follows from rfm9x -> nano:
vin -> 5v
gnd -> gnd
en ->
g0 -> digital 3
sck -> digital 13
miso ->digital 12
mosi -> digital 11
cs -> digital 4
rst -> digital 2

Adafruit Learning System

Radio transceiver modules for long distance data communication

#

does anyone know where I might start as far as debugging?

grim bane
#

have also tried with a mega and no luck

north stream
#

It looks like you're trying to use RFM6x code with an RFM9x board

grim bane
#

@north stream thank you, for some reason I thought you could just interchange them. Used their rf9x tx and rx and it seems to be working

pine bramble
#

can I get the code to make a neopixel blink with millis?

livid osprey
#

Are you trying to bitbang Neopixel data with timers, or is this something else?

pine bramble
#

for example 250 millis

#

I was previously using delay() but I quickly discovered its drawbacks

livid osprey
#

Ahhhh, I see.

#
unsigned long previousMS = millis();
unsigned long currentMS = 0;
bool pixelState = false;
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);

void blinkPixel(int blinkMSec){
  currentMS = millis();
  if (currentMS - previousMS > blinkMSec) {
    previousMS = currentMS;
    pixelState = !pixelState;
    strip.setPixelColor(0, 0, (255*pixelState), 0);
    strip.show();
  }
}
#

@pine bramble this is untested code thrown together in less than 10 minutes, but that should outline the basic framework of a function that controls a single neopixel to blink on and off every blinkMSec milliseconds. Assuming I didn't make any silly errors, you should be able to call blinkPixel(mSec); in your void loop() to switch the neopixel on and off at the specified rate.

pine bramble
#

Thanks @livid osprey

#

i'll be sure to test it and post the results here!

rough torrent
#

blinkWithoutDelay is also a good example - just switch out digitalWrite with the neopixel stuff

noble oxide
#

Anybody else have any issues getting the Arduino Nano RP2040 connect pass the adafruit circuitpython wifi connect test?

steep vapor
#

So I have been killing what feels like a lot boards trying to connect I2C touch pads (all different types of board). My latest 15 minutes ago was a Teensy 4.1. Can someone tell me how I made it smoke? Those are 4.7 k ohm resistors, I checked with a multi meter. That code was example code for the touch pad, the only thing I changed was add wire.h since it was a teensy 4.1 rather then the 3.2 that was expected. It powered on fine without issue, and only destroyed itself after I uploaded the code.

safe shell
#

@noble oxide what result are you seeing? what NINA firmware is on the board?

noble oxide
#

i'll drop the errors here in one sec...

#

IP lookup adafruit.com: 104.20.38.240 Fetching text from http://wifitest.adafruit.com/testwifi/index.html Traceback (most recent call last): File "code.py", line 59, in <module> File "adafruit_requests.py", line 847, in get File "adafruit_requests.py", line 719, in request File "adafruit_requests.py", line 210, in __init__ File "adafruit_requests.py", line 297, in _readto File "adafruit_requests.py", line 241, in _recv_into TypeError: function takes 2 positional arguments but 3 were given

safe shell
#

I believe that's due to a short-lived bug in the ESP32SPI library, what date of bundle are you using for the libraries?

noble oxide
#

it came with a project bundle but i can try to drag that library out and put another in from the 7.1 library i have on my machine

safe shell
#

if that is the cause, you'll want the ESP32SPI library from 6 days or so ago, or the latest on the github library page (not yet in the bundle)

noble oxide
#

nod

noble oxide
safe shell
#

yeah, I think the one you don't want is 3.6.0

#

so.. latest or 3.5.14

#

(latest should go into the bundle overnight)

noble oxide
#

oh thank you

#

i am yet to familiarize myself with how to download a library directly from github

#

(noob game strong)

safe shell
#

btw, what's on line 59 of the code (making sure this isn't a detour)?

#

looks like r = requests.get(TEXT_URL)

noble oxide
#

it is indeed r = requests.get(TEXT_URL)

noble oxide
safe shell
#

that fixed it?

noble oxide
#

Yep.

safe shell
#

cool

#

(just a little nugget to put in your back pocket... if you have trouble with any HTTPS sites and the NINA firmware isn't at least 1.4.6 , you'll want to upgrade that firmware as additional root certificates were added)

noble oxide
#

how does one check the NINA firmware version?

safe shell
#

lemme check, I haven't done it in a while in Arduino...

noble oxide
#

ya don't stress yourself though!

safe shell
noble oxide
#

thanks a ton i appreciate it

safe shell
#

(basically WiFi.firmwareVersion();)

noble oxide
#

i've never run it in arduino just got CP on it

#

although i did download the arduino uf2 in case i want to work on it outside of Mu / aside from CP

#

so that may happen either way

safe shell
#

esp.firmware_version in CP (assuming esp = adafruit_esp32spi.ESP_SPIcontrol(spi, esp32_cs, esp32_ready, esp32_reset, debug=False) blah blah blah)

pine bramble
livid osprey
#

There is no void setup or loop, or any imports in my sample block haha

lapis meteor
#

hey

#

am i supposed to treat A0 A1 A2 as normal pins?

north stream
#

They're analog input pins, so you can do analogRead() on them. However, you can also use them as digital pins like the others with pinMode(), digitalRead(), and digitalWrite().

lapis meteor
#

alright

#
#include "SevSeg.h"
SevSeg sevseg;

const int  buttonPin = 10;    // the pin that the pushbutton is attached to
int buttonState = 0;          // current state of the button
int lastButtonState = LOW;    // previous state of the button
int buttonPushCounter = 0;    // counter for the number of button presses
long counter = 0;


void setup(){
  byte numDigits = 1;
  byte digitPins[] = {};
  byte segmentPins[] = {6, 5, 2 , 3, 4 , 7, 8, 9};
  bool resistorsOnSegments = true; 

  byte hardwareConfig = COMMON_CATHODE;
  sevseg.begin(hardwareConfig, numDigits, digitPins, segmentPins, resistorsOnSegments);
  sevseg.setBrightness(90);

  pinMode(buttonPin, INPUT_PULLUP);
  Serial.begin(9600);
  lastButtonState = LOW;
}

void loop(){
  buttonState = digitalRead(buttonPin);
  if(buttonState == HIGH){
    buttonState = LOW;
    }

  else{
   buttonState = HIGH;
  }
  int i = 0;
  while (buttonState == HIGH){
    if (i>9){
      i = 0;
    }
    i++;
    sevseg.setNumber(i);
        delay(1000);
        sevseg.refreshDisplay();
  }
}```
when i click the button first time it starts but it doesn't stops when i click the button again
north stream
#

I think you can simplify your buttonstate logic. You may also need some debouncing.

lapis meteor
#

whats debouncing

stable forge
stuck trout
livid osprey
#

Which board started releasing the magic smoke? was it the Teensy or the other circular guy?

safe shell
stuck trout
safe shell
#

I haven't done it, but if the libraries support each board, it should b fine

cedar mountain
# lapis meteor whats debouncing

When a mechanical switch or button is closed, the electrical contacts can physically "bounce" against each other for a few milliseconds before making full contact, so when reading the value at high speed you might see 0000001010111111111 with an extra 0/1 transition or two before it settles down. "Debouncing" handles this in software with a little filtering, for example making sure that the value is the same for 10ms before it's counted as a true button press.

steep vapor
lapis meteor
#
#include <IRremote.h>
int RECV_PIN = A0;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  irrecv.enableIRIn();
}

void loop() {
  // put your main code here, to run repeatedly:
  if (irrecv.decode(&results)){
    Serial.println(results.value, DEC);
    delay(100);
    irrecv.resume();
  }
}```
#

whats wrong, im getting no error but when i click button in remote i don't see anything in serial monitor

#

that is my IR Receiver & im using same pins

#

also it gets heated up real quick and one pin of ir receiver is slightly bent

cedar mountain
lapis meteor
#

oh?

#

is heating up a bad sign ?

#

one sec ill send pic

cedar mountain
#

Yes, it likely indicates a wiring problem or a broken part.

#

Or a wiring problem that caused a broken part...

lapis meteor
#

o

#

also does my remote needs battery

cedar mountain
lapis meteor
lapis meteor
cedar mountain
#

Well, look at the back and see if there's a battery door...

lapis meteor
#

i dont think it does

#

it got something which looks like a tray

#

my ir receiver

cedar mountain
#

Possibly it uses a coin cell instead of cylindrical batteries.

lapis meteor
#

hmmmmm

#

is my receiver alright?

#

well i just took the tray out its super weird & i dont think any battery can go innit

cedar mountain
lapis meteor
#

oo

untold zenith
#

Those types of remotes almost always take a coin cell

lapis meteor
#

oh

untold zenith
#

I’ve seen several of them.

lapis meteor
#

what are coin cells

#

like put in real coins?

untold zenith
lapis meteor
#

oh

untold zenith
#

One of these, for example

#

Although there are several types of coin cells.

lapis meteor
#

the tray is too big for it if ur talking about the tiny cells

untold zenith
#

The CR1225, the way more common CR2032

#

I’m sure the remote could tell you

lapis meteor
#

it got no manual

untold zenith
#

Those remotes almost all take a CR2025 coin cell battery.

#

Something like these

#

You can buy them in packs online

lapis meteor
#

wait can i use any remote? and whenever i click with any remote the ir receiver will detect it?

untold zenith
#

As long as the receiver is plugged in correctly, and that your remote has an IR transmitter in it, yes.

lapis meteor
#

wait yes it takes cr2025 its written small

untold zenith
#

Almost all remotes do have IR transmitters, unless you’re talking about roku remotes or something like that

lapis meteor
#

i see

untold zenith
#

Some of the newer roku remotes are Bluetooth or something like that

lapis meteor
#

o

#

k now i got a different remote imma try

untold zenith
#

But yes, 99% of remotes that you Point at the ir receiver should give you an output in the serial monitor, as long as the receiver is wired correctly

#

I took an ir receiver out of a toy and used it with my Arduino

lapis meteor
#

also my ir receiver has a very small brown mark

untold zenith
#

That’s not very good

lapis meteor
#

oh

untold zenith
#

I wonder why

lapis meteor
#

cuz it got bent?

untold zenith
#

It could be either rust on the terminals, or more likely a burn mark

#

You did say it got quite hot

lapis meteor
#

yes it did

#

k imma test it with working remote

#

well it ain't working

#

and it gets hot like super fast

#

btw im connecting the ir with jumper wires

quartz furnace
#

Getting confused with the difference between the ESP32 and ESP32-S2… with Arduino is it possible to connect to wifi and then go into a Lower power state but keep the wifi connection?

My project is just a PIR sending an email on trigger

I already have it sending an email just fine .. I’m just looking to make it last on a battery as long as possible

#

Light sleep would pause the code … do I want to do a wake up on pin interrupt?

stable forge
#

you can do deep sleep and then reestablish wifi - that is the most power efficient way

#

ESP32 does not have native USB - the USB connection is a serial converter. There are many other differences too. The ESP nomenclature is confusing

quartz furnace
#

Ahhh .. thanks for the info .. let me add more clarification… we have car break ins in my community and was hoping to have the wifi hold for even faster notification

#

Deep sleep might have to be the answer.. TY

untold zenith
#

The IR transmitters are just special LEDs, and those can get hot without proper resistors hooked in with them to limit the current.

#

IR receivers however, can be hooked up to an Arduino with no resistance whatsoever.

#

Provided you have the proper voltage going into them, I see no reason for your receiver to be getting as hot as it is.

cedar mountain
#

A transmitter would generally just be two pins, I think, so having three is a good sign he does have a receiver.

ocean sundial
#

Hi everyone! Had a question regarding level shifting on a W25Q64 flash chip on a breakout board with an Arduino Nano. I found this tutorial on adafruit https://learn.adafruit.com/trinket-audio-player/loading-sounds that does essentially what I want to do on a similar flash chip (Winbond 25Q80BV instead of W25Q64) but to my understanding based on their datasheets, they're both electrically equivalent. However, I noticed that the DO (MISO) pin (data from flash into the MCU) does not need level shifting. In fact the tutorial states: "Also, note that the data output line back into the Arduino (pin 12, blue wire) connects directly, there are no resistors on this line." My question is - why doesn't DO need the level shifting? In the datasheet the electrical characteristics state that the voltage applied to any pin must be from -0.6 to VCC + 0.4 so I'm a little confused on that. Would it be okay to not add a voltage divider on my flash on the DO pin? Thank you!

Adafruit Learning System

Adafruit Trinket is the talk of the town. Now it can talk back!

cedar mountain
ocean sundial
# cedar mountain If I'm understanding you correctly, the DO line is going from a 3.3V flash into ...

Yes! That's correct. The flash is 3.3V and the Nano 5V. I thought all the pins on the flash chip needed to be level shifted based on what I saw on the datasheet. I also thought MISO would be working on 5V as well instead of 3.3V from flash. This is my first time doing level shifting on an SPI device using a voltage divider and not a breakout board with ICs so I got a bit confused. Thank you for your response! I really appreciate it

livid osprey
steep vapor
#

I checked and the touch pad barely draws any power. Well under 250 mA. It only draws 3 mA

pallid grail
#

@leaden walrus I'm back with another pins_arduino.h question. ItsyBitsy RP2040 this time.

pallid grail
#

@leaden walrus There's two WIREs defined. But I don't see two I2C options on the board. I know you told me defining things in that file does not imply their existence. But I'm worried I'm missing something.

#

Also I don't know how to associate these defines with the appropriate pins. What does the (#u) mean to begin with?

leaden walrus
#

the u suffix just specifies type, the parans are there as part of cpp lore (i forget the nuance why for that)

stable forge
# steep vapor Does that help?

I don't see anything wrong with your wiring. Did you smell burning? I'd suggest soldering some headers on the board and soldering jumper wires on the touchpad, so you can wire it up more easily

leaden walrus
#

this bit me on the feather rp2040 the other day

pallid grail
leaden walrus
#

that core doesn't allow remapping, so the GPxx pins are what they are

pallid grail
#

Right. That I did know.

leaden walrus
#

i.e. in arduino, you'd use the GPxx numbers (bottom silk)

pallid grail
#

Yah

#

Or look at the PrettyPins for the GPIOx number if it's not on the board (it is on Itsy)

leaden walrus
#

was actually going to ping you about that on the feather - like add a warning or something to guide. but may be part of larger still-updating-guides-for-arduino effort?

pallid grail
#

I'm in the middle of adding Arduino templates to RP2040 guides.

steep vapor
#

I saw the smoke and hear a crackelling

pallid grail
#

Feather is third. In the arbitrary list I created.

#

Well fourth. KB2040 is done.

#

Working on Isty, then QT Py, then Feather.

leaden walrus
#

ok. so the info will get in there eventually.

pallid grail
#

There's a section that explains using the GP numbers

#

yeah

#

Paragraph anyway. Not its own section.

leaden walrus
#

you can generally turn the (24u) syntax into just 24 which then corresponds to GPIO24

pallid grail
leaden walrus
#

there's the two i2c locations

pallid grail
#

And if that's the case, then the SCL/SDA printed pins are WIRE1 which doesn't make sense.

#

Oof ok.

#

So that's accurate.

leaden walrus
#

that's another feature of the core

#

any SCL1/SDA1 pins are Wire1

#

no way to make them Wire

pallid grail
#

Right.... but this is SCL/SDA, shouldn't they be WIRE0

leaden walrus
#

Wire is any SCL0/SDA0 pin

pallid grail
#

oh

#

Hmph.

#

is my response to that.

leaden walrus
#

that general mapping is hard wired somewhere lower in the core

#

feather has the same feature

#

which is confusing - been lots of forum post about it

#

fix is always just change code to use Wire1

pallid grail
#

Well Feather has STEMMA which I thought in some cases was specially SCL1/SDA1, which is what has confused me.

#

QT Py is different.

#

Oof.

#

Ok.

#

I wonder why it was decided to default to WIRE1.

#

Not that it matters. That's what it is now.

leaden walrus
#

i think it goes in the other direction

#

the core was designed so that any use of SCL0/SDA0 pins ends up as Wire and SCL1/SDA1 pins as Wire1

#

then, for any board, pin choices come down to decisions - like which ones are easy to route to STEMMA, etc.

#

and (guessing) that can be higher prior than ensuring STEMMA ends up being Wire vs Wire1

pallid grail
#

Hmm

#

I guess I assumed that, especially on a board without a STEMMA connector, the silk-labeled SCL/SDA would be WIRE0. Incorrectly so.

leaden walrus
#

yep. and unfortunately a source of confusion.

pallid grail
#

Bleh.

#

Alright.

#

Welp, the guide will explain it.

#

If I can manage to get it right for the guide πŸ˜„

leaden walrus
#

yep. that'll help. and at least give us something to link to.

pallid grail
#

Ok. Heading back into guide land. Thanks for your help, @leaden walrus!

leaden walrus
#

np

#

good luck!

pallid grail
#

Thanks!

elfin thorn
#

Bump... Still can't find any way to get it to work...

Well, I followed the instructions for Windows 10:

Windows 10 and Windows 8
In Search, search for and then select: System (Control Panel)
Click the Advanced system settings link.
Click Environment Variables. In the section System Variables find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New.
In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable. Click OK. Close all remaining windows by clicking OK.
Reopen Command prompt window, and run your java code.

But I got an error.

#

Hi y'all!

I'm trying to run img2code on my Windows 10 laptop. I installed JAVA but when I type the command, "./gradlew" in the command prompt, nothing happens... well, not in the foreground. It seems something happens very quickly in the background but too fast to see what it is.

The ReadMe files on GitHub and in the Zip are useless - unless one is already a JAVA geek. Thanks!

steep vapor
steep vapor
stable forge
#

i don't see how. I can't see your soldering on the bottom, so maybe there are some shorts somewhere. That was why I suggested using headers and jumpers instead, to make the wiring easier to control (and disconnect and check on). If you measure voltages, are things way off?

steep vapor
#

Like I said it's dead as a door nail

stable forge
#

do you no longer see 3.3V on the 3.3V pin?

steep vapor
#

I have another one soldered and ready to go

stable forge
#

if you disconnect it from the touchpad, is it still dead?

steep vapor
stable forge
#

can you see which component burned?

#

so no 3.3V?

#

i will be afk for a while in a couple of minutes

steep vapor
#

This is the good board so nothing's burnt, but I know the thing besides 3.3 volts went

#

But I don't know if anything else went

stable forge
#

take a picture of the other side

#

if there was a short on the touchpad, it might take the regulator with it, though usually the regulators have short protection. or something got reverse voltage somewhere. burning means there was some high current somewhere

steep vapor
#

There I just fished the dead board out of the garbage

stable forge
#

my guess is that ground and 3v got shorted, but I don't know how

#

maybe put headers on the new board and cut some jumpers and solder to the touchpad, and use a breadboard

#

ok gotta go

steep vapor
#

Ok thanks

stable forge
#

you may have just fried a trace with the high current

steep vapor
#

I plugged in the second Teensy 4.1 after testing everything with a multi meter and this one worked..

summer bone
#

I am getting 0 RTD resistance from MAX31865. this issue occurs randomly and continuous(if issue occurs is will be gone continues about 20-30 data) about 2% (tested 10000 data). Could you please suggest any reason and solution for this.

cedar mountain
pine bramble
#

how do I store the last reading from a sensor in a different variable

#

like for example

#
3.67
4.53
#

I want to save 3.67 in a different variable maybe previousvel

#

and then the cycle will continue so I get a new value and then 4.53 is saved in previousvel

livid osprey
#
previousvel = currvel;
currvel = getValue();
#

Assuming variables are already defined, and getValue() is the placeholder function to acquire a new value

#

@pine bramble

pine bramble
#

ok

pine bramble
livid osprey
#

Can you upload your code?

#

Or at least share any relevant portions for debugging?

pine bramble
#

ok

#
#include "BMI088.h"

Bmi088Accel accel(Wire,0x18);
/* gyro object */
Bmi088Gyro gyro(Wire,0x68);

void setup() {
  // put your setup code here, to run once:
  accel.begin();
  gyro.begin();

}

float previousvel;
float currvel;
void loop() {
  // put your main code here, to run repeatedly:
  accel.readSensor();
  /* read the gyro */
  gyro.readSensor();

  previousvel = currvel;
  currvel = accel.getAccelZ_mss();

  Serial.print("Previous Value: ");
  Serial.println(previousvel);
  Serial.print("Current Value: ");
  Serial.println(currvel);
  
}```
#

this is the code