I have tested the code here, and it does compile, and it does run on a 328P Arduino Nano (programmed with the 6pin programmer).
The code turns the Nano into a generic monitor,
basic mS timer,
8 A/D monitors, each with raw value and converted value via tables.
The raw A/D values are monitors 0-7, and are readable with SCPI monitor commands.
The converted values are monitors 8-15 and use the tables for the conversions.
three tables are used:
table 0 is two sets of 8 switches. low 8 bits are active A/D channel 0-7, high 8 bits are sensor on bits 0-7 (inverted logic, 1=off or inactive)
table 1 provides default sensor values 0-7 when A/D is active but sensor is off
table 2 is 8 8x1 tables to provide conversions for A/D sensor values
Tables exist in EEPROM which is cleared to all 1s on new devices.
SCPI commands are available to update table information and read monitor values.
Configure table information. Used to select and load contents into a table, or modify cells in a table. Tables are always N x N structure. Parameters required for instruction.
Table number, Update type (0=cell, 1=row, 2=block), Other parameters - for cell; X,Y,data for row; Y,(data0,data1,...), for block; X,Y,W,H,(data0,data1,...)
Fetch contents of last table configured. No parameters. Returns table number, table type, width, height, and the content data, rows bounded by parenthesis.
Configure monitor set. Select series of monitors to output. Parameters are a list of the enumerated monitors to output.
Fetch monitors. Returns the number of monitors in the list, and two lists; first is the list of the selected monitors, second is a list of the monitor values.
Pleas feel free to ask me questions about any of this up to this point. The next series will begin to cover use based on the tools presented here.