h3mp's Content - Netduino Forums
   
Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

h3mp's Content

There have been 12 items by h3mp (Search limited from 17-April 23)


By content type

See this member's

Sort by                Order  

#61886 Netduino runs faster when debugging

Posted by h3mp on 17 March 2015 - 07:57 AM in Netduino 2 (and Netduino 1)

Or just select "Release" configuration. It will auto remove the Debug when building the app.

 

I'm pretty sure i did that and it did not help




#61758 Netduino runs faster when debugging

Posted by h3mp on 02 March 2015 - 07:55 AM in Netduino 2 (and Netduino 1)

OK, all fixed now thanks..

 

I just replaced all instances of Debug.Print with a function called "DebugPrint", then i have a global bool i can toggle to compile with the debug output turned off.. now running at full speed:

 

static bool inDebug = false;
 
        public static void DebugPrint(string output)
        {
            if (inDebug)            
                Debug.Print(output);
        }



#61754 I2C not working on plus 2 (or regular 2)

Posted by h3mp on 01 March 2015 - 09:39 PM in Netduino Plus 2 (and Netduino Plus 1)

I think the sensor has 10k pullups on it, I guess to move forwards i should look at it on a scope and logic analyser then post the results here.. was just hoping someone would magically know why it doesn't work on the new boards! :-)




#61753 Netduino runs faster when debugging

Posted by h3mp on 01 March 2015 - 09:36 PM in Netduino 2 (and Netduino 1)

so if i remove the debug output it should go back to full speed - i shall try this in the morning..




#61748 Netduino runs faster when debugging

Posted by h3mp on 01 March 2015 - 04:22 PM in Netduino 2 (and Netduino 1)

..just an observation which I dont understand!

 

I have a simple program running at the moment that just reads a sensor and writes the result to a serial port...

every time it goes around the loop it toggles between two LEDs

 

while (true)

{

ToggleTwoLEDs();

ReadSensor();

WriteResultToSerialPort();

}

 

while running in visual studio the loop runs very quickly, when i stop debugging the LEDs toggling reduces to about quarter the speed (according to my eyes)..

 

what is going on?

 

 




#61691 I2C on original netduino not reading multiple bytes

Posted by h3mp on 22 February 2015 - 01:38 PM in Netduino 2 (and Netduino 1)

Thanks IceMan..

 

I had missed that in the datasheet.. it states:

 

 

“The I2C embedded inside the LSM9DS0 behaves like a slave device and the following protocol must be adhered to. After the start condition (ST) a slave address is sent, once a slave acknowledge (SAK) has been returned, an 8-bit sub-address (SUB) will be transmitted: the 7 LSb represents the actual register address while the MSB enables the address auto increment. If the MSb of the SUB field is ‘1’, the SUB (register address) will be automatically increased to allow multiple data read/writes.”

 

so or'ing in the MSB 1 works great thanks  :D




#61660 I2C not working on plus 2 (or regular 2)

Posted by h3mp on 19 February 2015 - 03:36 PM in Netduino Plus 2 (and Netduino Plus 1)

yes, thats the only change ive made when moving the electronics from the old to the new, SCLon SC rather than A5, SDA on SD rather than on A4




#61658 I2C not working on plus 2 (or regular 2)

Posted by h3mp on 19 February 2015 - 02:53 PM in Netduino Plus 2 (and Netduino Plus 1)

I have an app on the netduino1 which reads a LSM9DS0 sensor - all works fine.

 

Tried it on the netduino-plus2 (and netduino2) and neither get any i2c data back.

 

i've re-wired a5 to sc and a4 to sd, surely this is all i need to do for it to work!?




#61646 I2C on original netduino not reading multiple bytes

Posted by h3mp on 17 February 2015 - 10:21 PM in Netduino 2 (and Netduino 1)

I'm new to I2C so apologies in advance  :D

 

I'm trying to read multiple registers at once from a LSM9DS0 accelerometer/gyro/compass chip..

 

Each sensor has 6 registers in a row that return X/Y/Z high and low bytes.. so i should be able to use the I2C_ADDRESS of the chip's XM sensor, then point a 'read' at the first of the 6 registers then i was hoping that would return an array of that register plus the next 5..

 

I use code based on this following example i found on the web:


I2CDevice.Configuration config = new I2CDevice.Configuration(I2C_ADDRESS, I2C_CLOCK_RATE_KHZ);
I2CDevice i2c = new I2CDevice(config);

byte write = { AddressOfFirstRegisterIneed };
byte read = new byte[6]; //surely this should return the first and subsequent 5 registers?
// create I2C write and read transaction
I2CDevice.I2CTransaction i2cTx = new I2CDevice.I2CTransaction[2];
i2cTx[0] = I2CDevice.CreateWriteTransaction(write);
i2cTx[1] = I2CDevice.CreateReadTransaction(read);
// execution
i2c.Execute(i2cTx, I2C_TIMEOUT);

 

..what i get back is an array of bytes all containing the same value!? (there should be 6 distinct values returned).

 

if i do 6 separate transactions one after another reading just 1 byte, then i can return all 6 registers successfully..

 

but as they are all in a row should i not be able to do all this in one transaction?  :wacko:

 

(i'm doing this on my old Netduino 1 that is probably running 4.2.0 update1 as i didnt have any newer netduinos in my office today)

 

 

 




#60938 Beta: Visual Studio 2013 support

Posted by h3mp on 10 December 2014 - 12:05 PM in Visual Studio

...

 

 

can you fix this download link please Chris  :(




#60912 Beta: Visual Studio 2013 support

Posted by h3mp on 08 December 2014 - 11:09 PM in Visual Studio

this link appears broken http://www.netduino....MF43R2_Beta.msi




#60777 Beta: Visual Studio 2013 support

Posted by h3mp on 21 November 2014 - 10:35 PM in Visual Studio

Chris,

 

will this work with the just-released visual studio 2013 "community edition" which is supposed to be a free version of pro??!?





home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.