Comments (11)
from ina.
Hi,
I tried BackgroundRead also, with the library freshly installed and does not compile :
Compiling 'BackgroundRead' for 'Teensy 3.2 / 3.1'
BackgroundRead.ino: 71:5: error: expected constructor, destructor, or type conversion before '(' token
ISR (PCINT0_vect) { \ handle pin change interrupt D8
BackgroundRead.ino: In function void setup()
Error compiling project sources
Build failed for project 'BackgroundRead'
BackgroundRead.ino: 95:3: error: 'PCIFR' was not declared in this scope
PCIFR |= bit (digitalPinToPCICRbit(INA_ALERT_PIN)); \ clear any outstanding interrupt
BackgroundRead.ino: 96:3: error: 'PCICR' was not declared in this scope
PCICR |= bit (digitalPinToPCICRbit(INA_ALERT_PIN)); \ enable interrupt for the group
Using Visual Studio IDE.
Compiles OK selecting an Arduino Leonardo. It looks like port manupulation in teensy is different. Also I don not hace interrupts pins hooked up.
DisplayReadings compiles but it does not detect the INA226.
No INA device found, retrying in 10s...
No INA device found, retrying in 10s...
No INA device found, retrying in 10s...
SDA and SCL pins are correctly mapped by Wire.h looking at the scope.
from ina.
from ina.
Hello Arnd.
I added the code, and maxDevices is at 0. I forced maxDevices to 127 and it works OK, you are right, there are differences in the EEPROM implementation of the Teensy.
Thanks
from ina.
I added some #ifdefs to support the TEENSY boards to the code, that should work for your implementation now.
from ina.
Line 188 of the modified INA.cpp file has the variable type declaration missing:
uint8_t maxDevices = 2048 / sizeof(inaEE);
But stiil doesn't work in teensy 3.2, unless I assign maxDevices a fixed value.
from ina.
from ina.
Hi,
If I compile with line 188 in INA.ccp unmodified I get the following compiler error:
Compiling 'DisplayReadings' for 'Teensy 3.2 / 3.1'
INA.cpp: In member function uint8_t INA_Class::begin(uint8_t, uint32_t, uint8_t)
INA.cpp: 188:3: error: 'maxDevices' was not declared in this scope
maxDevices = 2048 \ sizeof(inaEE); \ defined, so use 2Kb as value
Error compiling libraries
Build failed for project 'DisplayReadings'
Looking at i2c_t3, made for teensy boards, they use the following definitions for detecting all board models:
#if defined(MK20DX128) || defined(MK20DX256) || defined(MKL26Z64) ||
defined(MK64FX512) || defined(MK66FX1M0) // 3.0/3.1-3.2/LC/3.5/3.6
#include "i2c_t3.h"
Thanks again
from ina.
The compiler error would seem to indicate that the branch in the #ifdef was taken correctly, but I've added the directives you listed above to the code and fixed the way that the variable "maxDevices" is declared. Can you check to see if the current version works correctly?
from ina.
Hi,
The problem is that 2048/ sizeof(inaEE) is 256, and maxDevices is 8 bit long, so making maxDevices a 16 bit integer or limiting maxDevices to 255 should work.
I modified it to:
maxDevices = 2048 / sizeof(inaEE)-1;
and works fine.
from ina.
Thanks for pointing out that error - I should start using those bigger boards to broaden my horizons from the much more resource-restricted Atmel processors.
from ina.
Related Issues (20)
- Allow an option for the library to not use EEPROM storage for INA-Structure information HOT 3
- INA3221 is supported, how to configure? HOT 7
- Settings for Shunt_Micro_Ohms and Max_Amps HOT 2
- {"One-Line descriptive question title"=>"INA233"} HOT 1
- INA228 Support HOT 50
- Hi Zanduino, Is it Possible to Integrate the INA237 ? Our requirement is to support 85V . HOT 4
- typo HOT 1
- Copy & paste error in Wiki HOT 4
- Max expected amps < 1A HOT 4
- Try to avoid EEPROM footprint HOT 1
- Use 0b111 instead of B111 HOT 5
- Power does not show negative values. HOT 4
- add support for INA239 HOT 1
- Wrong voltage reading with INA226
- Support for Atmega 4809
- Multiple devices does not work properly HOT 3
- Shunt voltage of 0.2mV when there's no load
- Shunt voltage calculation for INA260 uses wrong value
- Ina3221 alerts implementation
- INA233 Addition
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ina.