Can it be done... Arduino-based full Digital Auto Instrument Cluster

That PDF has the text "How to sense 12V or higher circuitry with Arduino" right above the schematic(s). But that's not the issue anymore...

Had to put in a 10K "adjustment" pot on the ground side of the divider. I got the circuit to read close to what the available voltage is coming out of the input pot (simulating changing system voltage from 12V down) and still need to remove the adjustment pot to measure it (to see if I can just put in a regular resistor). I still need to find the other wall wart for testing higher voltages to see if it's accurate above 11V. That thing always seems to go missing when I need it :roll_eyes: .

[quote]
[color=#7E7E7E]/*[/color]
[color=#7E7E7E]DigitalVoltmeter[/color]
[color=#7E7E7E]Reads an analog voltage on pin A5 and prints it to the Serial Monitor.[/color]
[color=#7E7E7E]*/[/color]

[color=#CC6600]void[/color] [color=#CC6600][b]setup[/b][/color]() {
  [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]begin[/color](9600);
}

[color=#CC6600]void[/color] [color=#CC6600][b]loop[/b][/color]() {
  [color=#CC6600]int[/color] sensorValue = [color=#CC6600]analogRead[/color](A5); [color=#7E7E7E]//Read input on A5[/color]
  [color=#CC6600]float[/color] voltage = sensorValue * (18.0 / 1023.0); [color=#7E7E7E]//Converts analog reading to voltage)[/color]
  [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]println[/color](voltage); [color=#7E7E7E]//Sends voltage to serial monitor[/color]
  [color=#CC6600]delay[/color] (200);
}

[/quote]

(Ugh, that so didn't post right)

I wrote a basic code for the oil pressure gauge, basically the same as the voltmeter, printing the result over the serial monitor. I need to go to RadioShack tomorrow and pick up a 1K pot to simulate the oil pressure sender and the coolant temp sender.

2 questions:

First, how do I constrain the result of the calculations to one decimal place (or none at all)?

Second, can anyone point me in the direction of a basic max7221spi sketch, so I know what the basics are that I need to input into a program to, say, make the 4-digit display show "1234" at medium brightness? And will it be possible to make the gauge blink when overlimit?