Arduino IDE board target / getting started?

Introduction and miscellaneous that we haven't created categories for, yet
Post Reply
User avatar
mdrobnak
Posts: 692
Joined: Thu Mar 05, 2020 5:08 pm
Location: Colorado, United States
Has thanked: 1 time
Been thanked: 5 times

Arduino IDE board target / getting started?

Post by mdrobnak »

So I'm trying to load up the CHAdeMO controller, and realize that with the amount of libraries called, some of them are hardware specific.
I just looked at the schematic and found the Atmega processor, so I'm testing with Arduino Uno Wifi. The problem is that I'm running into some weirdness with respect to where the files live and such.
I've tried various things and gotten various issues, the main one I keep getting is CAN_FRAME has not been declared, OR, that it can't find src/globals.h or src/chademo.h

This is on Windows.

Any ideas? Yes, I know that was a bit vague, and I'm sorry for that.

-Matt
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 2 times
Contact:

Re: Arduino IDE board target / getting started?

Post by Isaac96 »

Hi,

The src/globals.h error is because the directory structure changed when the code went on Github.
Edit the first few lines of the .ino file:

Code: Select all

#include "src/globals.h"
#include "src/chademo.h"
needs to become

Code: Select all

#include "globals.h"
#include "chademo.h"
Also you need to add the other libraries declared in the .ino file:

Code: Select all

#include <mcp_can.h> // libraries folder
#include <INA226.h> // libraries folder
#include <EEPROMAnything.h> // libraries folder
#include <FrequencyTimer2.h> // libraries folder
FrequencyTimer2 and INA226 can be found in the library manager of the Arduino IDE.

Others are available on GitHub:

https://github.com/collin80/mcp_can
https://github.com/collin80/EEPROMAnything

No guarantee that those are the right libraries; you might need to find and install the right ones.


-Isaac
User avatar
mdrobnak
Posts: 692
Joined: Thu Mar 05, 2020 5:08 pm
Location: Colorado, United States
Has thanked: 1 time
Been thanked: 5 times

Re: Arduino IDE board target / getting started?

Post by mdrobnak »

Tried that.










chademo.cpp:7:26: error: 'Print' does not name a type; did you mean 'int'?

template<class T> inline Print &operator <<(Print &obj, T arg) { obj.print(arg); return obj; } //Sets up serial streaming Serial<<someshit;

^~~~~

int

chademo.cpp:11:1: error: 'CHADEMO' does not name a type

CHADEMO::CHADEMO()

^~~~~~~

chademo.cpp:30:6: error: 'CHADEMO' has not been declared

void CHADEMO::setDelayedState(int newstate, uint16_t delayTime)

^~~~~~~

chademo.cpp:30:45: error: 'uint16_t' has not been declared

void CHADEMO::setDelayedState(int newstate, uint16_t delayTime)

^~~~~~~~

sketch\chademo.cpp: In function 'void setDelayedState(int, int)':

chademo.cpp:32:2: error: 'chademoState' was not declared in this scope

chademoState = LIMBO;

^~~~~~~~~~~~

chademo.cpp:32:17: error: 'LIMBO' was not declared in this scope

chademoState = LIMBO;

^~~~~

chademo.cpp:33:2: error: 'stateHolder' was not declared in this scope

stateHolder = (CHADEMOSTATE)newstate;

^~~~~~~~~~~

chademo.cpp:33:17: error: 'CHADEMOSTATE' was not declared in this scope

stateHolder = (CHADEMOSTATE)newstate;

^~~~~~~~~~~~

chademo.cpp:34:2: error: 'stateMilli' was not declared in this scope

stateMilli = millis();

^~~~~~~~~~

sketch\chademo.cpp:34:2: note: suggested alternative: 'static'

stateMilli = millis();

^~~~~~~~~~

static

chademo.cpp:34:15: error: 'millis' was not declared in this scope

stateMilli = millis();

^~~~~~

chademo.cpp:35:2: error: 'stateDelay' was not declared in this scope

stateDelay = delayTime;

^~~~~~~~~~

sketch\chademo.cpp: At global scope:

chademo.cpp:38:1: error: 'CHADEMOSTATE' does not name a type

CHADEMOSTATE CHADEMO::getState()

^~~~~~~~~~~~

chademo.cpp:43:6: error: 'CHADEMO' has not been declared

void CHADEMO::setTargetAmperage(uint8_t t_amp)

^~~~~~~

chademo.cpp:43:33: error: variable or field 'setTargetAmperage' declared void

void CHADEMO::setTargetAmperage(uint8_t t_amp)

^~~~~~~

chademo.cpp:43:33: error: 'uint8_t' was not declared in this scope

chademo.cpp:48:6: error: 'CHADEMO' has not been declared

void CHADEMO::setTargetVoltage(uint16_t t_volt)

^~~~~~~

chademo.cpp:48:32: error: variable or field 'setTargetVoltage' declared void

void CHADEMO::setTargetVoltage(uint16_t t_volt)

^~~~~~~~

chademo.cpp:48:32: error: 'uint16_t' was not declared in this scope

sketch\chademo.cpp:48:32: note: suggested alternative: 'char16_t'

void CHADEMO::setTargetVoltage(uint16_t t_volt)

^~~~~~~~

char16_t

chademo.cpp:53:6: error: 'CHADEMO' has not been declared

void CHADEMO::setChargingFault()

^~~~~~~

sketch\chademo.cpp: In function 'void setChargingFault()':

chademo.cpp:55:2: error: 'carStatus' was not declared in this scope

carStatus.chargingFault = 1;

^~~~~~~~~

sketch\chademo.cpp: At global scope:

chademo.cpp:58:6: error: 'CHADEMO' has not been declared

void CHADEMO::setBattOverTemp()

^~~~~~~

sketch\chademo.cpp: In function 'void setBattOverTemp()':

chademo.cpp:60:2: error: 'carStatus' was not declared in this scope

carStatus.battOverTemp = 1;

^~~~~~~~~

sketch\chademo.cpp: At global scope:

chademo.cpp:64:6: error: 'CHADEMO' has not been declared

void CHADEMO::loop()

^~~~~~~

sketch\chademo.cpp: In function 'void loop()':

chademo.cpp:66:9: error: 'byte' does not name a type

static byte frameRotate;

^~~~

chademo.cpp:67:19: error: 'IN1' was not declared in this scope

if (!digitalRead(IN1)) //IN1 goes low if we have been plugged into the chademo port

^~~

chademo.cpp:67:7: error: 'digitalRead' was not declared in this scope

if (!digitalRead(IN1)) //IN1 goes low if we have been plugged into the chademo port

^~~~~~~~~~~

chademo.cpp:69:7: error: 'insertionTime' was not declared in this scope

if (insertionTime == 0)

^~~~~~~~~~~~~

chademo.cpp:73:26: error: 'OUT0' was not declared in this scope

digitalWrite(OUT0, LOW);

^~~~

chademo.cpp:73:32: error: 'LOW' was not declared in this scope

digitalWrite(OUT0, LOW);

^~~

chademo.cpp:73:13: error: 'digitalWrite' was not declared in this scope

digitalWrite(OUT0, LOW);

^~~~~~~~~~~~

chademo.cpp:74:26: error: 'OUT1' was not declared in this scope

digitalWrite(OUT1, LOW);

^~~~

chademo.cpp:76:20: error: 'millis' was not declared in this scope

insertionTime = millis();

^~~~~~

chademo.cpp:78:12: error: 'millis' was not declared in this scope

else if (millis() > (uint32_t)(insertionTime + 500))

^~~~~~

chademo.cpp:78:24: error: 'uint32_t' was not declared in this scope

else if (millis() > (uint32_t)(insertionTime + 500))

^~~~~~~~

sketch\chademo.cpp:78:24: note: suggested alternative: 'char32_t'

else if (millis() > (uint32_t)(insertionTime + 500))

^~~~~~~~

char32_t

chademo.cpp:80:8: error: 'bChademoMode' was not declared in this scope

if (bChademoMode == 0)

^~~~~~~~~~~~

chademo.cpp:83:9: error: 'chademoState' was not declared in this scope

if (chademoState == STOPPED && !bStartedCharge) {

^~~~~~~~~~~~

chademo.cpp:83:25: error: 'STOPPED' was not declared in this scope

if (chademoState == STOPPED && !bStartedCharge) {

^~~~~~~

chademo.cpp:83:37: error: 'bStartedCharge' was not declared in this scope

if (chademoState == STOPPED && !bStartedCharge) {

^~~~~~~~~~~~~~

chademo.cpp:84:21: error: 'STARTUP' was not declared in this scope

chademoState = STARTUP;

^~~~~~~

chademo.cpp:85:6: error: 'Serial' was not declared in this scope

Serial.println(F("Starting Chademo process."));

^~~~~~

chademo.cpp:85:21: error: 'F' was not declared in this scope

Serial.println(F("Starting Chademo process."));

^

chademo.cpp:86:6: error: 'carStatus' was not declared in this scope

carStatus.battOverTemp = 0;

^~~~~~~~~

chademo.cpp:96:6: error: 'bChademo10Protocol' was not declared in this scope

bChademo10Protocol = 0;

^~~~~~~~~~~~~~~~~~

chademo.cpp:103:3: error: 'insertionTime' was not declared in this scope

insertionTime = 0;

^~~~~~~~~~~~~

chademo.cpp:104:7: error: 'bChademoMode' was not declared in this scope

if (bChademoMode == 1)

^~~~~~~~~~~~

chademo.cpp:106:4: error: 'Serial' was not declared in this scope

Serial.println(F("Stopping chademo process."));

^~~~~~

chademo.cpp:106:19: error: 'F' was not declared in this scope

Serial.println(F("Stopping chademo process."));

^

chademo.cpp:108:4: error: 'bStartedCharge' was not declared in this scope

bStartedCharge = 0;

^~~~~~~~~~~~~~

chademo.cpp:109:4: error: 'chademoState' was not declared in this scope

chademoState = STOPPED;

^~~~~~~~~~~~

chademo.cpp:109:19: error: 'STOPPED' was not declared in this scope

chademoState = STOPPED;

^~~~~~~

chademo.cpp:114:17: error: 'OUT0' was not declared in this scope

digitalWrite(OUT0, LOW);

^~~~

chademo.cpp:114:23: error: 'LOW' was not declared in this scope

digitalWrite(OUT0, LOW);

^~~

chademo.cpp:114:4: error: 'digitalWrite' was not declared in this scope

digitalWrite(OUT0, LOW);

^~~~~~~~~~~~

chademo.cpp:115:17: error: 'OUT1' was not declared in this scope

digitalWrite(OUT1, LOW);

^~~~

chademo.cpp:116:8: error: 'settings' was not declared in this scope

if (settings.debuggingLevel > 0)

^~~~~~~~

chademo.cpp:124:6: error: 'bChademoMode' was not declared in this scope

if (bChademoMode)

^~~~~~~~~~~~

chademo.cpp:127:8: error: 'bDoMismatchChecks' was not declared in this scope

if (!bDoMismatchChecks && chademoState == RUNNING)

^~~~~~~~~~~~~~~~~

chademo.cpp:127:29: error: 'chademoState' was not declared in this scope

if (!bDoMismatchChecks && chademoState == RUNNING)

^~~~~~~~~~~~

chademo.cpp:127:45: error: 'RUNNING' was not declared in this scope

if (!bDoMismatchChecks && chademoState == RUNNING)

^~~~~~~

chademo.cpp:129:9: error: 'CurrentMillis' was not declared in this scope

if ((CurrentMillis - mismatchStart) >= mismatchDelay) bDoMismatchChecks = 1;

^~~~~~~~~~~~~

In file included from C:\Users\mdrobnak\Documents\Arduino\JLD505_TM2019\JLD505_TM2019.ino:9:0:

chademo.h:95:22: error: 'CAN_FRAME' has not been declared

void handleCANFrame(CAN_FRAME &frame);

^~~~~~~~~

JLD505_TM2019:894:12: error: variable or field 'SCOTT' declared void

void SCOTT(CAN_FRAME frame)

^~~~~~~~~

JLD505_TM2019:894:12: error: 'CAN_FRAME' was not declared in this scope

chademo.cpp:129:25: error: 'mismatchStart' was not declared in this scope

if ((CurrentMillis - mismatchStart) >= mismatchDelay) bDoMismatchChecks = 1;

^~~~~~~~~~~~~

C:\Users\mdrobnak\Documents\Arduino\JLD505_TM2019\JLD505_TM2019.ino:894:12: note: suggested alternative: 'CAN_FAIL'

void SCOTT(CAN_FRAME frame)

^~~~~~~~~

CAN_FAIL

chademo.cpp:129:43: error: 'mismatchDelay' was not declared in this scope

if ((CurrentMillis - mismatchStart) >= mismatchDelay) bDoMismatchChecks = 1;

^~~~~~~~~~~~~

C:\Users\mdrobnak\Documents\Arduino\JLD505_TM2019\JLD505_TM2019.ino: In function 'void setup()':

JLD505_TM2019:174:3: error: 'CAN' was not declared in this scope

CAN.begin(CAN_500KBPS);

^~~

C:\Users\mdrobnak\Documents\Arduino\JLD505_TM2019\JLD505_TM2019.ino:174:3: note: suggested alternative: 'NAN'

CAN.begin(CAN_500KBPS);

^~~

NAN

C:\Users\mdrobnak\Documents\Arduino\JLD505_TM2019\JLD505_TM2019.ino: In function 'void loop()':

JLD505_TM2019:231:2: error: 'CAN_FRAME' was not declared in this scope

CAN_FRAME inFrame;

^~~~~~~~~

chademo.cpp:132:7: error: 'chademoState' was not declared in this scope

if (chademoState == LIMBO && (CurrentMillis - stateMilli) >= stateDelay)

^~~~~~~~~~~~

C:\Users\mdrobnak\Documents\Arduino\JLD505_TM2019\JLD505_TM2019.ino:231:2: note: suggested alternative: 'CAN_FAIL'

CAN_FRAME inFrame;

^~~~~~~~~

CAN_FAIL

chademo.cpp:132:23: error: 'LIMBO' was not declared in this scope

if (chademoState == LIMBO && (CurrentMillis - stateMilli) >= stateDelay)

^~~~~

chademo.cpp:132:33: error: 'CurrentMillis' was not declared in this scope

if (chademoState == LIMBO && (CurrentMillis - stateMilli) >= stateDelay)

^~~~~~~~~~~~~

JLD505_TM2019:321:20: error: 'CAN' was not declared in this scope

if (Flag_Recv || (CAN.checkReceive() == CAN_MSGAVAIL)) {

^~~

C:\Users\mdrobnak\Documents\Arduino\JLD505_TM2019\JLD505_TM2019.ino:321:20: note: suggested alternative: 'NAN'

if (Flag_Recv || (CAN.checkReceive() == CAN_MSGAVAIL)) {

^~~

NAN

JLD505_TM2019:323:20: error: 'inFrame' was not declared in this scope

CAN.receiveFrame(inFrame);

^~~~~~~

chademo.cpp:132:49: error: 'stateMilli' was not declared in this scope

if (chademoState == LIMBO && (CurrentMillis - stateMilli) >= stateDelay)

^~~~~~~~~~

sketch\chademo.cpp:132:49: note: suggested alternative: 'static'

if (chademoState == LIMBO && (CurrentMillis - stateMilli) >= stateDelay)

^~~~~~~~~~

static

chademo.cpp:132:64: error: 'stateDelay' was not declared in this scope

if (chademoState == LIMBO && (CurrentMillis - stateMilli) >= stateDelay)

^~~~~~~~~~

chademo.cpp:134:19: error: 'stateHolder' was not declared in this scope

chademoState = stateHolder;

^~~~~~~~~~~

chademo.cpp:137:7: error: 'bChademoSendRequests' was not declared in this scope

if (bChademoSendRequests && bChademoRequest)

^~~~~~~~~~~~~~~~~~~~

chademo.cpp:137:31: error: 'bChademoRequest' was not declared in this scope

if (bChademoSendRequests && bChademoRequest)

^~~~~~~~~~~~~~~

chademo.cpp:140:4: error: 'frameRotate' was not declared in this scope

frameRotate++;

^~~~~~~~~~~

C:\Users\mdrobnak\Documents\Arduino\JLD505_TM2019\JLD505_TM2019.ino: In function 'void wakeUpScott()':

JLD505_TM2019:875:5: error: 'CAN_FRAME' was not declared in this scope

CAN_FRAME outFrame;

^~~~~~~~~

chademo.cpp:145:5: error: 'sendCANStatus' was not declared in this scope

sendCANStatus();

^~~~~~~~~~~~~

C:\Users\mdrobnak\Documents\Arduino\JLD505_TM2019\JLD505_TM2019.ino:875:5: note: suggested alternative: 'CAN_FAIL'

CAN_FRAME outFrame;

^~~~~~~~~

CAN_FAIL

JLD505_TM2019:876:5: error: 'outFrame' was not declared in this scope

outFrame.id = 0x382;

^~~~~~~~

chademo.cpp:148:5: error: 'sendCANBattSpecs' was not declared in this scope

sendCANBattSpecs();

^~~~~~~~~~~~~~~~

JLD505_TM2019:888:20: error: 'CAN' was not declared in this scope

INT8U result = CAN.sendFrame(outFrame);

^~~

C:\Users\mdrobnak\Documents\Arduino\JLD505_TM2019\JLD505_TM2019.ino:888:20: note: suggested alternative: 'NAN'

INT8U result = CAN.sendFrame(outFrame);

^~~

NAN

C:\Users\mdrobnak\Documents\Arduino\JLD505_TM2019\JLD505_TM2019.ino: At global scope:

JLD505_TM2019:894:12: error: variable or field 'SCOTT' declared void

void SCOTT(CAN_FRAME frame)

^~~~~~~~~

JLD505_TM2019:894:12: error: 'CAN_FRAME' was not declared in this scope

chademo.cpp:151:5: error: 'sendCANChargingTime' was not declared in this scope

sendCANChargingTime();

^~~~~~~~~~~~~~~~~~~

C:\Users\mdrobnak\Documents\Arduino\JLD505_TM2019\JLD505_TM2019.ino:894:12: note: suggested alternative: 'CAN_FAIL'

void SCOTT(CAN_FRAME frame)

^~~~~~~~~

CAN_FAIL

chademo.cpp:156:11: error: 'chademoState' was not declared in this scope

switch (chademoState)

^~~~~~~~~~~~

chademo.cpp:158:8: error: 'STARTUP' was not declared in this scope

case STARTUP:

^~~~~~~

chademo.cpp:159:4: error: 'bDoMismatchChecks' was not declared in this scope

bDoMismatchChecks = 0; //reset it for now

^~~~~~~~~~~~~~~~~

chademo.cpp:160:20: error: 'SEND_INITIAL_PARAMS' was not declared in this scope

setDelayedState(SEND_INITIAL_PARAMS, 50);

^~~~~~~~~~~~~~~~~~~

chademo.cpp:167:4: error: 'bChademoSendRequests' was not declared in this scope

bChademoSendRequests = 1; //causes chademo frames to be sent out every 100ms

^~~~~~~~~~~~~~~~~~~~

chademo.cpp:168:20: error: 'WAIT_FOR_EVSE_PARAMS' was not declared in this scope

setDelayedState(WAIT_FOR_EVSE_PARAMS, 50);

^~~~~~~~~~~~~~~~~~~~

chademo.cpp:169:8: error: 'settings' was not declared in this scope

if (settings.debuggingLevel > 0) Serial.println(F("Sent params to EVSE. Waiting."));

^~~~~~~~

chademo.cpp:169:37: error: 'Serial' was not declared in this scope

if (settings.debuggingLevel > 0) Serial.println(F("Sent params to EVSE. Waiting."));

^~~~~~

chademo.cpp:169:52: error: 'F' was not declared in this scope

if (settings.debuggingLevel > 0) Serial.println(F("Sent params to EVSE. Waiting."));

^

chademo.cpp:174:8: error: 'SET_CHARGE_BEGIN' was not declared in this scope

case SET_CHARGE_BEGIN:

^~~~~~~~~~~~~~~~

chademo.cpp:175:8: error: 'settings' was not declared in this scope

if (settings.debuggingLevel > 0) Serial.println(F("CAR:Charge enable ON"));

^~~~~~~~

chademo.cpp:175:37: error: 'Serial' was not declared in this scope

if (settings.debuggingLevel > 0) Serial.println(F("CAR:Charge enable ON"));

^~~~~~

chademo.cpp:175:52: error: 'F' was not declared in this scope

if (settings.debuggingLevel > 0) Serial.println(F("CAR:Charge enable ON"));

^

chademo.cpp:176:17: error: 'OUT1' was not declared in this scope

digitalWrite(OUT1, HIGH); //signal that we're ready to charge

^~~~

chademo.cpp:176:23: error: 'HIGH' was not declared in this scope

digitalWrite(OUT1, HIGH); //signal that we're ready to charge

^~~~

chademo.cpp:176:4: error: 'digitalWrite' was not declared in this scope

digitalWrite(OUT1, HIGH); //signal that we're ready to charge

^~~~~~~~~~~~

chademo.cpp:177:4: error: 'carStatus' was not declared in this scope

carStatus.chargingEnabled = 1; //should this be enabled here???

^~~~~~~~~

chademo.cpp:178:20: error: 'WAIT_FOR_BEGIN_CONFIRMATION' was not declared in this scope

setDelayedState(WAIT_FOR_BEGIN_CONFIRMATION, 50);

^~~~~~~~~~~~~~~~~~~~~~~~~~~

chademo.cpp:181:20: error: 'IN0' was not declared in this scope

if (digitalRead(IN0)) //inverse logic from how IN1 works. Be careful!

^~~

chademo.cpp:181:8: error: 'digitalRead' was not declared in this scope

if (digitalRead(IN0)) //inverse logic from how IN1 works. Be careful!

^~~~~~~~~~~

chademo.cpp:183:21: error: 'CLOSE_CONTACTORS' was not declared in this scope

setDelayedState(CLOSE_CONTACTORS, 100);

^~~~~~~~~~~~~~~~

chademo.cpp:186:8: error: 'CLOSE_CONTACTORS' was not declared in this scope

case CLOSE_CONTACTORS:

^~~~~~~~~~~~~~~~

chademo.cpp:187:8: error: 'settings' was not declared in this scope

if (settings.debuggingLevel > 0) Serial.println(F("CAR:Contactor close."));

^~~~~~~~

chademo.cpp:187:37: error: 'Serial' was not declared in this scope

if (settings.debuggingLevel > 0) Serial.println(F("CAR:Contactor close."));

^~~~~~

chademo.cpp:187:52: error: 'F' was not declared in this scope

if (settings.debuggingLevel > 0) Serial.println(F("CAR:Contactor close."));

^

chademo.cpp:188:17: error: 'OUT0' was not declared in this scope

digitalWrite(OUT0, HIGH);

^~~~

chademo.cpp:189:20: error: 'RUNNING' was not declared in this scope

setDelayedState(RUNNING, 50);

^~~~~~~

chademo.cpp:192:4: error: 'bStartedCharge' was not declared in this scope

bStartedCharge = 1;

^~~~~~~~~~~~~~

chademo.cpp:193:4: error: 'mismatchStart' was not declared in this scope

mismatchStart = millis();

^~~~~~~~~~~~~

chademo.cpp:193:20: error: 'millis' was not declared in this scope

mismatchStart = millis();

^~~~~~

chademo.cpp:199:8: error: 'CEASE_CURRENT' was not declared in this scope

case CEASE_CURRENT:

^~~~~~~~~~~~~

chademo.cpp:200:8: error: 'settings' was not declared in this scope

if (settings.debuggingLevel > 0) Serial.println(F("CAR:Current req to 0"));

^~~~~~~~

chademo.cpp:200:37: error: 'Serial' was not declared in this scope

if (settings.debuggingLevel > 0) Serial.println(F("CAR:Current req to 0"));

^~~~~~

chademo.cpp:200:52: error: 'F' was not declared in this scope

if (settings.debuggingLevel > 0) Serial.println(F("CAR:Current req to 0"));

^

chademo.cpp:202:19: error: 'WAIT_FOR_ZERO_CURRENT' was not declared in this scope

chademoState = WAIT_FOR_ZERO_CURRENT;

^~~~~~~~~~~~~~~~~~~~~

chademo.cpp:205:8: error: 'evse_status' was not declared in this scope

if (evse_status.presentCurrent == 0)

^~~~~~~~~~~

chademo.cpp:207:21: error: 'OPEN_CONTACTOR' was not declared in this scope

setDelayedState(OPEN_CONTACTOR, 150);

^~~~~~~~~~~~~~

chademo.cpp:210:8: error: 'OPEN_CONTACTOR' was not declared in this scope

case OPEN_CONTACTOR:

^~~~~~~~~~~~~~

chademo.cpp:211:8: error: 'settings' was not declared in this scope

if (settings.debuggingLevel > 0) Serial.println(F("CAR:OPEN Contacor"));

^~~~~~~~

chademo.cpp:211:37: error: 'Serial' was not declared in this scope

if (settings.debuggingLevel > 0) Serial.println(F("CAR:OPEN Contacor"));

^~~~~~

chademo.cpp:211:52: error: 'F' was not declared in this scope

if (settings.debuggingLevel > 0) Serial.println(F("CAR:OPEN Contacor"));

^

chademo.cpp:212:23: error: 'LOW' was not declared in this scope

digitalWrite(OUT0, LOW);

^~~

chademo.cpp:215:4: error: 'sendCANStatus' was not declared in this scope

sendCANStatus(); //we probably need to force this right now

^~~~~~~~~~~~~

chademo.cpp:216:20: error: 'STOPPED' was not declared in this scope

setDelayedState(STOPPED, 100);

^~~~~~~

chademo.cpp:218:8: error: 'FAULTED' was not declared in this scope

case FAULTED:

^~~~~~~

chademo.cpp:219:4: error: 'Serial' was not declared in this scope

Serial.println(F("CAR: fault!"));

^~~~~~

chademo.cpp:219:19: error: 'F' was not declared in this scope

Serial.println(F("CAR: fault!"));

^

chademo.cpp:229:8: error: 'settings' was not declared in this scope

if (settings.debuggingLevel > 0)

^~~~~~~~

chademo.cpp:235:4: error: 'bListenEVSEStatus' was not declared in this scope

bListenEVSEStatus = 0; //don't want to pay attention to EVSE status when we're stopped

^~~~~~~~~~~~~~~~~

sketch\chademo.cpp: At global scope:

chademo.cpp:244:6: error: 'CHADEMO' has not been declared

void CHADEMO::doProcessing()

^~~~~~~

sketch\chademo.cpp: In function 'void doProcessing()':

chademo.cpp:246:2: error: 'uint8_t' was not declared in this scope

uint8_t tempCurrVal;

^~~~~~~

chademo.cpp:248:6: error: 'chademoState' was not declared in this scope

if (chademoState == RUNNING && ((CurrentMillis - lastCommTime) >= lastCommTime))

^~~~~~~~~~~~

chademo.cpp:248:22: error: 'RUNNING' was not declared in this scope

if (chademoState == RUNNING && ((CurrentMillis - lastCommTime) >= lastCommTime))

^~~~~~~

chademo.cpp:248:35: error: 'CurrentMillis' was not declared in this scope

if (chademoState == RUNNING && ((CurrentMillis - lastCommTime) >= lastCommTime))

^~~~~~~~~~~~~

chademo.cpp:248:51: error: 'lastCommTime' was not declared in this scope

if (chademoState == RUNNING && ((CurrentMillis - lastCommTime) >= lastCommTime))

^~~~~~~~~~~~

chademo.cpp:251:3: error: 'Serial' was not declared in this scope

Serial.println(F("EVSE comm fault! Commencing emergency shutdown!"));

^~~~~~

chademo.cpp:251:18: error: 'F' was not declared in this scope

Serial.println(F("EVSE comm fault! Commencing emergency shutdown!"));

^

chademo.cpp:254:18: error: 'OPEN_CONTACTOR' was not declared in this scope

chademoState = OPEN_CONTACTOR;

^~~~~~~~~~~~~~

chademo.cpp:257:6: error: 'chademoState' was not declared in this scope

if (chademoState == RUNNING && bDoMismatchChecks)

^~~~~~~~~~~~

chademo.cpp:257:22: error: 'RUNNING' was not declared in this scope

if (chademoState == RUNNING && bDoMismatchChecks)

^~~~~~~

chademo.cpp:257:33: error: 'bDoMismatchChecks' was not declared in this scope

if (chademoState == RUNNING && bDoMismatchChecks)

^~~~~~~~~~~~~~~~~

chademo.cpp:259:7: error: 'Voltage' was not declared in this scope

if (Voltage > settings.maxChargeVoltage && !carStatus.battOverVolt)

^~~~~~~

chademo.cpp:259:17: error: 'settings' was not declared in this scope

if (Voltage > settings.maxChargeVoltage && !carStatus.battOverVolt)

^~~~~~~~

chademo.cpp:259:47: error: 'carStatus' was not declared in this scope

if (Voltage > settings.maxChargeVoltage && !carStatus.battOverVolt)

^~~~~~~~~

chademo.cpp:261:4: error: 'vOverFault' was not declared in this scope

vOverFault++;

^~~~~~~~~~

chademo.cpp:264:5: error: 'Serial' was not declared in this scope

Serial.println(F("Over voltage fault!"));

^~~~~~

chademo.cpp:264:20: error: 'F' was not declared in this scope

Serial.println(F("Over voltage fault!"));

^

chademo.cpp:266:20: error: 'CEASE_CURRENT' was not declared in this scope

chademoState = CEASE_CURRENT;

^~~~~~~~~~~~~

chademo.cpp:269:8: error: 'vOverFault' was not declared in this scope

else vOverFault = 0;

^~~~~~~~~~

chademo.cpp:274:6: error: 'Count' was not declared in this scope

if(Count==20)

^~~~~

chademo.cpp:276:8: error: 'evse_status' was not declared in this scope

if (evse_status.presentVoltage > settings.targetChargeVoltage-1) //All initializations complete and we're running.We've reached charging target

^~~~~~~~~~~

chademo.cpp:276:37: error: 'settings' was not declared in this scope

if (evse_status.presentVoltage > settings.targetChargeVoltage-1) //All initializations complete and we're running.We've reached charging target

^~~~~~~~

chademo.cpp:281:56: error: 'carStatus' was not declared in this scope

if (settings.minChargeAmperage == 0 || carStatus.targetCurrent < settings.minChargeAmperage){

^~~~~~~~~

chademo.cpp:286:36: error: 'CEASE_CURRENT' was not declared in this scope

chademoState = CEASE_CURRENT; //Terminate charging

^~~~~~~~~~~~~

chademo.cpp:292:9: error: 'carStatus' was not declared in this scope

if (carStatus.targetCurrent < settings.maxChargeAmperage) carStatus.targetCurrent++;

^~~~~~~~~

sketch\chademo.cpp: At global scope:

chademo.cpp:299:6: error: 'CHADEMO' has not been declared

void CHADEMO::handleCANFrame(CAN_FRAME &frame)

^~~~~~~

chademo.cpp:299:30: error: variable or field 'handleCANFrame' declared void

void CHADEMO::handleCANFrame(CAN_FRAME &frame)

^~~~~~~~~

chademo.cpp:299:30: error: 'CAN_FRAME' was not declared in this scope

chademo.cpp:299:41: error: 'frame' was not declared in this scope

void CHADEMO::handleCANFrame(CAN_FRAME &frame)

^~~~~

chademo.cpp:460:6: error: 'CHADEMO' has not been declared

void CHADEMO::sendCANBattSpecs()

^~~~~~~

sketch\chademo.cpp: In function 'void sendCANBattSpecs()':

chademo.cpp:462:2: error: 'CAN_FRAME' was not declared in this scope

CAN_FRAME outFrame;

^~~~~~~~~

chademo.cpp:463:2: error: 'outFrame' was not declared in this scope

outFrame.id = CARSIDE_BATT_ID;

^~~~~~~~

chademo.cpp:463:16: error: 'CARSIDE_BATT_ID' was not declared in this scope

outFrame.id = CARSIDE_BATT_ID;

^~~~~~~~~~~~~~~

chademo.cpp:470:34: error: 'settings' was not declared in this scope

outFrame.data.byte[4] = lowByte(settings.maxChargeVoltage);

^~~~~~~~

chademo.cpp:470:26: error: 'lowByte' was not declared in this scope

outFrame.data.byte[4] = lowByte(settings.maxChargeVoltage);

^~~~~~~

chademo.cpp:471:26: error: 'highByte' was not declared in this scope

outFrame.data.byte[5] = highByte(settings.maxChargeVoltage);

^~~~~~~~

chademo.cpp:472:27: error: 'uint8_t' was not declared in this scope

outFrame.data.byte[6] = (uint8_t)settings.packSizeKWH;

^~~~~~~

chademo.cpp:475:2: error: 'CAN' was not declared in this scope

CAN.sendFrame(outFrame);

^~~

chademo.cpp:478:3: error: 'Serial' was not declared in this scope

Serial.print(F("CAR: Absolute MAX Voltage:"));

^~~~~~

chademo.cpp:478:16: error: 'F' was not declared in this scope

Serial.print(F("CAR: Absolute MAX Voltage:"));

^

sketch\chademo.cpp: At global scope:

chademo.cpp:487:6: error: 'CHADEMO' has not been declared

void CHADEMO::sendCANChargingTime()

^~~~~~~

sketch\chademo.cpp: In function 'void sendCANChargingTime()':

chademo.cpp:489:2: error: 'CAN_FRAME' was not declared in this scope

CAN_FRAME outFrame;

^~~~~~~~~

chademo.cpp:490:2: error: 'outFrame' was not declared in this scope

outFrame.id = CARSIDE_CHARGETIME_ID;

^~~~~~~~

chademo.cpp:490:16: error: 'CARSIDE_CHARGETIME_ID' was not declared in this scope

outFrame.id = CARSIDE_CHARGETIME_ID;

^~~~~~~~~~~~~~~~~~~~~

chademo.cpp:502:2: error: 'CAN' was not declared in this scope

CAN.sendFrame(outFrame);

^~~

chademo.cpp:503:9: error: 'settings' was not declared in this scope

if (settings.debuggingLevel > 1)

^~~~~~~~

chademo.cpp:505:9: error: 'Serial' was not declared in this scope

Serial.print(F("CAR: Charging Time"));

^~~~~~

chademo.cpp:505:22: error: 'F' was not declared in this scope

Serial.print(F("CAR: Charging Time"));

^

sketch\chademo.cpp: At global scope:

chademo.cpp:511:6: error: 'CHADEMO' has not been declared

void CHADEMO::sendCANStatus()

^~~~~~~

sketch\chademo.cpp: In function 'void sendCANStatus()':

chademo.cpp:513:2: error: 'uint8_t' was not declared in this scope

uint8_t faults = 0;

^~~~~~~

chademo.cpp:514:10: error: expected ';' before 'status'

uint8_t status = 0;

^~~~~~

chademo.cpp:515:2: error: 'CAN_FRAME' was not declared in this scope

CAN_FRAME outFrame;

^~~~~~~~~

chademo.cpp:516:2: error: 'outFrame' was not declared in this scope

outFrame.id = CARSIDE_CONTROL_ID;

^~~~~~~~

chademo.cpp:516:16: error: 'CARSIDE_CONTROL_ID' was not declared in this scope

outFrame.id = CARSIDE_CONTROL_ID;

^~~~~~~~~~~~~~~~~~

chademo.cpp:519:6: error: 'carStatus' was not declared in this scope

if (carStatus.battOverTemp) faults |= CARSIDE_FAULT_OVERT;

^~~~~~~~~

chademo.cpp:519:30: error: 'faults' was not declared in this scope

if (carStatus.battOverTemp) faults |= CARSIDE_FAULT_OVERT;

^~~~~~

sketch\chademo.cpp:519:30: note: suggested alternative: 'auto'

if (carStatus.battOverTemp) faults |= CARSIDE_FAULT_OVERT;

^~~~~~

auto

chademo.cpp:519:40: error: 'CARSIDE_FAULT_OVERT' was not declared in this scope

if (carStatus.battOverTemp) faults |= CARSIDE_FAULT_OVERT;

^~~~~~~~~~~~~~~~~~~

chademo.cpp:520:6: error: 'carStatus' was not declared in this scope

if (carStatus.battOverVolt) faults |= CARSIDE_FAULT_OVERV;

^~~~~~~~~

chademo.cpp:520:30: error: 'faults' was not declared in this scope

if (carStatus.battOverVolt) faults |= CARSIDE_FAULT_OVERV;

^~~~~~

sketch\chademo.cpp:520:30: note: suggested alternative: 'auto'

if (carStatus.battOverVolt) faults |= CARSIDE_FAULT_OVERV;

^~~~~~

auto

chademo.cpp:520:40: error: 'CARSIDE_FAULT_OVERV' was not declared in this scope

if (carStatus.battOverVolt) faults |= CARSIDE_FAULT_OVERV;

^~~~~~~~~~~~~~~~~~~

chademo.cpp:521:6: error: 'carStatus' was not declared in this scope

if (carStatus.battUnderVolt) faults |= CARSIDE_FAULT_UNDERV;

^~~~~~~~~

chademo.cpp:521:31: error: 'faults' was not declared in this scope

if (carStatus.battUnderVolt) faults |= CARSIDE_FAULT_UNDERV;

^~~~~~

sketch\chademo.cpp:521:31: note: suggested alternative: 'auto'

if (carStatus.battUnderVolt) faults |= CARSIDE_FAULT_UNDERV;

^~~~~~

auto

chademo.cpp:521:41: error: 'CARSIDE_FAULT_UNDERV' was not declared in this scope

if (carStatus.battUnderVolt) faults |= CARSIDE_FAULT_UNDERV;

^~~~~~~~~~~~~~~~~~~~

chademo.cpp:522:6: error: 'carStatus' was not declared in this scope

if (carStatus.currDeviation) faults |= CARSIDE_FAULT_CURR;

^~~~~~~~~

chademo.cpp:522:31: error: 'faults' was not declared in this scope

if (carStatus.currDeviation) faults |= CARSIDE_FAULT_CURR;

^~~~~~

sketch\chademo.cpp:522:31: note: suggested alternative: 'auto'

if (carStatus.currDeviation) faults |= CARSIDE_FAULT_CURR;

^~~~~~

auto

chademo.cpp:522:41: error: 'CARSIDE_FAULT_CURR' was not declared in this scope

if (carStatus.currDeviation) faults |= CARSIDE_FAULT_CURR;

^~~~~~~~~~~~~~~~~~

chademo.cpp:523:6: error: 'carStatus' was not declared in this scope

if (carStatus.voltDeviation) faults |= CARSIDE_FAULT_VOLTM;

^~~~~~~~~

chademo.cpp:523:31: error: 'faults' was not declared in this scope

if (carStatus.voltDeviation) faults |= CARSIDE_FAULT_VOLTM;

^~~~~~

sketch\chademo.cpp:523:31: note: suggested alternative: 'auto'

if (carStatus.voltDeviation) faults |= CARSIDE_FAULT_VOLTM;

^~~~~~

auto

chademo.cpp:523:41: error: 'CARSIDE_FAULT_VOLTM' was not declared in this scope

if (carStatus.voltDeviation) faults |= CARSIDE_FAULT_VOLTM;

^~~~~~~~~~~~~~~~~~~

chademo.cpp:525:6: error: 'carStatus' was not declared in this scope

if (carStatus.chargingEnabled) status |= CARSIDE_STATUS_CHARGE;

^~~~~~~~~

chademo.cpp:525:33: error: 'status' was not declared in this scope

if (carStatus.chargingEnabled) status |= CARSIDE_STATUS_CHARGE;

^~~~~~

sketch\chademo.cpp:525:33: note: suggested alternative: 'static'

if (carStatus.chargingEnabled) status |= CARSIDE_STATUS_CHARGE;

^~~~~~

static

chademo.cpp:525:43: error: 'CARSIDE_STATUS_CHARGE' was not declared in this scope

if (carStatus.chargingEnabled) status |= CARSIDE_STATUS_CHARGE;

^~~~~~~~~~~~~~~~~~~~~

chademo.cpp:526:6: error: 'carStatus' was not declared in this scope

if (carStatus.notParked) status |= CARSIDE_STATUS_NOTPARK;

^~~~~~~~~

chademo.cpp:526:27: error: 'status' was not declared in this scope

if (carStatus.notParked) status |= CARSIDE_STATUS_NOTPARK;

^~~~~~

sketch\chademo.cpp:526:27: note: suggested alternative: 'static'

if (carStatus.notParked) status |= CARSIDE_STATUS_NOTPARK;

^~~~~~

static

chademo.cpp:526:37: error: 'CARSIDE_STATUS_NOTPARK' was not declared in this scope

if (carStatus.notParked) status |= CARSIDE_STATUS_NOTPARK;

^~~~~~~~~~~~~~~~~~~~~~

chademo.cpp:527:6: error: 'carStatus' was not declared in this scope

if (carStatus.chargingFault) status |= CARSIDE_STATUS_MALFUN;

^~~~~~~~~

chademo.cpp:527:31: error: 'status' was not declared in this scope

if (carStatus.chargingFault) status |= CARSIDE_STATUS_MALFUN;

^~~~~~

sketch\chademo.cpp:527:31: note: suggested alternative: 'static'

if (carStatus.chargingFault) status |= CARSIDE_STATUS_MALFUN;

^~~~~~

static

chademo.cpp:527:41: error: 'CARSIDE_STATUS_MALFUN' was not declared in this scope

if (carStatus.chargingFault) status |= CARSIDE_STATUS_MALFUN;

^~~~~~~~~~~~~~~~~~~~~

chademo.cpp:528:6: error: 'bChademo10Protocol' was not declared in this scope

if (bChademo10Protocol)

^~~~~~~~~~~~~~~~~~

chademo.cpp:530:7: error: 'carStatus' was not declared in this scope

if (carStatus.contactorOpen) status |= CARSIDE_STATUS_CONTOP;

^~~~~~~~~

chademo.cpp:530:32: error: 'status' was not declared in this scope

if (carStatus.contactorOpen) status |= CARSIDE_STATUS_CONTOP;

^~~~~~

sketch\chademo.cpp:530:32: note: suggested alternative: 'static'

if (carStatus.contactorOpen) status |= CARSIDE_STATUS_CONTOP;

^~~~~~

static

chademo.cpp:530:42: error: 'CARSIDE_STATUS_CONTOP' was not declared in this scope

if (carStatus.contactorOpen) status |= CARSIDE_STATUS_CONTOP;

^~~~~~~~~~~~~~~~~~~~~

chademo.cpp:531:7: error: 'carStatus' was not declared in this scope

if (carStatus.stopRequest) status |= CARSIDE_STATUS_CHSTOP;

^~~~~~~~~

chademo.cpp:531:30: error: 'status' was not declared in this scope

if (carStatus.stopRequest) status |= CARSIDE_STATUS_CHSTOP;

^~~~~~

sketch\chademo.cpp:531:30: note: suggested alternative: 'static'

if (carStatus.stopRequest) status |= CARSIDE_STATUS_CHSTOP;

^~~~~~

static

chademo.cpp:531:40: error: 'CARSIDE_STATUS_CHSTOP' was not declared in this scope

if (carStatus.stopRequest) status |= CARSIDE_STATUS_CHSTOP;

^~~~~~~~~~~~~~~~~~~~~

chademo.cpp:534:6: error: 'bChademo10Protocol' was not declared in this scope

if (bChademo10Protocol) outFrame.data.byte[0] = 2; //tell EVSE we are talking 1.0 protocol

^~~~~~~~~~~~~~~~~~

chademo.cpp:536:34: error: 'carStatus' was not declared in this scope

outFrame.data.byte[1] = lowByte(carStatus.targetVoltage);

^~~~~~~~~

chademo.cpp:536:26: error: 'lowByte' was not declared in this scope

outFrame.data.byte[1] = lowByte(carStatus.targetVoltage);

^~~~~~~

chademo.cpp:537:26: error: 'highByte' was not declared in this scope

outFrame.data.byte[2] = highByte(carStatus.targetVoltage);

^~~~~~~~

chademo.cpp:538:26: error: 'askingAmps' was not declared in this scope

outFrame.data.byte[3] = askingAmps;

^~~~~~~~~~

chademo.cpp:539:26: error: 'faults' was not declared in this scope

outFrame.data.byte[4] = faults;

^~~~~~

sketch\chademo.cpp:539:26: note: suggested alternative: 'auto'

outFrame.data.byte[4] = faults;

^~~~~~

auto

chademo.cpp:540:26: error: 'status' was not declared in this scope

outFrame.data.byte[5] = status;

^~~~~~

sketch\chademo.cpp:540:26: note: suggested alternative: 'static'

outFrame.data.byte[5] = status;

^~~~~~

static

chademo.cpp:544:2: error: 'CAN' was not declared in this scope

CAN.sendFrame(outFrame);

^~~

chademo.cpp:546:6: error: 'settings' was not declared in this scope

if (settings.debuggingLevel > 1)

^~~~~~~~

chademo.cpp:548:3: error: 'Serial' was not declared in this scope

Serial.print(F("CAR: Protocol:"));

^~~~~~

chademo.cpp:548:16: error: 'F' was not declared in this scope

Serial.print(F("CAR: Protocol:"));

^

chademo.cpp:557:23: error: 'BIN' was not declared in this scope

Serial.print(faults,BIN);

^~~

chademo.cpp:565:6: error: 'chademoState' was not declared in this scope

if (chademoState == RUNNING && askingAmps < carStatus.targetCurrent)

^~~~~~~~~~~~

chademo.cpp:565:22: error: 'RUNNING' was not declared in this scope

if (chademoState == RUNNING && askingAmps < carStatus.targetCurrent)

^~~~~~~

chademo.cpp:568:34: error: 'evse_status' was not declared in this scope

int offsetError = askingAmps - evse_status.presentCurrent;

^~~~~~~~~~~

chademo.cpp:574:6: error: 'chademoState' was not declared in this scope

if (chademoState != RUNNING && askingAmps > 0) askingAmps--;

^~~~~~~~~~~~

chademo.cpp:574:22: error: 'RUNNING' was not declared in this scope

if (chademoState != RUNNING && askingAmps > 0) askingAmps--;

^~~~~~~

sketch\chademo.cpp: At global scope:

chademo.cpp:580:1: error: 'CHADEMO' does not name a type

CHADEMO chademo;

^~~~~~~

Multiple libraries were found for "Wire.h"
Used: C:\Users\mdrobnak\Downloads\arduino-1.8.10\hardware\arduino\avr\libraries\Wire
Multiple libraries were found for "SPI.h"
Used: C:\Users\mdrobnak\Downloads\arduino-1.8.10\hardware\arduino\avr\libraries\SPI
Multiple libraries were found for "EEPROM.h"
Used: C:\Users\mdrobnak\Downloads\arduino-1.8.10\hardware\arduino\avr\libraries\EEPROM
Multiple libraries were found for "mcp_can.h"
Used: C:\Users\mdrobnak\Documents\Arduino\libraries\MCP_CAN_lib
Multiple libraries were found for "INA226.h"
Used: C:\Users\mdrobnak\Documents\Arduino\libraries\Arduino-INA226
Multiple libraries were found for "EEPROMAnything.h"
Used: C:\Users\mdrobnak\Documents\Arduino\libraries\EEPROMAnything
Multiple libraries were found for "SoftwareSerial.h"
Used: C:\Users\mdrobnak\Downloads\arduino-1.8.10\hardware\arduino\avr\libraries\SoftwareSerial
Not used: C:\Users\mdrobnak\Documents\Arduino\libraries\EspSoftwareSerial
Multiple libraries were found for "FrequencyTimer2.h"
Used: C:\Users\mdrobnak\Documents\Arduino\libraries\FrequencyTimer2
exit status 1
'Print' does not name a type; did you mean 'int'?

User avatar
mdrobnak
Posts: 692
Joined: Thu Mar 05, 2020 5:08 pm
Location: Colorado, United States
Has thanked: 1 time
Been thanked: 5 times

Re: Arduino IDE board target / getting started?

Post by mdrobnak »

And if I put #include "chademo.h" back in the cpp file too:
In file included from sketch\chademo.cpp:5:0:

chademo.h:95:22: error: 'CAN_FRAME' has not been declared

void handleCANFrame(CAN_FRAME &frame);

^~~~~~~~~

chademo.cpp:299:30: error: variable or field 'handleCANFrame' declared void

void CHADEMO::handleCANFrame(CAN_FRAME &frame)
I...am not a fan of this half-abstraction weirdness that is Arduino.
User avatar
Jack Bauer
Posts: 3663
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 11 times
Been thanked: 344 times
Contact:

Re: Arduino IDE board target / getting started?

Post by Jack Bauer »

Arduino has become quite a nightmare for me of late. It's usually down to someone writing code based on a particular library that then gets updated so when someone comes along later, grabs what they think is the right library and tries to compile, it sits there looking at you. Most recent example is Tom's bmwphev bms code. If I update the libraries, it compiles but then breaks the volt and i3 bms compilation...

Anyway, the chademo code was originally written in 2015 when I worked with evtv to get the E39 charging. Problem is, since then it was never really finished, got a few tweaks here and there by various parties along the way, some released, some not and is just a total mess job right now. I do have it working in the E31 but really what it needs is a rewrite. Johannes did a version for the stm32 for his project to the ebst of my knowledge :
https://github.com/jsphuebner/stm32-car
I'm going to need a hacksaw
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 2 times
Contact:

Re: Arduino IDE board target / getting started?

Post by Isaac96 »

Yeah Arduino really needs some way to make virtual environments with specific libraries. Like venv for Python. I've had to modify libraries for my own use (because I don't know how to make a library use defaults when passing some arguments) and so my code is always a little off.

Matt, what does your directory structure look like? Seems like the compiler is getting confused by different layers of folders. My original advice came from looking at Damien's github and its structure. Generally you want the .cpp and .h files in the same folder as the .ino, then they open along with the sketch and you can edit all at once without causing other problems.

-Isaac
User avatar
mdrobnak
Posts: 692
Joined: Thu Mar 05, 2020 5:08 pm
Location: Colorado, United States
Has thanked: 1 time
Been thanked: 5 times

Re: Arduino IDE board target / getting started?

Post by mdrobnak »

Ok, so I stepped back..and downloaded the mcp_can from collin80's repo.
I set the board to an Arduino nano.

Now I'm going to move that all out of the way, and re-extract from Damien's repo, and note what needed to be changed...

* Download zip of Chademo-Fast-Charge-Controller.
* Extract Software folder into your Arduino sketches directory. Rename from Software to JLD505_TM2019
* Download mcp_can from collin80, extract into the libraries folder.
* Download https://github.com/collin80/EEPROMAnything .. same deal
* Download https://github.com/jarzebski/Arduino-INA226
* Download https://www.arduinolibraries.info/libra ... ncy-timer2
* Load project in Arduino
* Fix the two lines:
#include "src/globals.h"
#include "src/chademo.h"
Remove "src/"

And...that should produce a sketch that compiles.

Now to poke and prod.

-Matt

EDIT: Re-reading Isaac's original post - I missed that I didn't download the mcp_can from the right repo, so he was right from the get-go.

This is the equivalent of DLL hell. :) The issue is that there really are no docs with these 'libraries' as I am going to guess that a bunch of the people working on them are not professional software developers. Also documentation is the hardest part. :)
Post Reply