Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic I2C error (Read 2567 times)
YO_BE
Newbies
*
Offline


Posts: 9
Joined: Jan 4th, 2016
I2C error
Jan 5th, 2016 at 7:42am
Print Post  
Hi,

When compiling a working program with I2C comm, I get this error message.

Program:
#include <DTWI.h>
#include <Wire.h>
#include "Kalman.h"
Kalman kalmanX; // Create the Kalman instances
Kalman kalmanY;
.
.
.
void setup() {  
  Serial.begin(115200);
  Serial1.begin(115200);
  Wire.begin();
 
  while(i2cWrite(0x19,i2cData,4,false)); // Write to all four registers at once  => Error!!

Error:
Compiling debug version of 'MPU6050_and_to_process_tool' for 'chipKIT UNO32'
MPU6050_and_to_process_tool.pde:In function 'void setup()
MPU6050_and_to_process_tool.pde:52:36: error: 'i2cWrite' was not declared in this scope
MPU6050_and_to_process_tool.pde:53:30: error: 'i2cWrite' was not declared in this scope
MPU6050_and_to_process_tool.pde:56:29: error: 'i2cRead' was not declared in this scope
MPU6050_and_to_process_tool.pde:65:29: error: 'i2cRead' was not declared in this scope
MPU6050_and_to_process_tool.pde:69:30: error: 'i2cWrite' was not declared in this scope
MPU6050_and_to_process_tool.pde:In function 'void loop()
MPU6050_and_to_process_tool.pde:91:30: error: 'i2cRead' was not declared in this scope
Error compiling project sources

I think Im sure the right library is included... works perfect in MPIDE....
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: I2C error
Reply #1 - Jan 5th, 2016 at 12:38pm
Print Post  
Haven't tested MPIDE for a while because they are dumping it and have created proper Arduino 1.6 compatible cores.

The release notes for September show this :- Support for Mpide 150 and also the beta of the new chipKIT-core. Install either Arduino 1.6 or Arduino.org 1.7 to use the chipKIT-core

You can see the chipKIT core release and wki here http://chipkit.net/wiki/index.php?title=ChipKIT_core

This is also inline with your other question about other hardware/stm32. If you install Arduino 1.6 and work with that structure you will find a wide world of compatible alternative cores.

If you would like the MPIDE issue to be investigated you can switch on "Visual Micro>verbose" and attach or email the output. This will show us exactly what you have configure, what versions you are using and what the compiler is doing.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint