Running an ATtiny85 on 3.3v. Reading analogue pin A2 and it's reading 255 at 3.3v. I expected it to be 1023 or at least a lot nearer. Yes, the variable it reads to is an int (not a byte).
Seems a bit of a coincidence that its a lovely neat 255.
I think that your pinMode enter in conflict with the ADC reading. As for me, INPUT means I/O not Analog. If you want to do analog reading, just delete this line.
When I request this information from the ATtiny85, I send:
Wire1.requestFrom(0x1C,2);
That asks for 2 bytes from the address 0xC1. All fine and works.
But, my I2C addresses are stored as a variable 0-127. These are stored in an int called address.
Fine if I am doing a comparison e.g: if ((address1 >= 0x1C) and (address1 <= 0x1F)) { blah }
But, I want to use that address in a later I2C command...
Wire1.requestFrom(address1,2);
This throws up an error:
Warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
Wire1.requestFrom(address1,2);
Please, post the picture of your Attiny85 MCU Board. I use the following kinds of boards under ATtinyCore.
Figure-1:
2.
In post# 1, you are talking about ADC Channel-A2.
3.
In post #6, you are talking about ADC Channel-A3.
4.
Check carefully that the input signal is connected at Ch-A3 (Physical Pin 2 of Attiny85). Note that this pin (if using one of the Dev Board of Fig-1) is also connected at D- pin of the USB Connector.
I like your setup and working attitude as it resembles by profile. However, I would also expect that you own the following resources to get aid in troubleshooting of the hardware. 1. AVR programmer. 2. Universal ROM Programmer. 3. Digispark ATtiny85 Dev Board 4. Arduino UNO Board 5. Spare ATtiny85 Chips.