Hello,
I have an MMA8453 accelerometer and I made a code that works perfectly on an Arduino Nano 3 using MMA8453_n0m1.h library.
But now I need to use Attiny 1614 procesor...and I am haveing some problems whit proggraming Attiny 1614 procesor using MMA8453_n0m1.h library in code.
This is the error:
c:\Users\mijat\Documents\Arduino\libraries\MMA8453_n0m1\MMA8453_n0m1.cpp: In member function 'void MMA8453_n0m1::setI2CAddr(int)':
c:\Users\mijat\Documents\Arduino\libraries\MMA8453_n0m1\MMA8453_n0m1.cpp:58:21: warning: statement has no effect [-Wunused-value]
I2CAddr = address; I2CAddr;
^~~~~~~
c:\Users\mijat\Documents\Arduino\libraries\MMA8453_n0m1\MMA8453_n0m1.cpp: In member function 'void MMA8453_n0m1::clearInterrupt()':
c:\Users\mijat\Documents\Arduino\libraries\MMA8453_n0m1\MMA8453_n0m1.cpp:124:22: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
if(srcTrans&0x02 == 0x02)
~~~~~^~~~~~~
c:\Users\mijat\Documents\Arduino\libraries\MMA8453_n0m1\MMA8453_n0m1.cpp:128:22: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
if(srcTrans&0x08 == 0x08)
~~~~~^~~~~~~
c:\Users\mijat\Documents\Arduino\libraries\MMA8453_n0m1\MMA8453_n0m1.cpp:132:22: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
if(srcTrans&0x20 == 0x20)
~~~~~^~~~~~~
c:\Users\mijat\Documents\Arduino\libraries\MMA8453_n0m1\MMA8453_n0m1.cpp:141:13: warning: variable 'srcFF' set but not used [-Wunused-but-set-variable]
byte srcFF;
^~~~~
c:\Users\mijat\Documents\Arduino\libraries\MMA8453_n0m1\MMA8453_n0m1.cpp: In member function 'void MMA8453_n0m1::xyz(int&, int&, int&)':
c:\Users\mijat\Documents\Arduino\libraries\MMA8453_n0m1\MMA8453_n0m1.cpp:206:38: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
x = buf[0] << 2 | buf[1] >> 6 & 0x3;
~~~~~~~~~~~~^~~~~
c:\Users\mijat\Documents\Arduino\libraries\MMA8453_n0m1\MMA8453_n0m1.cpp:207:38: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
y = buf[2] << 2 | buf[3] >> 6 & 0x3;
~~~~~~~~~~~~^~~~~
c:\Users\mijat\Documents\Arduino\libraries\MMA8453_n0m1\MMA8453_n0m1.cpp:208:38: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
z = buf[4] << 2 | buf[5] >> 6 & 0x3;
~~~~~~~~~~~~^~~~~
c:\Users\mijat\Documents\Arduino\libraries\MMA8453_n0m1\MMA8453_n0m1.cpp: In function 'void accelISR()':
c:\Users\mijat\Documents\Arduino\libraries\MMA8453_n0m1\MMA8453_n0m1.cpp:730:6: warning: 'accelISR' appears to be a misspelled 'signal' handler, missing '__vector' prefix [-Wmisspelled-isr]
void accelISR(void){
^~~~~~~~
Compiling core...
Using precompiled core: C:\Users\mijat\AppData\Local\Temp\arduino\cores\5c54b9a6ae434ea86e3a422138f215c3\core.a
Linking everything together...
"C:\\Users\\mijat\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-gcc" -Wall -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -Wl,--section-start=.text=0x0 -mrelax -mmcu=attiny1614 -o "C:\\Users\\mijat\\AppData\\Local\\Temp\\arduino\\sketches\\68F94FB98ECA067816B1E900D155B287/sketch_oct10a-test_motio_moda.ino.elf" "C:\\Users\\mijat\\AppData\\Local\\Temp\\arduino\\sketches\\68F94FB98ECA067816B1E900D155B287\\sketch\\sketch_oct10a-test_motio_moda.ino.cpp.o" "C:\\Users\\mijat\\AppData\\Local\\Temp\\arduino\\sketches\\68F94FB98ECA067816B1E900D155B287\\libraries\\Wire\\Wire.cpp.o" "C:\\Users\\mijat\\AppData\\Local\\Temp\\arduino\\sketches\\68F94FB98ECA067816B1E900D155B287\\libraries\\Wire\\twi.c.o" "C:\\Users\\mijat\\AppData\\Local\\Temp\\arduino\\sketches\\68F94FB98ECA067816B1E900D155B287\\libraries\\Wire\\twi_pins.c.o" "C:\\Users\\mijat\\AppData\\Local\\Temp\\arduino\\sketches\\68F94FB98ECA067816B1E900D155B287\\libraries\\MMA8453_n0m1\\MMA8453_n0m1.cpp.o" "C:\\Users\\mijat\\AppData\\Local\\Temp\\arduino\\sketches\\68F94FB98ECA067816B1E900D155B287/..\\..\\cores\\5c54b9a6ae434ea86e3a422138f215c3\\core.a" "-LC:\\Users\\mijat\\AppData\\Local\\Temp\\arduino\\sketches\\68F94FB98ECA067816B1E900D155B287" -lm
In function 'accelISR':
c:\Users\mijat\Documents\Arduino\libraries\MMA8453_n0m1\MMA8453_n0m1.cpp:730:6: warning: 'accelISR' appears to be a misspelled 'signal' handler, missing '__vector' prefix [-Wmisspelled-isr]
void accelISR(void"C:\\Users\\mijat\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-objcopy" -O binary -R .eeprom "C:\\Users\\mijat\\AppData\\Local\\Temp\\arduino\\sketches\\68F94FB98ECA067816B1E900D155B287/sketch_oct10a-test_motio_moda.ino.elf" "C:\\Users\\mijat\\AppData\\Local\\Temp\\arduino\\sketches\\68F94FB98ECA067816B1E900D155B287/sketch_oct10a-test_motio_moda.ino.bin"
){
^
"C:\\Users\\mijat\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\mijat\\AppData\\Local\\Temp\\arduino\\sketches\\68F94FB98ECA067816B1E900D155B287/sketch_oct10a-test_motio_moda.ino.elf" "C:\\Users\\mijat\\AppData\\Local\\Temp\\arduino\\sketches\\68F94FB98ECA067816B1E900D155B287/sketch_oct10a-test_motio_moda.ino.eep"
"C:\\Users\\mijat\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\mijat\\AppData\\Local\\Temp\\arduino\\sketches\\68F94FB98ECA067816B1E900D155B287/sketch_oct10a-test_motio_moda.ino.elf" "C:\\Users\\mijat\\AppData\\Local\\Temp\\arduino\\sketches\\68F94FB98ECA067816B1E900D155B287/sketch_oct10a-test_motio_moda.ino.hex"
cmd /C echo. && "C:\\Users\\mijat\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-objdump" --disassemble --source --line-numbers --demangle --section=.text "C:\\Users\\mijat\\AppData\\Local\\Temp\\arduino\\sketches\\68F94FB98ECA067816B1E900D155B287/sketch_oct10a-test_motio_moda.ino.elf" > "C:\\Users\\mijat\\AppData\\Local\\Temp\\arduino\\sketches\\68F94FB98ECA067816B1E900D155B287/sketch_oct10a-test_motio_moda.ino.lst"
cmd /C echo. && "C:\\Users\\mijat\\AppData\\Local\\Arduino15\\packages\\DxCore\\tools\\avr-gcc\\7.3.0-atmel3.6.1-azduino6/bin/avr-nm" --numeric-sort --line-numbers --demangle --print-size --format=s "C:\\Users\\mijat\\AppData\\Local\\Temp\\arduino\\sketches\\68F94FB98ECA067816B1E900D155B287/sketch_oct10a-test_motio_moda.ino.elf" > "C:\\Users\\mijat\\AppData\\Local\\Temp\\arduino\\sketches\\68F94FB98ECA067816B1E900D155B287/sketch_oct10a-test_motio_moda.ino.map"