Teensy 4.1 not accessing a1-a17

eagleman

Active member
Did I miss something? I cannot get good numbers out of accessing A14 - A17. Do the "ADC.h" or "ADC_util.h" libraries need updating or changing?

here is the beginning of mt setup:
#include <ADC.h>
#include <ADC_util.h>
#include <Time.h>
#include <TimeLib.h>
#include <elapsedMillis.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SPITFT.h>
#include <Adafruit_SPITFT_Macros.h>
#include <gfxfont.h>
#include <Adafruit_ILI9341.h>
#include <XPT2046_Touchscreen.h>
#include <SPI.h>
//File root;

// *********** Teensy 4 specifers ************************
#define PINS 17
#define DIG_PINS 18
#define AId 9000000
#define CS_PIN 2
//#define TIRQ_PIN 3
#define touch_PIN 3
#define Tach 5
#define TEST_LED 6
#define TFT_LED 7
#define TFT_RESET 8
#define TFT_DC 9
#define TFT_CS 10
#define TFT_MOSI 11
#define TFT_MISO 12
#define TFT_SCK 13
#define x_COM_LED 31
#define ID_Pin 32

// ************************************************** COLORS COLORS ********
#define blk 0x0000
#define yel 0xffe0
#define wht 0xffff
#define crm 0xfff0
#define red 0xf800
#define blu 0x001f
#define grn 0x07e0
#define gry 0x4208
#define org 0xf905

char MN_name[] = "VOLTS; TACH; CARS;PITIG; ADC ; CALC;GAUGE;SETUP; SW4 ; SW6 ";
char ST_name[] = "CLOCK; TACH; CARS;TOUCH; ADC ; CALC;GAUGE; EXIT; SW4 ; SW6 ";
char TM_name[] = " DST+; DST-;12/24;TOUCH;MONTH; DAY ; YEAR; EXIT; SW4 ; SW6 ";
char CA_name[] = "1;2;3;4;+;5;6;7;8;-;9;A;B;C;*;D;E;F;0;/;(;);^;.;ENTER";
char CO_name[] = " BLUE RED GREENORANGEVIOLET";

char buffer_TFT[100];
char buffer_TIG[98];
char buffer_adc[280];
char buffer_RPM[50];
char buffer_CAR[300];
char buffer_INP[20];
char buffer_CHn[140];

uint8_t adc_pins[] = {A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17};
 
Note: my quick look at his PR to himself, looks like he may have the T4 and 4.1 pin defines reversed...
 
Back
Top