<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: i2cdevlib, mpu-6050 and maple ide</title>
		<link>http://forums.leaflabs.com/topic.php?id=74052</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:24:52 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=74052" rel="self" type="application/rss+xml" />

		<item>
			<title>cambazz on "i2cdevlib, mpu-6050 and maple ide"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74052#post-104777</link>
			<pubDate>Sun, 13 Oct 2013 06:49:50 +0000</pubDate>
			<dc:creator>cambazz</dc:creator>
			<guid isPermaLink="false">104777@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Well the program runs on maple mini, unfortunately, only producing output with all values that are 0. It can not connect and identify the mpu6050. upon further testing I found out that:&#60;/p&#62;
&#60;p&#62;bool MPU6050::testConnection() {&#60;br /&#62;
    return getDeviceID() == 0x34;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;always returns false, since deviceID is always zero. I am suspecting the i2c is not working as it is supposed to be.&#60;/p&#62;
&#60;p&#62;Best Regards,&#60;br /&#62;
C.B.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cambazz on "i2cdevlib, mpu-6050 and maple ide"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74052#post-104776</link>
			<pubDate>Sun, 13 Oct 2013 05:59:32 +0000</pubDate>
			<dc:creator>cambazz</dc:creator>
			<guid isPermaLink="false">104776@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;So I progressed even more: I had to add:&#60;/p&#62;
&#60;p&#62;#include &#38;lt;stdint.h&#38;gt;&#60;br /&#62;
#include &#38;lt;stdlib.h&#38;gt;&#60;br /&#62;
#include &#38;lt;string.h&#38;gt;&#60;br /&#62;
#include &#34;MPU6050.h&#34;&#60;/p&#62;
&#60;p&#62;typedef const unsigned char prog_uchar;&#60;br /&#62;
#define pgm_read_byte_near(x) (*(prog_uchar*)x)&#60;br /&#62;
#define pgm_read_byte(x) (*(prog_uchar*)x)&#60;/p&#62;
&#60;p&#62;The first 3 includes takes care of malloc, free and memcmp, while the typedefs redefine this pgm_read_byte function. (this declaration was on leaflabs docs)&#60;/p&#62;
&#60;p&#62;So when I compile the program I get the output below:&#60;/p&#62;
&#60;p&#62;Going to build using 'armcompiler' (ARM)&#60;br /&#62;
	Compiling core...&#60;br /&#62;
	Compiling libraries: Wire&#60;br /&#62;
	Compiling the sketch...&#60;/p&#62;
&#60;p&#62; In member function 'bool MPU6050::writeMemoryBlock(const uint8_t*, uint16_t, uint8_t, uint8_t, bool, bool)':&#60;br /&#62;
 In member function 'bool MPU6050::writeDMPConfigurationSet(const uint8_t*, uint16_t, bool)':&#60;/p&#62;
&#60;p&#62;	Linking...&#60;br /&#62;
	Computing sketch size...&#60;/p&#62;
&#60;p&#62;C:\Users\seg\AppData\Local\Temp\build5555698171104260142.tmp\MPU51.cpp.bin  :&#60;br /&#62;
section    size   addr&#60;br /&#62;
.data   17600      0&#60;br /&#62;
Total   17600&#60;/p&#62;
&#60;p&#62;Binary sketch size is reported above. Check it against a 108000 byte maximum.&#60;/p&#62;
&#60;p&#62;--&#60;/p&#62;
&#60;p&#62;the part which it complains about writeMemoryBlock, writeDMPConfigurationSet - is in red. I dont know what this means. I will actually hookup the circuit now, and test if it really works.&#60;/p&#62;
&#60;p&#62;However the i2c implementation is still in question.&#60;/p&#62;
&#60;p&#62;Best Regards,&#60;br /&#62;
-C.B.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cambazz on "i2cdevlib, mpu-6050 and maple ide"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74052#post-104774</link>
			<pubDate>Sat, 12 Oct 2013 16:11:18 +0000</pubDate>
			<dc:creator>cambazz</dc:creator>
			<guid isPermaLink="false">104774@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;So I fixed things more, by including wire.h on the cpp files. now the mpu6050 needs things like malloc, memcp, and free - This could be a naive attempt, but I am trying to port it by fixing errors. malloc and memcmp has to do with memory allocation and i am not sure if it is the same in maple.&#60;/p&#62;
&#60;p&#62;Best regards,&#60;br /&#62;
C.B.&#60;/p&#62;
&#60;p&#62;&#38;lt;BUILD&#38;gt;\MPU6050.cpp:2975: error: 'malloc' was not declared in this scope&#60;br /&#62;
&#38;lt;BUILD&#38;gt;\MPU6050.cpp:2988: error: 'pgm_read_byte' was not declared in this scope&#60;br /&#62;
&#38;lt;BUILD&#38;gt;\MPU6050.cpp:3001: error: 'memcmp' was not declared in this scope&#60;br /&#62;
&#38;lt;BUILD&#38;gt;\MPU6050.cpp:3019: error: 'free' was not declared in this scope
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cambazz on "i2cdevlib, mpu-6050 and maple ide"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74052#post-104773</link>
			<pubDate>Sat, 12 Oct 2013 15:49:26 +0000</pubDate>
			<dc:creator>cambazz</dc:creator>
			<guid isPermaLink="false">104773@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;So this fixed my problem, and I am trying to make this library with maple. &#60;/p&#62;
&#60;p&#62;This library uses arduino's wire library, and there are different implementations of using Wire depending on the arduino version. What is the proper way to use i2c in maple?&#60;br /&#62;
Would it be really diffucult to port this to the lowlevel i2c as in maplelib?&#60;/p&#62;
&#60;p&#62;Also, from cpp files we have in the project it can not call millis() and Wire.xx - am I mussing another include?&#60;/p&#62;
&#60;p&#62;Best regards,&#60;br /&#62;
C.B.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "i2cdevlib, mpu-6050 and maple ide"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74052#post-104770</link>
			<pubDate>Sat, 12 Oct 2013 12:05:32 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">104770@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;cambazz int8_t, uint8_t, uint16_t etc are defined in the header stdint.h.&#60;/p&#62;
&#60;p&#62;So put&#60;br /&#62;
&#60;code&#62;#include &#38;lt;stdint.h&#38;gt;&#60;/code&#62;&#60;br /&#62;
near the top of your source code.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cambazz on "i2cdevlib, mpu-6050 and maple ide"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74052#post-104769</link>
			<pubDate>Sat, 12 Oct 2013 11:08:30 +0000</pubDate>
			<dc:creator>cambazz</dc:creator>
			<guid isPermaLink="false">104769@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I am trying to get the code for the mpu 6050 accelmeter + gyro with mapleboard. Although there are many ways of doing this, I would like to get this code running: &#60;a href=&#34;https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050&#34; rel=&#34;nofollow&#34;&#62;https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;So basically, I have copied I2Cdev.cpp and I2Cdev.h, along with MPU6050.cpp and MPU6050.h, and tried to verify the code, and I get bunch of errors. Namely:&#60;/p&#62;
&#60;p&#62;&#38;lt;BUILD&#38;gt;/I2Cdev.h:94: error: 'int8_t' does not name a type&#60;br /&#62;
&#38;lt;BUILD&#38;gt;/I2Cdev.h:95: error: 'int8_t' does not name a type&#60;br /&#62;
&#38;lt;BUILD&#38;gt;/I2Cdev.h:96: error: 'int8_t' does not name a type&#60;br /&#62;
&#38;lt;BUILD&#38;gt;/I2Cdev.h:97: error: 'int8_t' does not name a type&#60;br /&#62;
&#38;lt;BUILD&#38;gt;/I2Cdev.h:98: error: 'int8_t' does not name a type&#60;br /&#62;
&#38;lt;BUILD&#38;gt;/I2Cdev.h:99: error: 'int8_t' does not name a type&#60;br /&#62;
&#38;lt;BUILD&#38;gt;/I2Cdev.h:100: error: 'int8_t' does not name a type&#60;br /&#62;
&#38;lt;BUILD&#38;gt;/I2Cdev.h:101: error: 'int8_t' does not name a type&#60;br /&#62;
&#38;lt;BUILD&#38;gt;/I2Cdev.h:103: error: 'uint8_t' has not been declared&#60;br /&#62;
&#38;lt;BUILD&#38;gt;/I2Cdev.h:103: error: 'uint8_t' has not been declared&#60;br /&#62;
&#38;lt;BUILD&#38;gt;/I2Cdev.h:103: error: 'uint8_t' has not been declared&#60;br /&#62;
&#38;lt;BUILD&#38;gt;/I2Cdev.h:103: error: 'uint8_t' has not been declared&#60;br /&#62;
&#38;lt;BUILD&#38;gt;/I2Cdev.h:104: error: 'uint8_t' has not been declared&#60;br /&#62;
&#38;lt;BUILD&#38;gt;/I2Cdev.h:104: error: 'uint8_t' has not been declared&#60;br /&#62;
&#38;lt;BUILD&#38;gt;/I2Cdev.h:104: error: 'uint8_t' has not been declared&#60;br /&#62;
&#38;lt;BUILD&#38;gt;/I2Cdev.h:104: error: 'uint16_t' has not been declared&#60;/p&#62;
&#60;p&#62;So are there no uint8_t, uint16_t, int8_t in maple ide? or am I getting something wrong?&#60;/p&#62;
&#60;p&#62;Best Regards,&#60;br /&#62;
C.B.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
