Calculate amplitude in dB and dBA from audio signal
Q1: Is this the correct way (or a valid way) to get a dB amplitude from a sample?

Assuming you want to build a sound pressure level meter the answer would be a resounding &quot;no&quot;. The correct way is to build a running energy detector with a proper time management as defined in the IEC standard IEC61672. https://webstore.iec.ch/publication/5708. This is actually pretty simple. By far the most difficult part is the calibration of the microphone. As ZR Han in their answer already pointed out: you get to a sound pressure level in dB (dBSPL) by using a reference pressure of $20 \mu Pa$, but that means you have to convert your input signal from Volts or &quot;number&quot; to Pascals as well and this is very device and settings dependent.

Q2: How do I interpret this bin?

That's a complicated question. Each digital bin contains energy from ALL analog frequencies EXCEPT the center frequencies of the other digital bins and the exact relationship isn't trivial. In your case you should just ignore this since there is no reason to do go into the frequency domain in the first place.

Q3: I have 256 bins, ...

Again, that's a very complicated question and I won't get into the answer since its completely unnecessary for what you want to do.
Building a sound level meter is relatively straight forward

Calibrate your input signal to represent actual sound pressure in Pa (Pascal)
Apply time domain weighting filter (A,C, Z, none)
Square the signal
Apply exponential (first order lowpass) averaging with proper time constant
Convert to dB using $p_{ref} = 20 \mu Pa$

Step 1 is by far the most complicated.