#help-with-arduino

1 messages · Page 55 of 1

cyan jasper
#

since things you do are not in ISR it retriggers and goes into ISR too

#

PIC side has solution for this you manually clear the interrupt flag but AVR automatically clears so things like that happen

#

you can disable global interrupts (was it cei()) at the start of function pointer and enable again in the end

#

If its not absolutely timing specific (like I2C address match) we use global variables (usually boolean) and do what we supposed to do in looping part

#

with an if or somethign

karmic stream
#

"when its not doing ISR it retriggers" what exactly do you mean with this?

#

I provide a function for testing ISR behavior(withut having to configure it)

#

I doubt that it will be used for stuff like RTOS scheduling, because avr controllers do not support real software interrupt triggering

#

on the other hand I do not understand why function calls from ISRs would cause weird behavior?

#

do function calls enable interrupts :O?

cyan jasper
#

If program is not on isr pointer then isr can retrigger

green sable
#

has anyone put a airlift or bluetooth add on to the NeoTrellis M4 ? It looks liek we only really have I2C available easily. I mean, I coudl cram a whole other arduino in there, but that sounds silly. The other option is use two of the non-M4 Neotrellis boards and chain them.

karmic stream
#

when entering the ISR, cli() is implicitly called, if I'm not mistaken. So an isr should not be triggered again?

#

a subroutine/function call should not enable interrupts, so I do not quite get what you exactly mean :/

#

(I'm a beginner, I'd say, maybe I'm missing some concepts there)

#

this is the weird behavior I meant(atmel studio)

cyan jasper
#

Yeah yeah you're right

#

I'm thinking again

cyan jasper
#

am i understanding this wrong?

#

yeah that was wrong

karmic stream
#

hm, I tested the found interrupts that are instantly triggered after being enabled with the atmel studio simulator also triggers.

#

in that example above you should see some breakpoints for debugging

cyan jasper
#

I didnt start atmel studio

karmic stream
#

hm k 😮 I did a new example to show that found behavior 😄

cyan jasper
#

I start to think there is a interrupt happening with higher priority like reset

karmic stream
cyan jasper
#

but that shouldn't be possible either they should be disabled

karmic stream
#

I defined for every of these interrupts the corresponding ISR

#

all of them are instantly triggered after being enabled

cyan jasper
#

well in the interrupt priority order they should but not repeatedly

#

you said it triggers repeatedly?

#

hmmm actually interesting idea do you ever touch with any of the flag bits

karmic stream
#

well, in the other example they did kind of do a loop

#

all I did in the other example was

cyan jasper
#

are they being cleared properly?

karmic stream
#

enable individual interrupt

#

no, there is nothing being cleared

#

so that might be the reason why

cyan jasper
#

they should automatically but IDK

karmic stream
#

external interrupts for example require clearing the pending bit, otherwise it triggers indefinitly again

cyan jasper
#

maybe since its been called manually it might not

karmic stream
#

enabling the individual interrupt

#

triggers the interrupt instantly

#

as seen in the screenshot

#

triggered interrupt -> calls function pointer -> triggers again cuz not cleared

#

I would guess

cyan jasper
#

yeah thats what i said in first place 🙂

#

what about this does it trigger infinitely too? (without manually triggering

ISR(vect) {
Blink(5, 200);
}```
karmic stream
#

I think the part about them being triggered instantly was unclear to me without the testing just now 😄

#

the code in the screenshot above does triggered infinitely

cyan jasper
#

ohh thats the point dude cpu dumbs program pointer and all the necessary registers into stack and then go into interrupt pointer after interrupt done, takes registers and program pointer from stack and continue on

#

so is it fixed or not

karmic stream
#

my fix would be not to enable interrupts individually if one wants to test the fucntion pointers.

#

and if the person wants to use the interrupts, they would need to configure the interrupt sources anyway

#

as well as clear the pending bit

cyan jasper
#

I'm even more confused than start so ill leave at this point too.

karmic stream
#

x) I will post my minimal example, if you want to take a look at some point.

cyan jasper
#

thanks

#

has anyone put a airlift or bluetooth add on to the NeoTrellis M4 ? It looks liek we only really have I2C available easily. I mean, I coudl cram a whole other arduino in there, but that sounds silly. The other option is use two of the non-M4 Neotrellis boards and chain them.
@green sable I found this in adafruit board tour two pins that can be used for I2C, ADC, or a UART.

#

so they are sort of multiplexed (from what i understand) so you should be able to communicate with HC 05 or something like that

restive acorn
#

Hey, I'm looking to start a project, but am a bit of an Electronics Noob so would like to get a bit of advice before I set off and inevitably blow myself up. So I have a Husky Mini fridge that is connected to the mains (240v). I want to setup an Arduino with LED's on the inside of the fridge connected to the power that is currently connected to the internal light bulb (measured at 240v). The issues I have is what would I need to convert 240v down to LED territory (12v?) and can an Arduino then run off that power, or does it need to be stepped down again? Can that be done with a resistor on the Arduino board? And finally how easy would it be to "waterproof" that enclosure. I feel like because it's in a fridge the heatsink wouldn't be too much of an issue

green sable
#

@restive acorn I'm sure there are any number of small converters that would handle it... I mean small converters for phone charging take mains voltage all the way down to 5v with no issues. These parts are pretty common! Depending on what you want the LED's to do, you coudl even run some "neopixel" style strips right off the same 5v for the arduino.

chrome lion
#

hey guys hope everyone is safe, do you guys know of a arduino input shield? One that can do 8 24V inputs

restive acorn
#

@green sable I want to run about 2.5m of LED's

#

preferably the 144/m RGBW

#

Do you have any recommendations on converters?

cyan jasper
#

@restive acorn If you want just illumination or static color you don't need arduino

restive acorn
#

I thought about that, but what's the point in a project if you can't make it do cool stuff!

cyan jasper
#

efficiency? usability? reliability?

#

function?

#

hey guys hope everyone is safe, do you guys know of a arduino input shield? One that can do 8 24V inputs
@chrome lion here is your common ground 8 times 24V shield

#

made by paint squad with collabration with snipping tool 👌

chrome lion
#

lol ok thanks @cyan jasper

restive acorn
#

Efficiency? If you mean Power Efficiency, the fridge is on 24/7, I doubt the power intake from a LED strip and an Arduino is going to factor
Usability? LED strips with no Ardunio have on/off, So I'd be adding to the usability. Could have a sensor to tell when the door is open or not to change the lights.
Reliability? Yeah you got me there, definitely less reliable. But I could always revert it back to being static LED's.
Function? FUNction

cyan jasper
#

no no like you didn't want lightbulb because inefficient and LEDs for efficiency etc.

#

the lightbulb already senses door and switches 220V

restive acorn
#

The lightbulb is never on at the moment because it's right at the back of "beer" fridge, and incredibly dim anyway

#

It's not a Kitchen Fridge

cyan jasper
#

well be careful with 240V, it's just maybe a bit dangerous for starter thats why i kind of hesitated but have fun I hope you like electronics

restive acorn
#

that's the light on in the back

coral whale
cedar mountain
#

A quick assessment of the situation is "Yep, it sounds like it's fried, get a new one". 😅

north stream
#

The nice thing about some Arduinos is that the chip is socketed and can be replaced.

elder hare
#

stacking 2 12v fans on top of eachother would that give less, equal or more airflow? 😛

north stream
#

Are they blowing the same direction? Are they both running?

potent heart
#

@elder hare You may have intended this as a joke question, but it actually is kind of interesting physics. Have you ever noticed that if you block the air intake on a fan, the fan actually spins faster? Similarly if you put a fan under a vacuum it would spin a lot faster, since it isn't doing any work against the air. If you stack two fans, even though you might say "each one moves X CFM, so together they should still move X CFV" in reality, they are each making the other's job easier, which will allow them to spin faster, move more air, and each one will draw a bit less power than it would by itself. It isn't going to be anything close to twice the airflow, and if you had really overpowered fans which didn't get slowed by the air at all, the effect would go away, but for a typical pair of muffin fans, it really will move more air.

cyan jasper
#

Actually it shouldn't increase flow if there is no static pressure. Which means you can push air through finer filter or can get it to do more loops but no difference of volume or speed.

north stream
#

Soon you get into turbine physics

cyan jasper
#

(there are dual axial server fans for 1u servers works just like this because they are really crammed and pushing air is really hard and as side benefit it is more redundant incase of fail)

#

(they also run different sides with mirrored blades to decrease turbulences)

potent heart
#

No such thing as a situation with no static pressure outside of a vacuum. While there may not be a lot in open air, it's still non-zero. In a typical situation where you are ventilating something there will be a pretty significant amount.

#

(I will agree that in open air it approaches zero, but the usefulness of running a fan is true "open air" is debatable). May need to move this discussion to a bar 😃

#

(and clearly putting the fans next to each other rather than on top of each other will move more air)

tidal sonnet
#

How best to communicate between two esp8266 boards? (not MQTT)

cyan jasper
#

(I will agree that in open air it approaches zero, but the usefulness of running a fan is true "open air" is debatable). May need to move this discussion to a bar 😃
I wasnt disaggrening your point 🙂

#

How best to communicate between two esp8266 boards? (not MQTT)
@tidal sonnet TCP server?

#

I kind of want to say wired but probably not a choice right 👀

tidal sonnet
#

Well I want to do something Wifi

cyan jasper
#

probably tcp then

#

(this might not be correct) its like UART but for WiFi. (It is just my implication because you can bind TCP socket into a communication port)

drifting dock
#

I'm having a bit of trouble with arduino. In my class definition of the header file I have
static constexpr uint8_t NR_MULTIPLEX_BITS = 4;
In my cpp file I put:
constexpr uint8_t Flowerpot::NR_MULTIPLEX_BITS;
But I'm getting redefinition of 'constexpr const uint8_t Flowerpot::NR_MULTIPLEX_BITS'

#

if I remove it from the cpp file I get an undefined reference to error instead

#

how should you actually define it`?

#

oh nvm looks like I actually defined it twice

gilded jay
#

guys
using adafruit ssd1306 library on an adafruit ssd1306 display i2c
I'm trying to dim the screen using this command
display.ssd1306_command(0x81);
display.ssd1306_command(10);
display.ssd1306_command(0xD9);
display.ssd1306_command(1);
can you tell me what is the maximum value for the 0x81 and for the 0xD9?
what is the default value in the library?
I can't find it inside the adafruit's code
can you help me please?

#

please quote me if you answer me

north stream
#

For 0xD9, page 40 just says "This command is used to set the duration of the pre-charge period. The interval is counted in number of DCLK, where RESET equals 2 DCLKs." and doesn't give a range

gilded jay
#

@north stream thanks for the answer. But how can I set a value without a range?

north stream
#

I don't know. I suspect "pre-charge duration" is not a value you'd need to change anyway. 0x81 is described as contrast control, which probably isn't the same as brightness either (I'm guessing you'd set the brightness by adjusting the backlight, but I don't know about that display)

gilded jay
#

@north stream on ssd1306 you have only two values to set the brightness

#

0x81

#

And 0xD9. A low 0xD9 helps lowering the brightness, I tested it, but I don't know the maximum value for this setting. Even the default value used by adafruit's library could be ok for me

#

But I don't see any default value in the adafruit's library

north stream
#

Ah, it's an OLED display, no backlight.

safe shell
#

looks like a boolean to 0x81 for contrast is what the Adafruit Arduino library uses for dim

#

it's either dim (lower contrast) or not, that matches how I see it in my Arduino ssd1306 application

tulip storm
#

Hi, so I'm trying to use the <SoftwareSerial.h> library with the Feather M4 Express. The same code compiles perfectly on my Arduino Uno but on the Feather I get an error saying: C:\Users\pecah\Documents\Arduino\libraries\SoftwareSerial\src\SoftwareSerial.cpp:45:10: fatal error: util/delay_basic.h: No such file or directory. Any help would be VERY appreciated.

cedar mountain
#

The SoftwareSerial library seems to be AVR-specific rather than cross-architecture. The M4 should have several UARTs, though... any chance you can get away with additional hardware serial ports instead?

tulip storm
#

That would actually be ideal I think, how would I do that? There seems to be only one pair of TX/RX pins on the Feather?

cedar mountain
tulip storm
#

It took me a while to get all of the kinks worked out (I left the room with the motor spinning and the wires got coiled around it and broke a lot of things lmao) but in the end the SERCOM pins worked very well, thank you!

cedar mountain
#

Excellent!

fiery lichen
#

So I’m still having issues with my seesaw boards getting corrupted. They’re work fine for a long time then I’ll power it up again and the board won’t be found. I do have one of the seesaw boards on 3’ of wire. Could this have anything to do with intermittent working/corruption?

raw lynx
#

Hi all, I was trying to have a pattern on my neomatrix that looped until a button was pressed. I have code that kind of works, but the pattern will only play once and then the button will only change the pattern once the previous one has completed. Can anyone help here?

crude cradle
#

Normally I’d say using an interrupt pin for the button, as that will interrupt the main loop and run whatever function you need, but because of how buttons bounce I’ve heard it’s not great to use them with interrupts. I’ve fixed a similar problem by doing my check for a button press in the middle of the loop that would go to the next part of the pattern, and if the button state changed, break out of the loop with “break”

fiery lichen
#

Ok guys I’ve narrowed my issue down on the seesaw breakout. It seems very strange but maybe it’s obvious to someone out there. I’m running a feather M0. One of the seesaw pins I’m using as a simple on/off so I used my volt meter to watch the signal. I’m also making pin 13 blink on the M0 so I know things are running even if the serial port is closed. Seesaw is powered by 3.3v.

When I watch gpio seesaw pin 9, if I DON’T start the serial console, the pin high voltage sits at 2.82v and stays there even though in the code I toggle it high and low. The led blinks so I know it’s running.

If I open the serial terminal on startup, the light blinks and the pin toggles from 3.3v to 0v as expected.

I’ve tested this many times and it only toggles when the aerial terminal is open. What am I forgetting?

The Adafruit page mentions a pull up resistor May be needed when using i2c. If I don’t have those installed, would that explain why the serial terminal would cause it to work?

I’ll send a screenshot of my test code and a video of my testing

#

Running the same seesaw but swapping out the M0 with a 32u4 the pin toggles from 0v to 3.2v as expected whether the serial port is open or not.

Therefor there is something different about the m0. Is this a pull-up resistor issue? 🙂

#

Adafruit learning guide says pulls ups may be required for both M0 and 32u4. Any ideas on why 32u4 works and M0 only works if serial port is open? Sorry for the plethora of posts. Trying to give as much info as I can to try to make it easy for someone to diagnose.

cedar mountain
#

For what it's worth, it doesn't make much sense to me, so I don't have anything useful to offer. But someone's reading your explanation, at least. 😉

fiery lichen
#

Said simply: the seesaw blink example code works with the 32u4 attached no matter what.

If you run the same code using a M0 the example code only works with the serial port open.

At least it wasn’t me wiring something incorrectly. These are the darn nuances that keep me up at night 🙂

glacial sand
wind drift
#

Is there a reason why some HX711 modules use a metal shield/cover while others don't?

cyan jasper
#

Probably just noise reduction

median axle
#

heloo

#

anyone know how to program arduino using visual studio code

somber scarab
#

Hi everyone, I am very much a NOOB and trying to get my Feather Hazzah to work let alone do anything. Ha ha. After searching the internet on how to connect my Hazzar to the Arduino IDE I found I needed to download a driver which I did from Adafruit. Problem is no matter how I try, I can not get my desk top or my laptop to recognise the drive to show up in Device Manager. So consequently Arduino IDE doesn't allow PORT to work!!! Can anyone HELP !!!!!

pine bramble
#

@fiery lichen The first thing that comes to mind: you have to decide if you're using the serial port, or not.

#

Your code works, unmodified, because you are using the serial port.

#

I'd guess that the code halts because it can't talk to the Serial Monitor, because you didn't open it.

#

You can make this explicit in the code, but you will need some other way to notify you that the serial port never started. ;)

somber scarab
#

Does the Hazzah have to be connected to the pc for the driver to show up on the computer as a start point? I'm thinking it shouldn't make any difference. BUT if that is the case maybe I just have a faulty Hazzar???

pine bramble
#

@somber scarab They're never faulty, pretty much.

#

The Huzzah uses Silabs CP2104 as the programming interface. That's the driver the host PC talks to the Huzzah target, with.

#

Since this chip is used in a lot of places, chances are very good the host PC already supports it.

#

So the problem devolves into recognizing CP2104 on the host PC.

#

(The host PC has 'no idea' the that the CP2104 is talking to the main chip of the Huzzah, ESP8266).

#

They're all the same chip, and use the same method to talk to the host PC.

#

The CP2104 Friend base page says:

For Linux you won't need a driver. For Windows, it will automatically grab the driver from Windows Update. For Mac OS X you can check out SiLabs driver page for the latest and greatest.

#

(Silabs link there is a 404 Error)

#

Use Software & Tools tab to access them.

#

CP210x VCP Mac OSX Driver v5.3.5 is dated 3/2/2020

#

Windows should self-supervise; Linux already has the driver.

somber scarab
#

I have managed to get the driver to show on the Device Manager (Thank you) 🙂 but showing an orange triangle but says it has latest updates. Silly question and please excuse me being a complete NOOB. The Arduino Uno doesn't need a power supply for it to work on the Arduino IDE. Does the Hazzar need a separate power supply for it to work on the IDE?

pine bramble
#

No need to apologize for inexperience (just let us know your skill level so answers can be tailored to what you know already).

#

As far as I know, just about all USB connectors on target boards power that target (unless there are two of them).

#

I don't have the Huzzah, but plugging in its USB connector would be all I would expect to have to do to power it.

fiery lichen
#

Would this be the same thing as commenting out all the serial commands and the serial.begin?

It’s just confusing because the led blinks which means it’s running the loop code, but it’s not toggling the pin. The code also is running with the serial is open, but the pin toggled correctly.

32u4 I can load the identical code and it will toggle the seesaw pin whether the serial is open or closed. Something is different about M0 vs 32u4 but I’m not sure what. They both run the code differently

I just tested the M0 with only the seesaw hooked up and all serial commands commented out.

The led blinks on and off saying it’s in the loop, but the voltage sits at zero. I’ll post the updated code.

On the breadboard I pulled out the M0 and dropped in a 32u4 without moving any wires, the 32u4 blinks the led and the seesaw toggles no problem wi th serial off.

pine bramble
#

I spotted an error or two and corrected them. ;)

#

As a Forth programer I tend to use a lot more simple functions in C++ than you're maybe used to seeing. ;)

fiery lichen
pine bramble
#

let me look at that. ;)

#

multi_blink missing a curly brace

fiery lichen
#

Ok compiles. Lemme try

pine bramble
#

Updated.

#

I'm doing this all in my head; not tested on hardware or in the IDE. ;)

#

The protected use version (with the #define statements, #ifdef stuff) .. may need some tweaks to get the desired feedback from D13.

fiery lichen
#

Ok so if I run your code on 32u4 or M0, both require serial port open and the pin 9 toggles

pine bramble
#

Keep in mind that code bracketed by #ifdef .. #endif isn't even seen by the C compiler.

The C Preprocessor looks for those directives, and strips out the unwanted code.

fiery lichen
#

If I leave serial port closed it won’t toggle

pine bramble
#

Try the second version.

#

And change the #define at the beginning for no serial port.

fiery lichen
#

Second version? I see rev 7 on github

pine bramble
#

#undef USE_SERIAL should follow the #define (swap the two lines).

#

So you define it, then immediately #undef it ;)

fiery lichen
#

Sorry, I don’t follow. If I want serial off do
Define
Undefine

And if I want it on
Undefine
Define

#

Correct?

#

Ok I did define then undefine

The seesaw board didn’t blink so it never initialized

pine bramble
#

USE_SERIAL means just that.

#

It has to be defined.

#

Otherwise the C preprocessor won't know about this symbol, and the #ifdef directives will fail (the code following won't be compiled into the program at all).

#

#define followed by #undef is exactly the same as an #undef on its own. ;)

#

The #undef just makes this explicit: the symbol is not defined, even if it was, previously.

#

You can manually strip out everything to the exact same ends; using the #define or #undef is a convenience feature.

fiery lichen
#

Ok so I went back to my code jusy to be sure things are still working. Code runs, initialized the seesaw and the pin 9 toggles. Now back to your code

pine bramble
#

Remember that any Serial.println("foo"); requires the Serial Monitor (or equivalent).

fiery lichen
#

Well that’s the thing...

#

I’ve commented everything out regarding serial commands. This code blinks the led, initializes the seesaw but the pin 9 does not toggle

pine bramble
#

The i2c address has to be right.

fiery lichen
#

We have the same address 0x4c

pine bramble
#

So that 0x4c worked in some other use case, right?

fiery lichen
#

Worked on all my code

pine bramble
#

I'm a bit surprised it's required at all.

#

But it should of course continue to work.

#

I have to look at the SeeSaw module example to see how they want to initialize GPIO on the ATSAMD09.

#

It's the pinMode and that's already good,.

fiery lichen
#

Using serial window for both of these tests using my basic code, if you don’t leave the ELSE command in, the pin will not toggle. With the ELSE left in, it toggles with the serial window open. Not sure if that’s a clue

#

Video hopefully shows that

pine bramble
#

The else thing basically says 0x4c is a fiction.

#

Remove 0x4c reference. ;)

fiery lichen
#

but I need the 0x4C because that's the address for this i2c chip

#

it's not the default

pine bramble
#

What chip?

fiery lichen
#

The seesaw board

#

it has 4 i2c address options

#

this one I have set to 0x4C

pine bramble
#

You think you have it set to 0x4c ;) would be my guess, there.

#

Try all four variations. If none succeed, that's important to know.

#

Try a fifth (entirely fictional) address as well.

fiery lichen
#

removing the address gives ERROR. 0x4C properly starts teh seesaw board

pine bramble
#

Hmm. ;)

fiery lichen
#

What's different between a 32U4 and a M0 where the 32u4 runs the code whether the serial window is open or not but the m0 runs the exact same code but only toggles the seesaw pin if the serial windwo is open

#

I admit I'm not super well versed in this stuff, but is it possible it's a compatibility bug with the seesaw and the m0?

pine bramble
#

Doubless the SeeSaw was tested against the M0 but not against the (much much earlier) 32u4.

fiery lichen
#

People always tell me to move to the faster chips. Seems like the 32U4 always works for me, but I always run into sticky stuff like this on the newer ones. I must be getting old lol

pine bramble
#

SeeSaw (ATSAMD09) talks via SDA and SCL to the host microcontroller.

fiery lichen
#

Right, the wiring is exactly the same for both boards

pine bramble
#

Oh I wish I had 32u4 experience, but I was disinterested at the time (I was still on 8051).

#

Any serial port issue is entirely orthogonal to any i2c issue. ;)

#

Sounds to me like the 32u4 board support fails over differently than the M0 board support.

fiery lichen
#

Well it fails correctly then 🙂

pine bramble
#

I would say the M0 protects you from your assumptions. ;)

#

I ran M0 boards until the M4's came out.

fiery lichen
#

I'm runnning adafruits example code for the digital seesaw pin out and it only works with the serial window open as well.

pine bramble
#

Feather M0 Express is still a very good go-to board.

fiery lichen
#

I'd love to use it! But it ain't working for me 🙂

pine bramble
#

The Serial Monitor shouldn't matter as the dialog happens via i2c.

fiery lichen
#

shouldn't, but I can literally A B A B, where if the window is closed it doesn't work, if the window is open, it works, and back again

pine bramble
#

I understand that, but cause and effect aren't clear.

fiery lichen
#

then we agree 😄

pine bramble
#

For example, the i2c pins on the microcontroller need to be setup.

fiery lichen
#

that happens in the background in the seesaw library I would think

#

because all that background stufff is waaaay over my head

pine bramble
#

I don't remember setting them up explicitly.

fiery lichen
#

ok. Lots of files.

#

Do one of these files say "m0 doesn't work without the serial port open.....we're working on that! Hold tight!" 🙂

#

I'd be frustrated,but at least the 32U4 works for my project. Just wish I knew why the M0 doesn't so I can advance my skillz and learn why its acting differently 😄

pine bramble
#

But it does work. ;)

#

You just have to use the Serial Monitor.

#

I would use the M0, accept the tradeoffs, and use the Serial Monitor, with an eye towards not having to use the Serial Monitor. Pick your battles.

#

I don't think you need to use the Serial Monitor, when the code is corrected.

#

I just don't know what that correction .. is.

#

When I want to 'turnkey' a project I usually leave the serial stuff going, but not required.

#

So I can optionally hook up the USB cable and see the messages, but I don't have to do so.

fiery lichen
#

my project doesn't require serial. The only reason I have the monitor open is because the m0 doesn't toggle the seesaw pins without it

#

🙂

pine bramble
#

Right, understood.

fiery lichen
#

well, if anything comes to anyone, let me know. I can use the 32U4 without the serial monitor to make it work, but I feel like I'm in the stone age. But hey, the wheel worked in the stone age right?:)

pine bramble
#

I think the stone age was wheel-less.

fiery lichen
#

Fred flintstone had a car.....

#

it was pedal powered, but it rolled, my friend! 😄

pine bramble
#

while (!Serial);

fiery lichen
#

while (!serial) keeps it looping waiting for a serial window.....

pine bramble
#

That waits forever for the Serial Monitor.

fiery lichen
#

right, but thtat's not in any of the code

#

The loop code is running with the serial closed because the LED is blinking, I set that on and off in the loop. The seesaw toggle is not working in the loop, but it does initialize correclty

pine bramble
#

The ss.pinMode(foo,bar) needs to run once.

#

That sets up the pin mode to OUTPUT on the ATSAMD09 SeeSaw module itself. it's an i2c command given to the SeeSaw module from the host micro (32u4 or M0).

fiery lichen
#

correct, that's in my code as well

pine bramble
#

if(!ss.begin(0x4C)){
That can be used to test for success. It presently tests for failure.

#
void foo(void) {
  if (ss.begin(0x4c)) {
      bar();
  }
}
#

@fiery lichen Does it work when you only do the Serial.begin and no Serial.print? Then it's probably something being set by the begin function that the M0 needs for I2C later. I've had the same sort of problem a while ago, can't really remember what board I was using.

#

The order in which things were setup may make a difference.

fiery lichen
#

Translate?

#

Looks like, if there's no serial terminal, wait 44ms....

#

if ss.begin, then print seesaw started

pine bramble
#

It'll just loop with a delay of 44 ms.

fiery lichen
#

buuuuut, I want it to run whne there's no serial

pine bramble
#

Other than the unusual address 0x4c there just isn't anything interesting going on with that project you have, making this complicated.

#

The while (!Serial) waits for Serial Monitor to connect, so that you don't miss the first messages printed.

#

If you omit it, the program assumes a connection has been made, and begins printing to the Serial Monitor.

#

If the Serial Monitor was never started, in Linux, this isn't an issue. Things will work the same as if it was started, anway (you just don't see the messages).

#

Your D13 blink and the Pin 9 (ATSAMD09) blink tell you if your program is running, irrespective of serial print statements and the like.

#

If you omit every single reference to the Serial port, that makes things explicit.

#

Then your program runs with no reference to the Serial system at all, just i2c.

#

🌤️

fiery lichen
#

Ok I’ve made it stupidly simple now to try to narrow it down. Here come some images

pine bramble
#

;)

fiery lichen
#

No seesaw initialization. Led blinks. Good. M0 is working. Next:

#

Add the seesaw initialization. No blinking so it doesn’t go to the loop

#

It won’t initialize without some sort of serial command it seems

pine bramble
#

And with just the Serial.begin before the ss.begin?

fiery lichen
#

No blinky blinky

pine bramble
#

Hmm...

#

It's always possible you need to Serial.begin() but that's also illogical.

fiery lichen
#

Adding the else serial.println(“seeesae solenoid started”) causes it to go into the loop and blink the led on the micro

pine bramble
#

There could be a broken lib somewhere.

fiery lichen
#

And that’s where I got to at about 2am last night lol

pine bramble
#

The Serial.println("foo"); may be harmless (it'll print whether you monitor or not).

fiery lichen
#

Right. And that works for the 32u4.

BUT on the M0 the monitor MUST be open or the see saw doesn’t toggle the pin

#

32u4 the pin toggles

#

That’s why I’m thinking there’s something broken on the backend. The Adafruit example code doesn’t work unless the serial is open for the M0, it works perfectly if you use a 32u4

pine bramble
#

Try Serial1 instead of Serial.

fiery lichen
#

So just change to serial1.begin(9600)?

pine bramble
#

I don't think it has any means of sensing if TX and RX are connected to anything external.

#

Yeah it sounds like a workaround for now, to help in putting this on the back burner.

#

Just be consistent .. change all references.

fiery lichen
#

Lemme check

pine bramble
#

So every single Serial. is replaced by Serial1. in your code. All of them.

fiery lichen
#

Ok

#

But also the serial begin becomes serial1

pine bramble
#

That'll cause it to try to talk on the USART.

#

Serial and Serial1 are two different SERCOM's.

#

Serial refers to the USB port and Serial1 refers to the USART (the TX/RX pair).

fiery lichen
#

HOLY CRAP ON A CRACKER! IT WORKS!!!

pine bramble
#

Haha.

#

I thought it might.

#

Can you post the code?

fiery lichen
#

The one that works?

#

With serial1

pine bramble
#

Yes please

fiery lichen
#

You want a screen shot or you want me to copy and paste the code right in here?

pine bramble
#

Screen shot is ok

fiery lichen
pine bramble
#

But now you still have the Serial connection.... didn't you want to do without it?

fiery lichen
#

I want the program to run without opening a serial terminal window

#

The only way the seesaw toggles before was if the serial window was open

#

I couldn’t, say, power the board from usb without a terminal or from a wall adapter

pine bramble
#

Ah yes

#

It's still weird you need this, probably some timer setting.

fiery lichen
#

32u4 worked fine with plain old serial instead of serial1.....M0 has something funky going on

#

But that’s way above my smarts 🙂

#

Can we all just agree to blame noe and Pedro? :);)

pine bramble
#

I'm glad you got it working, I'll keep this in mind for my Feathers

fiery lichen
#

In case you guys were wondering why any of this was important......

pine bramble
#

;)

fiery lichen
#

Getting kids at maker faires interested in animatronics 🙂

pine bramble
#

Wow, that is so cool! 👍

#

I still have some animatronics ideas that I should turn into projects some day, this gets me excited again!

fiery lichen
#

It’s a labor of love and lots of fun.....except when you hit a serial port road block that makes no sense lol 🙂

#

Wife asked me “you look distraught and you’re awfully quiet tonight. Did I do something wrong?”

“No. Seesaw I2c won’t communicate the way it should and I don’t know how to fix it....”

wife goes and pours wine

pine bramble
#

🤣

#

Unless you want to upgrade to Wife 2.0 it might be time to put the i2c project away for an hour. ;)

fiery lichen
#

Oh I make time for her. Last night was bourbon and 90 day fiancee. Lol. Happy wife happy life

flint smelt
#

I can't get the Feather STM32F405 to render anything on the 2.4" TFT FeatherWing

#

I don't think ARDUINO_STM32_FEATHER actually gets defined

#

STM32F405xx gets defined. Using the graphictest_featherwing in the defines, I added STM32F405xx to the "Anything else!" section

pine bramble
flint smelt
#

Good catch!

pine bramble
#
  #ifdef FEATHER_F405
  #warning FEATHER_F405 was defined
  #endif
#

That construct may work to accurately detect and report defined symbols (at compile time).

flint smelt
#

Is TX/RX really on Serial3? I can't seem to get my GPS FeatherWing to work.

pine bramble
#

On which target?

flint smelt
#

F405

pine bramble
#

Offhand yeah, probably. Let me look.

flint smelt
#

That's what the Learn guide says, but it's not working

pine bramble
#

PORTC_0 D8_NEOPIX

#

I don't quite have it documented yet. ;)

#

Looks like TX/RX are PORTB_10/PORTB_11 on the schematic.

flint smelt
#

Which seems to be mapped to USART3

pine bramble
#

As far as calling it Serial3.begin(9600); that does seem a stretch. ;)

#

Let me see what I did. ;)

#

I have Serial and Serial1 (for the USART).

#

Haven't worked on this in months, though. That's the branch I have checked out, locally. ;)

#

I decided to abstract the serial on this particular project.

#

SERIAL_LOCAL_C is the symbol used.

#

Basically, my code says the two usual uses of Serial and Serial1 also apply to STM32F405 Express.

#

(the PORTC_ business is why I initially thought 'yeah, serial 3 sounds good')

flint smelt
#

Serial is connected to USB, right?

pine bramble
#

Yeah.

#

I did find USART3 on schematic, marking the line for RX_D0 (aka PB_11).

stark mist
#

hello

I have a more of a general electronics question regarding voltage dividing, my setup is that I have a 5v system that runs of its own 12v power source ( motorcycle ) and I want to take a sensor reading that should be in the range of 0v to 5v (estimated) and input that voltage into an analog pin on the Adafruit Clue, the Clue is powered from its own 3.3v lipo power source,

I setup a voltage divider on the 5v (motorcycle side) using a 10k and 15k resistors, then take output between the resistors and plug it into the Analog pin on the Clue. The ground of the voltage divider goes to the ground of the motorcycle, Although I'm not sure that is correct since it appears the ECU has its own 5v internal regulator to power the sensors.

#

My question is two fold

Firstly the ground from the VD go to the ground used on the sensor or is the motorcycle (-12v Bat) ground just as good?

Secondly the input pin seems to act as though it is floating still although I see it react when I open and close the throttle it is still wildly fluctuating in a similar manner as it does if I disconnect the input to the pin.

Things I've already done to prove the pin is working was to remove the VD setup a Pot the input pin tied to the Clues own +3.3 and -. Measurements here are steady and only fluctuate by a couple of points up or down, not the 100+ I see if the pin is floating. Modifying the Pot generates fairly accurate and repeatable results within the range expected.

Taking a Volt Meter across the motorcycle ground and the sensor output gives me the expected steady and reproducible results output I would expect in the range of 0 to just less than 5v

The proves to me that the pin is fine and the behavior I am seeing is due to my circuit setup between the two different voltage systems.

So I'm missing something perhaps the reference for the ADC cannot operate correctly with the two desperate systems? Or perhaps I need additional components to safely and correctly move the signal between the two.

flint smelt
#

I cannot seem to get the Feather STM32F405 and the GPS FeatherWing to talk to each other to save my life. The GPS module seems to be stuck getting a fix but with my '840 it seems to get a fix relatively instantly. What am I doing wrong here?

mighty vigil
#

can you pastebin the code?

#

@flint smelt

flint smelt
#

I can push it to github but it's a pretty big project that works just fine on the Feather nRF52840

mighty vigil
#

I'm reading online about it. Can you try posting the particularly relevant pieces of code?

On the Adafruit website in mentions something about not having the GPS attached while uploading, but I don't think that's what you're describing.

flint smelt
#

Well for the STM32F405 I actually use a TermBlock FeatherWing to upload since I have to jumper B0 to 3v3

stark mist
#

@stark mist I get the same results if I use a second lipo battery as the input voltage and ground so I think that is the issue is the ground needs to be common both for the input voltage to the divider and the clue

#

I'm not sure how to achieve this

pine bramble
#

GPS puts out NMEA sentences irrespective of acquiring a fix. ;)

#

fades

stark mist
#

@stark mist maybe I do the ADC on the high power side then its just logic level digital transmission on the lowside which is easy to achieve

flint smelt
#

Yes, but the way nothing really seemed to update on the MCU side (always reported 0 satellites) I was assuming that the MCU wasn't getting the NMEA sentences. I am fiddling with a program that only deals with GPS and TFT for fast, clear output of what the MCU knows. I think it might be working...

stark mist
#

you should just be able to dump the bytes from the gps to the debug serial and see the stream of sentences

#

what api are you using to interpret the sentences?

flint smelt
#

TinyGPS++ and I did eventually try that about two hours ago or so

stark mist
#

so with tinygps if you dont wait for encode to return true before extracting data it will always show you bad results

#

if ( tgps.encode(inbyte) ) { extractData(); }

flint smelt
#

Oh really?

stark mist
#

yeah

#

I had a similar face palm moment

flint smelt
#

That's weird, I've never had a problem except with the STM32F405

#

'840 doesn't have any issue with it, the Teensy 3.1 from ~6 years ago worked just fine lol

stark mist
#

well maybe I'm giving you bad info

#

I just checked and I'm using standard tinygps not ++

#

yeah tinygps++ has a different way you have an isUpdated call for the variables

flint smelt
#

There's .isUpdated() and .isValid() to check if it's encoded enough (and .age() to see how long since a good sentence has been decoded)

stark mist
#

my bad

flint smelt
#

Yeah okay, whew!

#

No worries

stark mist
#

so were you getting bytes printed?

#

with valid long lats?

flint smelt
#

Yeah, it looked like normal NMEA sentences

stark mist
#

have you tried validating the checksum manually?

flint smelt
#

If I get anything at all it would be the same data that the '840 gets and parses without issue

stark mist
#

its just an xor crc

#

1 byte

#

should tell you if the sentence is malformed or not

#

what type of serial port are you using the hardware or software?

flint smelt
#

What's REALLY weird is that the Feather nRF52840 gets 4+ satellites WAY faster than the Feather STM32F405 (which should NOT be MCU dependent)

#

Hardware

#

The Feather RX/TX lines

stark mist
#

nope it should not the gps backup battery should maintain a fix

#

so that would be a hardware serial port

#

I had issues running a gps on a software serial port if the baud was too high

#

has it ever got a fix?

#

if you take it outside and leave it a few minutes powered up ?

flint smelt
#

A couple times... it's been running the entire time we've been talking and only found 2 sats

stark mist
#

2 should be enough but I would expect more

flint smelt
#

With the Feather nRF52840 it'll find 7+ sats in < 30 seconds

#

You need 3 or 4 to get location

stark mist
#

so I was having issues with a gps inside couldnt get a fix or reliable satelites, I took it outside for 5 mins brought it back in and it had 6 to 8 and maintained that

#

dont think that is your problem though

#

but worth a try perhaps

#

or stick your antenna out the window

#

I have an active antenna on a long cable I sometimes just run outside if it feels like I have signal issue on the gps side

#

can you plug the gps into a pc via a serial usb connector and use comething like uconnect or what ever manufacturers software to validate ?

flint smelt
#

I can literally just swap MCUs and get better results lol

#

I literally did just that and already have 6 sats

stark mist
#

that does sound odd unless its some kind of signal interference maybe running the antenna away might help

#

if you power up the other feather near it what happens then?

flint smelt
#

I'm not using an external antenna

#

That's a good question

#

Doesn't seem to have any effect

stark mist
#

both feathers use the same voltage levels?

flint smelt
#

Yep, both hooked to the same LiPo

stark mist
#

are you powering the gps through the regulator on the feathers?

flint smelt
#

I assume so, it's a FeatherWing

stark mist
#

that's very strange then sorry I don't really know what else to suggest other than double checking the checksums on the sentences and making sure it isn't some interference trashing the bits on the wire

#

both feathers programmed to run the same baud rate port?

flint smelt
#

Exact same code

stark mist
#

figured but thought Id ask

#

which two feathers and wing are these?

flint smelt
#

Feather nRF52840 Express: https://www.adafruit.com/product/4062 (works great)
Feather STM32F405 Express: https://www.adafruit.com/product/4382 (has issues)
Ultimate GPS FeatherWing: https://www.adafruit.com/product/3133

stark mist
#

at least it has the uFl connector for an external antenna

flint smelt
#

Yeah

stark mist
#

maybe the antenna on the nRF is helping pull down some signal 🤷‍♂️

#

its the only thing I can think off

#

I dont see any thing in their data sheets to suggest the problem you are seeing

#

I'd definitely try taking it outside for a few minutes and see if it helps or get an active antenna on it

flint smelt
#

If my Feather M4 was working I'd try that MCU

stark mist
#

welp I've not managed to solve either of my problems this evening so far... will keep plugging at them

velvet pike
#

Not sure where to post this...but if I have an existing circuit board that attaches to an electronic chessboard setup. Whats the best way to work out what it's sending to the circuit board and then redirect that to an arduino to turn read on a pc?

floral thicket
#

I'm assuming with the Adafruit FTDI friend, I should cut the jumper and make it 5 V logic since I'm using a arduino pro mini 5v, right?

north stream
#

Probably so, yes.

low hornet
#

hmm, i think i miss something very obvious:
My script on a trinketM0 sends some debug output on the usb serial with Serial.print(... and does the real work on the hardware serial via Serial1.write (... and Serial1.readBytesUntil(...
Problem: The script only works if USB(Serial) is connected....
Does this ring a bell to anyone?

north stream
#

It could be that the USB serial implementation blocks if it's not connected

lusty igloo
#

So I've been working on a project for university involving an Arduino Nano 33 IoT for the past few days. Simple thing that connects to Wi-Fi (using the WiFiNINA library), then transmits data via MQTT.

I was nearly done, just fiddling with how a string was printing. Then I hit the RST button on the board. Now the thing doesn't seem capable of connecting to Wi-Fi anymore. What's more, it also seems to just be skipping over the first print statement when it boots.

delay(10); //Connect to WiFi specified in credentials.h Serial.println(); Serial.print("Connecting to: "); Serial.println(ssid); WiFi.begin(ssid, password); //Loops while attempting to connect. Prints out dots to show activity. while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); }

I had never had any issue with Wi-Fi connection while I was developing. Now this is happening the day before I'm supposed to record my demo and I'm sort of freaking out. I've tried using example sketches to connect to Wi-Fi after this and they all seem to be unable to connect too. Any ideas for troubleshooting would be immensely helpful.

#

The "Connecting to: " string is supposed to display at the start and is just skipped over. There's no conditional statement behind it or anything that would prevent it from displaying either.

north stream
#

Might be a delay initializing the serial connection

lusty igloo
#

Makes some sense. I tried adding "delay(5000);" in front of the initial connection and the "Connecting to: " message popped up again.

#

But I have no idea where that came from.

north stream
#

Some folks use a while !serial loop to wait until it's up

lusty igloo
#

The only thing I changed was adding some additional calculations to generate a timestamp in the main loop, but I reverted that immediately when things began acting up.

north stream
#

A bunch of weird stuff can happen

lusty igloo
#

And the fact that the example sketches stopped working is what freaks me out.

#

I sort of assumed that I accidentally deleted something in my code and uploaded a WiFi example sketch to verify, but that doesn't work anymore either.

north stream
#

Could be RF interference, power supply glitch, iffy connection, etc

lusty igloo
#

I doubt interference. Although it's a possibility. The signal is strong where I'm testing and the building has a mesh network.

north stream
#

If the local RF environment has changed (moved, metal nearby, etc ) it can change the transmit power and trigger the other things I mentioned

lusty igloo
#

Hrm...

#

Would a power supply glitch introduce a bizarre delay?

#

That popped up this morning and shouldn't exist anymore, since I immediately reverted the code.

north stream
#

It could have slightly damaged something

lusty igloo
#

Balls.

#

So I should try and test the wireless unit then?

north stream
#

I thought you were already testing the wireless

lusty igloo
#

Sorry, meant the hardware.

#

Try and figure out if the Nano 33 IoT got damaged somehow.

#

I'd hop down to a store and buy a replacement to test against... But COVID.

north stream
#

I wish I had stores like that nearby

lusty igloo
#

I don't but I'd be willing to drive 3 hours to make a school project work, lol

#

But everything's closed and shipping is delayed everywhere.

north stream
#

Yeah, sigh

lusty igloo
#

I think I'll try clearing the Arduino IDE from my computer and re-installing. See if a library got borked or something.

#

Thanks for the help.

low hornet
#

It could be that the USB serial implementation blocks if it's not connected
@north stream Thanks.
No, it finally was a MAX3232 from ebay that was not reliably working on 3v3... now it runs fine on 5V and a 2k2/3k9 divider for the RX Line.

north stream
#

Ah, glad you figured it out, that was a weird one.

stuck crest
#

hello

#

need help with attiny 461a

#

i tried it with arduino as programmer and with a isp programmer

cyan jasper
#

Could you show/describe your connections?

#

And I assume you can see heartbeat, error, or other led lighting up (what I'm trying to say is your arduino as isp sketch working.)

stuck crest
#

the blue led is to control the voltage

cyan jasper
#

cant really see the pins

stuck crest
#

yea my iphone 7 camera is not good

#

wait....

cyan jasper
#

its the angle

#

(BTW im looking at the arduino not the programmer IDK about the programmer and too lazy to find out)

#

its the angle
and if LED wasn't there im sure itd look way beter

cyan jasper
#

hmm do you have any other chip to program?

stuck crest
#

atmel studio

#

But idk how to setup it

cyan jasper
#

no no

#

i mean chip

#

as in another atmega328p

#

or different attiny

stuck crest
#

nope

#

i can use the arduino chip and try it with the isp programmer

cyan jasper
#

uhm try jiggling the connections

#

I was thinking its communication issue and lets see if your gear works before messing around with the chip or attiny core

#

always check the easiest thing before

#

I personally love AVRdudess as gui for avr

#

It has like everything but it seems like not the AVRdude issue (eg. chip id)

stuck crest
#

i test it tomorrow ^^

cyan jasper
#

TBH I dont have any other idea yet. 😐

nocturne vale
#

I lost my passive buzzer, is there any guide to how I could strip down a pair of earbuds and use them instead? I found some super cheap ones laying around that I am ready to disassemble.

nocturne vale
#

ok, so I hooked up the headphones, I am using them as inputs, I am writing to analog inputs on the arduino board. I have the code set to print to the monitor, for some reason, the results are only interesting when I remove the ground. The results on the right are when I make noise, and the ones on the left are for when I try to be quiet

#

or, this could just be random nonsense, and I do not have it hooked up right

rough torrent
#

When you connect the speakers to ground, that makes the voltage 0 so the analog pins read 0

#

When you don't have anything connected to ground or 5v without pull up/down resistors, your Arduino analog pins detect electrical noise around you

#

ok, so I hooked up the headphones, I am using them as inputs, I am writing to analog inputs on the arduino board. I have the code set to print to the monitor, for some reason, the results are only interesting when I remove the ground. The results on the right are when I make noise, and the ones on the left are for when I try to be quiet
@nocturne vale
Do you mean you are using them as input or output? Not clear.

Or maybe I'm too sleepy. IDK

nocturne vale
#

I am trying to use them as inputs.

pine bramble
#

Old 1960's vintage toy two-way radios used their loudspeaker as an audio source as well (as a kind of microphone).

#

You could hear the tone and cadence of the other person's speaking voice, but intelligibility was low.

#

They often also had a morse code key, right on the main face of the walkie-talkie. ;)

nocturne vale
#

I had some of the analog inputs mislabeled in the code, but I have been able to reproduce something. I have this high pitched gear "think those cars you push and they keep going" when I wind it up, I can get a bunch of zeros to print, so I am quite sure its doing something. Thnx @pine bramble

pine bramble
#

;)

nocturne vale
#

ok, that nickname works out better, thnx! I never thought I would use this discord thing, and I was wrong

pine bramble
#

`Using a speaker for a mic works fine but you need a high impendence speaker for it to work well. 63 ohm intercom station speakers work OK.

north stream
#

Even an 8Ω speaker makes a decent mic: the large area gives it good sensitivity. You can use a transformer to raise the output impedance as well.

nocturne vale
#

Yeah, I am not really sure what is going on, but using that flywheel toy is the only way I can get zero's. Either I am shaking the ground or some frequency the flywheel gear toy thing I have is setting it off at just the right sound. I think it is time to try a better mic thnx.

rough torrent
#

Hey, does anyone know what loadConfigurationFile() and saveConfigurationFile() do in Arcada?

I'm trying to use ArduinoJson (The better one that you have to install when installing Arcada) in the same sketch asArcada. I learned that usually the library objects are exposed through the Arcada object (instead of calling FatFileSystemObject.exists(filepath) from AdafruitSPIFlash you would call arcada.exists(filepath), if you get what I'm saying.

So does loadConfigurationFile() and saveConfigurationFile() basically wrap up ArduinoJson functions into an Arcada object?

Oh man, that's going to be hard to understand.

weak walrus
#

Hello! I have a little bit of arduino experience mostly from a hackathon... Now I want to build a small tamagotchi-type app.

#

I want it to be able to connect to the internet so I was thinking of going with the Arduino Uno Rev2 Wifi

#

Are there any LCD screens that are easy to hookup and available y'all might suggest? Does the Uno seem okay for something like this?

#

Sorry I am a really noob

#

Is there something someone might suggest for audio too? 😮

cyan jasper
#

PSU is adequate 10A for 150 chips but still gets better with lower brightness

fossil void
#

Did you connect your grounds? The level shifter should do that, but I've had this exact problem and connecting the Arduino ground to the LED ground fixed it.

pine bramble
#

I’m currently running a metro m0 express, if I want to send bytes over the micro usb serial port to my pc, what is the name of that port for when I define my uart instance?

#

Is there a better channel to ask this on?

fossil void
#

I assume you're programming in CircuitPython? Can you use usb_hid ?

pine bramble
#

Yes circuit python

cyan jasper
#

Did you connect your grounds? The level shifter should do that, but I've had this exact problem and connecting the Arduino ground to the LED ground fixed it.
did not work any other ideas?

fossil void
#

@weak walrus I'd use the ESP8266 or ESP32 for that. Both have extension libraries for the Arduino IDE.

weak walrus
#

Thank you!

fossil void
#

@weak walrus There's a version of the ESP32 with a tiny TFT screen - not sure what your screen size requirements are - but it's called a TTGO T-Display.

#

@cyan jasper If your connection to the LED's is short, you can try not using the level converter at all. The first LED in the string will regen the data to a 5 volt signal, and 3.3 v is usually enough to get the first LED running. Even if it doesn't work, it won't hurt anything.

cyan jasper
#

hmm you imply logic shifter causing timing delays? worth a try

fossil void
#

Not delays.. but might not be working right, or adding noise.. It's a piece of the puzzle, so to speak.

pine bramble
#

Not sure how the usb_hid library would help. Looking for the name of the USB port for the sending pin and receiving pin arguments in uart.

cyan jasper
#

@cyan jasper If your connection to the LED's is short, you can try not using the level converter at all. The first LED in the string will regen the data to a 5 volt signal, and 3.3 v is usually enough to get the first LED running. Even if it doesn't work, it won't hurt anything.
its even worse

fossil void
#

@cyan jasper Ouch.. At this point I'd check voltages, make sure the right pins are selected, the right type of LED selected in the setup... if that all looks good, I'd turn to an oscilloscope, if possible.

cyan jasper
#

scope is not possible yet

#

we gonna try 12V logic (testing before with smaller strip)

fossil void
#

Yeah.. those thing's aren't cheap..

cyan jasper
#

if it goes worse with 3v it should get better with 12v

#

datasheet says 0.8VDD as absolute maximum

#

should work

fossil void
#

Oh.. I didn't ask before.. it doesn't look like you're running high brightness, but that many LEDs could still pull a small power supply down. A good guesstimate is 70 mW per pixel at max prightness.

cyan jasper
#

12V worked

#

Oh.. I didn't ask before.. it doesn't look like you're running high brightness, but that many LEDs could still pull a small power supply down. A good guesstimate is 70 mW per pixel at max prightness.
datasheet says lower like 12mA per pixel

fossil void
#

Yup. sounds like the 5v supply is just a bit under rated.

cyan jasper
#

still very inefficient though

#

the adressable leds

fossil void
#

But I have both large 12v strings and smaller 5 v strings running at the same time.

cyan jasper
#

LEDs are efficient but at the same time its like they hog all the power its weird

fossil void
#

Most times it's the length of the string. Try adding a 5v jumper (Vcc and Ground - not data) to the other end, so both are connected at once.

rough torrent
#

Say I have an Arduino sketch:

void setup() {
  int a = 1;
}

void loop() {
  // Can I access the variable `a` here?
}

Since the variable a is defined in setup(), can you access the variable a in loop()?
My guess is no, but please correct me if I'm wrong.

#

Does Arduino destroy the variable a when setup() exits?

pine bramble
#

No. Scope of variable is the function.

rough torrent
#

So a still takes up memory?

pine bramble
#

I think if you want a to persist you declare it volatile but I am not sure on that point.

rough torrent
#

Well, I don't want a to persist

pine bramble
#

If it's not a global (declared outside any function) then other functions (Besides setup();) can't see the variable.

rough torrent
#

But I don't want a to take up memory

#

Because I'm actully using an ArduinoJSON StaticJsonDocument

pine bramble
#

Prove it to yourself by using :

void blink(void) {
  for (int i=17; i>0; i--) {
    led_on();
    led_off();
  }
}
void Setup(void) {
  for (int i=10; i>0; i--) {
    blink();
  }
}
#

Notice the int part in both ;)

#

One of the reasons we get away with calling so many index variables int i is that their scope is limited.

rough torrent
#

I get that there scope is limited, but does it get destroyed when the function returns?
I'm worried about memory usage

pine bramble
#

I think if it's not declared volatile you cannot expect it to persist.

#

If it is declared volatile I'm also unsure just what happens. ;)

rough torrent
#

IRL I have never used volatile before

pine bramble
#

I'm guessing the volatile int has a permanent home in the memory map.

rough torrent
#

Well, then I should be fine with memory usage

pine bramble
#

I'm a Forth programmer, so I declare a global array of 8 or 16 integers and that's all the memory I work with, for many applications. ;)

rough torrent
#

I'm a horrible Arduino programmer, so I declare about a million variables and I still need more 🤷‍♂️

pine bramble
#

Plus a few other global ints for holding stuff, like an ersatz stack pointer.

#

Horrible is more advanced than 'not a' programmer.

rough torrent
#

That's true

pine bramble
#

"I'm not a programmer .. I'm a talent scout." "I'm not a programmer .. I'm a tree surgeon."

cyan jasper
#

Okay idk if arduino made changes but avr-gcc compiler natively has same scope for both setup and loop.
Edit: They did changed it setup and loop are different scopes.

void main() {
//setup operations
while(true) {
//loop operations
} 
} ```
#

So scope rules should still apply

#

so you can try this

void setup() {
  Serial.begin(9600);
  int k = 8;
  {int a = 5;}
  Serial.println(a);  //compiling this line will give scope error "a" is not declerad into this scope
}

void loop(){
  Serial.println(k);   //this neither compile I just tried it.
}```
#

now i have a question does it work like this that's why they have different scopes?

void setup();
void loop();

void main(){
  setup();
  //maybe some internal support code
  while(true){
    loop();
  }
}```
Or does it have complete new structure for compiler? It doesn't make much sense to edit compiler for this but maybe it's not as much work as I anticipate. 🤔
rough torrent
#

In the book Arduino Cookbook by Michael Margolis, he says this is how it works:

int main(void) {
    init();
    setup();

    for (;;) 
        loop();
    
    return 0;
}
#

So I guess the variables are being destroyed and redefined?

cyan jasper
#

Id assume so

rough torrent
#

Hey, just wondering
Are you familiar with ArduinoJson?
I have a question

cyan jasper
#

Nope

rough torrent
#

so you can try this

void setup() {
  Serial.begin(9600);
  int k = 8;
  {int a = 5;}
  Serial.println(a);  //compiling this line will give scope error "a" is not declerad into this scope
}

void loop(){
  Serial.println(k);   //this neither compile I just tried it.
}```

@cyan jasper wait, you can put {} around statements to make a scope?

cyan jasper
#

Yep

rough torrent
#

Whoa

cyan jasper
#

That's how I destroy my objects 😅

rough torrent
#

😲

#

I'm gonna do it right now

cyan jasper
#

I should learn about jsons just never been a programer person even slacking off my Esp32 projects because programming

rough torrent
#

It's not that hard

#

keyword: not that

#

If you had experience with Python, then its kind of like a list

#

more actually of a dictionary

#

and you can nest objects to make subfields

cyan jasper
#

Id not say I had that kind of experience with python

#

Mostly algebraic stuff

#

And once I tried arduino com but didn't finished

rough torrent
#

It looks like this:

{
   "sensor": "GPS"
   "time": 12834701989
   "data":[
       "boo",
       23425216
   ]
}

NOTE: I pulled this from the internet

#

To get the value of sensor you would write something like this:

json["sensor"] // returns "GPS"
#

Except it hurts my head doing this stuff

cyan jasper
#

What doesn't kill you makes you tougher

rough torrent
#

Then you should try Arduino
Or Python
They're both nice
It won't kill you 😉

gilded jay
#

I have an ESP8266 configured for OTA Upload.
I want to switch from SPIFFS to LittleFS.
Can I do this via OTA?
Can I simply write the same filename with LittleFS over the old SPIFFS one or should I erase the flash first?

If I need to erase the flash first, can I do it via wifi?
Please quote me if you answer me. :)
Thanks

fallen rock
#

Hello, I work on a Arduino Uno with Windows. My computer can't export any program (same thing for Numworks). Can you help me please ?

pine bramble
#

do you mean programming with export? what error message is displayed?

wind drift
#

I am using an Adafruit Feather nRF52840 Express at the moment. Is there a way to let it "sleep" (to save power) and have it wake up when I move it? (I have a MPU-6050 module available)

#

at the moment my circuit uses 20 mA in idle

low hornet
#

I've been programming a Trinket M0 for a while, and for uploading a sketch, i always have to double-press reset, so the red LED pulses.
Now i wonder if i can upload a different firmware so the trinket is always accepting uploads?

cedar mountain
#

@wind drift Yes, it should be possible to have the IMU provide an interrupt signal when moved, which could wake the nRF52840 from various levels of sleep. The hardware ought to be capable of doing that down at the microamp level. It'll depend on what software libraries / platform you're using for how easy that will be to set up, though.

wind drift
#

I use the arduino IDE with that board

cedar mountain
#

Gotcha. I'm not that familiar with the Arduino libraries, I'm afraid. But the capability is theoretically there. 😅

regal monolith
#

How do i get this display to init?

#

``--------------------------------------------------------------------
Lib Configuration: openGLCD ver: 1.0rc3 build: v1.0rc3
Panel Configuration:ks0108-128x64
Pin Configuration:ks0108-Uno

GLCD:ks0108 DisplayWidth:128 DisplayHeight:64
Chips:2 ChipWidth:64 ChipHeight:64
CSEL1:A0(PORTC0) CSEL2:A1(PORTC1)
RES:A5(PORTC5) RW:A2(PORTC2) DI:A3(PORTC3) EN:A4(PORTC4)
D0:8(PORTB0) D1:9(PORTB1) D2:10(PORTB2) D3:11(PORTB3)
D4:4(PORTD4) D5:5(PORTD5) D6:6(PORTD6) D7:7(PORTD7)
Delays: tDDR:320 tAS:140 tDSW:200 tWH:450 tWL:450
ChipSelects:
CHIP0:(A0,0x1, A1,0x0)
CHIP1:(A0,0x0, A1,0x1)
Data mode:
d0-d3:nibble mode-Non-Atomic
d4-d7:nibble mode-Non-Atomic
Backlight: <Not configured>

Diag Loop: 1
Initializing openGLCD
GLCD initialization Failed: RESET wait Timeout (status code: 2)
Test Count: 0 PASSED 1 FAILED

``

#

console output

weak walrus
#

google says its likely miswired

#

is your Vout correct?

north stream
#

Did you edit glcd_Config.h to match your controller board and LCD?

regal monolith
#

Vout is is connected to the wiper pin of the pot as well as the Vo pin

north stream
#

I do see that the wiring diagram given on the product page does not match your software configuration. For example, the reset line on the LCD is shown on the product page as connected to A3, but your printout shows RES:A5(PORTC5)

#

No, strike that, I was looking at the library from the product page, you're using openGLCD, which is the one you want.

regal monolith
north stream
#

Which Arduino pins did you wire CSEL1, CSEL2, and reset to?

regal monolith
#

they are default to A0 and A1 and A5

#

and thats how i connected

north stream
#

Hard to tell from the label too, but looks like you might have a "B" board with BLA and BLK swapped (I think you have it right, however, since the backlight is on)

regal monolith
#

12864B

north stream
#

The silkscreen your board seems to be PSB and NC where CSEL1 and 2 would be. Weird.

flint smelt
#

How do I get rid of the flickering in Adafruit_GFX/Adafruit_ILI9341?

pine bramble
#

I got my CLUE board yesterday, so have been putting everything together for Arduino IDE work. I will also install what ever I need for Circuitpython. Anyway, I can not find Sensor Lab when I go to manage libraries from IDE 1.8.12. What am I missing??

weak walrus
#

Any guesses on why this button won’t register a high state? When I remove it it predictably gives me alternating high/low

weak walrus
reef ravine
#

@weak walrus It may be the button is mounted 90 degrees off such that pressing it isn't actually pulling pin 2 high. You can test without the switch by connecting pin 2 (green? wire) to ground and +5, if that works check the switch wiring.

#

alternately to ground and +5 that is, not both at once

weak walrus
#

Thanks I'll try that

#

So that means the green wire (pin2) to the same row (6) as the ground and resistor?

#

I am not sure what +5 means 😅

reef ravine
#

OK, the 2 rows on the outside edges supply power, ground and 5 volts (+5), where you have the red and blue wires

weak walrus
#

Ah yes!

#

I see what you mean

reef ravine
#

if you connect pin 2 directly to +5 or ground, the program should flip screens

#

when it's not connected (floating) it may toggle by itself

weak walrus
#

Oh snap that totally worked

#

Thank you

reef ravine
#

NP

weak walrus
#

Are there best practices on handling it constantly toggling on its own?

#

I can get it to stay on 0 but not on 1

reef ravine
#

in general, never let an input "float", it must be connected to HIGH (+5) or LOW (ground)

#

can you rotate your push button 90 degrees?

#

one side of the switch is "A" and one is "B", each side is always shorted together, you need to read across "A" and "B"

weak walrus
#

Hmm no then it doesnt fit over the gap in the breadboard

reef ravine
#

ok

#

how about moving the pin 2 wire to the unused pin (closer to the TFT)

safe shell
#

to avoid float, use a pull-up or pull-down resistor, or use pinMode(pin, INPUT_PULLUP)

weak walrus
reef ravine
#

how big is the resistor (what value?)

weak walrus
#

10k

#

omhs

#

ohms

reef ravine
#

@safe shell, to keep the "logic" simple he's using a pull down resistor, and it works if the input is moved from +5 to grd, seems to be switch wiring or the switch itself

#

@weak walrus you always get a 0 because pin 2 is connected thru the 10K to ground, which is correct, pin 2 isn't "seeing" +5 when you close the switch

safe shell
#

@reef ravine Gotcha, I was a little behind when there was no resistor. Those switches should work in any orientation as long as you connect to opposite corners.

weak walrus
#

Ah thanks for explaining

reef ravine
#

@safe shell, thanks didn't want to dig around for one 🙂

weak walrus
#

Which had the Pin2 going to the same leg as the resistor

reef ravine
#

hmm, in that case move the red wire to a hole next to the resistor

weak walrus
#

okay

reef ravine
#

as anecdata said opposite corners connect

weak walrus
#

Same results with consistent 0

reef ravine
#

and if you take another jumper and connect the pin 2 wire to the resistor / red wire / switch junction?

safe shell
weak walrus
#

When I added it to the resistor/rw/switch junction it was just always 0

#

Now I moved everything around a tiny bit and im back to inconsistent 1 with consistent 0 ha

reef ravine
#

but if you move the green wire between red and blue it works? ( your original wiring was better)

weak walrus
#

!! if I move it between those two then yes I can get a 1

#

but the low state is still 1's and 0's

#

that feels like progress 😮

reef ravine
#

the toggling means pin 2 is floating, if you connect green to the resistor it stays low?

weak walrus
#

hm actually when i pressed it again the consistent 1s didnt come back

#

ill look

#

yes

#

thats correct

#

it seems to stay low if on the resistor row

#

(with ground)

#

and doesnt go high

reef ravine
#

try removing and reinserting the red wire

weak walrus
#

no dice

reef ravine
#

seems like the switch is bad, do you have another?

weak walrus
#

yep!

#

I did switch this one out alredy

#

ill see

#

with this setup and trying 3 switches it doesnt work

#

it is possible all three could be borked

reef ravine
#

green is on wrong side of resistor

#

it's always connected to ground

weak walrus
#

This seems to also just give me 0s

#

(I really appreciate your help by the way)

reef ravine
#

ok take another jumper and "short" between red and green

#

if that works then the switch doesn't

#

maybe its orange, whatever is connected to +5

north stream
#

It could be that the switch leads are too short to engage with the breadboard contacts.

weak walrus
#

I think its making contact

#

maybe not 😮

#

How do I short it? Put the new wire in the same row as the red and green?

#

Either end

reef ravine
#

yes, it simulates pressing the switch

#

do not short +5 to ground!!!!

weak walrus
#

Inconsistent 0/1 and 0 on press

reef ravine
#

better, move the red wire to the bottom corner

#

0 on press means the top and bottom pins on the right are the switch closure

weak walrus
#

Moving red wire to bottom left leg inconsirent 0/1s, consistent 0s. Moving white wire to same row as red and only 0's

#

If I remove the white wire I am back to inconsisten 1/0s

reef ravine
#

Like @north stream I've found sometimes the switch pins (which are designed for a circuit board) don' actually make contact with the breadboard pins

weak walrus
#

Okay!

#

Maybe I can find some new ones

reef ravine
#

ok with wht removed, move red to the switch / resistor junction

weak walrus
#

On the other side of the board?

reef ravine
#

yes so you'll have ground >> resistor >> + 5 and switch, then leave green wire up top

weak walrus
#

Same- inconsistent 1s

reef ravine
#

the pins on the switch come with a bend in them, can you make the legs "longer" by straightening the pins with a needle nose plier?

weak walrus
#

I'l try that

#

they are as flat as they go but same resuts

#

I can look for some new ones

reef ravine
#

OK, you got the display working - that's usually the hard part!

weak walrus
#

Ya!! I was surprised the button is so hard!!

#

I've used buttons before!

#

but dang haha

reef ravine
#

and yours don't have those S bends in the legs?

weak walrus
#

They used to before I took some pliers 🙂

reef ravine
#

Ahhh

#

yeah I always use pliers on them when using a breadboard, they fit great on a PCB

weak walrus
#

noted!

#

I guess I'll give it a rest then until the other switches get in tomorrow

#

Thanks so much for your help at least I learned a ton

reef ravine
#

OK, good luck, you're n the right track

weak walrus
#

More so than if it just worked 😄

#

👍

visual quarry
#

Hi

#

can somone please help me

#

i am making my friend a crazy game controller for his birthday tomorrow
and i need help

i have made a working fight stick but i cant seem to add a wii nunchuck to the mix
Please help

cedar mountain
#

I think the nunchuck is an I2C device, but I don't see you initializing the Wire library anywhere.

visual quarry
#

so what should i do?

cedar mountain
#

Likely, #include <Wire.h>, and then do Wire.begin() in your setup() function, before nchuk.begin().

visual quarry
#

wait where do i put it?

#

ps thanks heaps for helping

cedar mountain
#

You put the include at the top of the file with your other includes, and the begin call in setup() with the other begin calls.

#

(Although this is of course not guaranteed to work, just something which looks missing.)

visual quarry
#

still the same error

#

could you please have a look at the Ino file?

cedar mountain
#

Oh, you didn't say that it didn't even compile before...

visual quarry
#

oh sorry

#

basically i already coded the fight stick but when i tried to add the nunchuck i copied and pasted from another file and its not working

#

but im so glad that you are helping me

cedar mountain
#

So, this error is unrelated to the Nunchuk, as it's just the USB HID functionality. It looks like the HID_Keyboard library thinks you don't have an Arduino with USB capability, or haven't enabled / included it if you do.

visual quarry
#

so what should i do

visual ferry
#

what Arduino do you have

visual quarry
#

leonardo

#

the fightstick works perfectly

#

on usb

cedar mountain
#

One thing you may need is to put the #include <Keyboard.h> above the #include <HID_Buttons.h> line instead of below it.

visual quarry
#

thanks heaps that error is fixed

#

but

#

i cant thank you guys enough

#

i have been working on this for weeks

cedar mountain
#

That looks like a bad copy-paste of a section of code that shouldn't be where it is.

visual quarry
#

ok

#

where should i put it

cedar mountain
#

Where did it come from?

visual quarry
#

i tried to merge that

#

with that

#

i just copied and pasted

cedar mountain
#

I'd just delete everything in setup() before the Serial.begin() line, as it doesn't belong there and doesn't seem to be present in either of the files you linked.

visual quarry
#

Ok

#

Yessssssfs

#

one last thing

visual ferry
#

you forgot a curly brace at the end to close the function

#

so

void loop() {
  wiiNunchuk();
}
visual quarry
#

aaaaaaaghhhh

#

another eror

#

ps thanks Y2K

visual ferry
#

Nunchuk is a type, you cannot declare a function the same name as a type

#

just change it to lowercase n

visual quarry
visual ferry
#

do you even have a Wiinunchuk() function...?

visual quarry
#

idk

visual ferry
#

alright hold on

visual quarry
#

that is fixed but now this happend

visual ferry
#

hm...

visual quarry
#

sorry i must be really annoying

visual ferry
#

its fine, ive delt with worse

#

lol

visual quarry
#

oof

#

lol

#

could you please have a look at the .ino file?

visual ferry
#

i am

#

ohhh, literally 90% of this code is outside your loop function

#

lemme just fix this rq and send you the new ino

#

since it'll be easier than explaining it and you're on a tight deadline

visual quarry
#

K thanks

cedar mountain
#

That's awesome of you, @visual ferry ... 👍

visual quarry
#

Agreed

#

Thanks guys

#

Ps what should I do to actually learn about coding

#

Is there a good book on it ?

visual ferry
#

theres a lot of different resources on it tbh, hard to really suggest one place

#

I learned from classes in school and a lot of self teaching and reading around, i wouldnt be able to suggest anything tbh

visual quarry
#

Ok all good

#

hows the Ino file

#

is it super messed up'?

visual ferry
#

working on it, im doing some reorganization and commenting so you know what I changed

visual quarry
#

oh cool

#

thankyou man

#

you are really helping me out here

visual ferry
#

im bored and got nothing else to do, works for me lol

visual quarry
#

lol

visual ferry
#

ugh, bit rusty with arduino/C in general, do you know if

if(condition) {
  //code
} else {
  //code
}

works @cedar mountain

#

or do I have to have else on a new line

#

my brain is telling me that it works but i just simple cannot remember for the life of me

#

else on a new line is probably cleaner anyway

cedar mountain
#

That should be completely fine. C is agnostic to newlines for the most part.

visual ferry
#

figured

#

@visual quarry so with your keyboard key press code, your comments say you are wanting to press the function keys (F1 through F12) but the keyboard buttons you are actually pressing are numpad keys

#

did you want to press function keys or numpad keys

visual quarry
#

oh sorry i was going to do function but i changed my mind

visual ferry
#

ah, ok, so numpad then

#

gotchu

visual quarry
#

yeah

visual ferry
#

almost done then just gimme about 2 mins

visual quarry
#

i have been meaning to tidy that up

#

oh thanks

#

thanks a million

visual ferry
#

ok, here you go, should be good, but lemme know if I messed something up @visual quarry

visual quarry
#

00

#

thannnnnkyou

#

sooooo

#

muuuuuuch

visual ferry
#

Don't thank me yet make sure it works first lol

visual quarry
visual ferry
#

ah i didnt touch that line lemme see...

visual quarry
#

k

visual ferry
#

oh, woops, one sec

#

ik what i did wrong here

visual quarry
#

all g

#

take your time

visual ferry
#

I guess the KeyboardButton declarations are supposed to be outside the Setup loop for a reason lol

#

i mean you can probably create the references and declare in the setup loop later but im too lazy to do that rn

#

anyway test this one out @visual quarry

visual quarry
visual ferry
#

whaaaa?

#

that should be fine...

visual quarry
#

if you press the verify button it shows the errors

visual ferry
#

Eep no its not

visual quarry
#

lol

#

all good

visual ferry
#

@visual quarry i dont have the nunchuk library you have so it wont for me

visual quarry
#

does that help?

visual ferry
#

probably but i think this should be it

#

ill just have you edit it

visual quarry
#

ok

#

kool

visual ferry
#

at the top of the file, where all the #defines are

#

remove #define KEY_NUMPAD_0 0xEA

visual quarry
#

still not working

visual ferry
#

add #define KEY_NUMPAD_4 0xE4 right underneath #define KEY_ARROW_RIGHT 0xD7

visual quarry
#

oh

visual ferry
#

i wasnt done :P

visual quarry
#

sorry

visual ferry
#

no worries

visual quarry
#

yeeeeessss

#

it works

visual ferry
#

eyyy, glad to hear it!

visual quarry
#

thankyou so much mate

visual ferry
#

does everything you expect it to do?

visual quarry
#

umm

#

not really

#

the fightstick dosent work anymore

visual ferry
#

whats it doing

visual quarry
#

nothing

#

it used to press keys 4 to 9 and use the direction buttons

#

but it wont do anything now

visual ferry
#

hm...

#

i wonder if its because of the defines

#

let me try this...

visual quarry
#

k

visual ferry
#

i removed the defines and replaced them with the hex codes right in the function calls instead

visual quarry
#

still nothing for the fightsticl

visual ferry
#

oh shoot woops

visual quarry
#

lol

#

i didnt see anything i just saw the bot

#

lol

visual ferry
#

can you uncomment //nchuk.printDebug();, run it, and open up the serial monitor and tell me if you're getting anything?

visual quarry
#

btw i havent conected a nunchuck yet

#

the fight stick itself isn't working

visual ferry
#

oh well thats why

#

you need to connect the nunchuk

visual quarry
#

ooohhhh

#

sorry

visual ferry
#

the code wont continue into the Loop function until you have the nunchuk connected lol

visual quarry
#

sory lol i feel stupid

visual ferry
#

nah ur good

visual quarry
#

ok well ill connect tomorrow and ill get back to you

visual ferry
#

ok, works for me

visual quarry
#

thanks again i owe u mate

visual ferry
#

eh its whatever lol

visual quarry
#

goodnight mate

slow nebula
#

vvHi
i have a prob.... my HC-SR04 ultrasonic sensor alwase sends back -1.. and i can't seem to find why
(using wemos D1 r2 bord and the sensor is powered in 3.3v )

fallen rock
#

Hello, I work on a Arduino Uno with Windows. My computer can't export any program (same thing for Numworks). Can you help me please ?
The message is "exit status 1"

pine bramble
#

@slow nebula The HC-SR04 needs 5V to work properly

slow nebula
#

yhea, that was what my friend was saying 5 mins ago SadChamp rip my project

pine bramble
#

You can use a level converter to communicate with the sensor. You only need 5V to power the sensor and for the converter. There is a 5V pin on the board, right?

slow nebula
#

my friend proposed me to use this, do you thing it can work @pine bramble ?

#

welp, nvm changing it Oof

pine bramble
#

This looks right, 2K/1K will do as well.

slow nebula
#

welp, i tried and it worked, then stopped rooDerp
sorry for bothering you ^^ and thanks a lot for the help, this was my first project, learning more things every time ^^

pine bramble
#

Hello all, I have really strange issue. I have diy LED lamp with arduino controll via USB. I changed power supply and can't no more connect to arduino via USB. If disconnect power supply everything works fine, also when I connect old power supply everything works fine. Current on arduino VIN is 5V on both supplies. Any ideas why this is happening?

#

@slow nebula No problem, ask anything anytime, there is always someone willing to help here

north stream
#

Seems like an issue with the new supply, sure enough. Could be an interference issue or a ground loop issue, I suppose.

cyan jasper
#

Sounds like first psu was mains earth referenced other is floating ground

pine bramble
#

Hello all, I'm making a project where I'd like to reuse some elements from the Arduino Nano board.
Being the lazy dude I am, I was looking for a schematic to copypaste from. I did find an eagle schematic, but it must be for an old version of Eagle, because it generates and error when I try to open.
Any of you guys know of a schematic/project compatible with the current version of Autodesk Eagle?

cyan jasper
#

Even if it's older version eagle should be able to import it