Some consider floating pins is bad practice.So should i ground them?
You should not have unconnected pins unless you know for sure they are inputs with internal pullups, and I don't think you can make that claim.As i said it's working after i change the way i send the signal from "sensor", now voltage is not droping and maybe that was leading atmega to stop working.
- Not connected, what should i do with them? all to GND?Waht's the point for that? No matters what state 5V or GND i have there when i'm not using them. If not correct me
- Looks like
- Yeah i know i should put 10k Ohm resistor to 5V but i didn't experienced random resets yet, the problem is somewhere else
- 15 pin is sending some kind of signal to transmitter, no idea how it works exactly
- I've got 1 capacitor close to VCC and GND near atmega
- if(digitalRead (guzik)==LOW){msg="on";}, so i need to put GND to it to let it work
- It's 15
- 16Mhz
You can either make them outputs and set the value to either 1 or 0, or you can make them inputs with input pullups enabled. If I were you I would find out what state they are in just after the processor comes out of RESET, then duplicate that condition in the startup code, then finally set the pins you will be using to their proper values. This way you have redundancy that will always leave all unused pins in a known default state.I'm using someone else code
10uF
Code is working as i want that's not the point of that conversation
so Should i make all unused inputs as INPUT_PULLUP in arduino?
by Jeff Child
by Jake Hertz
by Jake Hertz
by Aaron Carman