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.

Heroduino

Member Since 24 Jun 2012
Offline Last Active Dec 02 2017 10:24 AM
-----

Posts I've Made

In Topic: Shortest time readable on interrupt

22 August 2013 - 10:22 AM

Hello Julien,

 

look this http://forums.netdui...h-class/However

 

You can call the ticks from netduino and calculate to microsecounds.

 

 

sincerely

Heroduino


In Topic: HC-SR04 Ultrasonic Sensor Memory Problem

16 July 2013 - 08:06 AM

Hello Grant,

 

sorry. I had no try this. The other way is, before you return from Read() is clear the eventhandler

public static int Read(){   EchoPin.OnInterrupt += new NativeEventHandler(port_OnInterrupt);      EchoPin.DisableInterrupt();                         Distance();   Thread.Sleep(25);   EchoPin.OnInterrupt -= new NativeEventHandler(port_OnInterrupt);   return uDistance;}

Or you write a methode for allocate one time only the event handler.

 

Other Example

public static void SetEventInterupt(){      EchoPin.OnInterrupt += new NativeEventHandler(port_OnInterrupt);}public static int Read(){  EchoPin.DisableInterrupt();                         Distance();  Thread.Sleep(25);  return uDistance; }

And your main 'while' you write:

SetEventInterupt();while (true) {       lcd.Move(2, 0);       lcd.Show(Sonic.Read().ToString() + "cm ");       Thread.Sleep(1000); }

Or look on my blog and Translate my content. Well, I posted a example code. ^_^

http://meineweltinme...m-netduino.html

 

Heroduino


In Topic: HC-SR04 Ultrasonic Sensor Memory Problem

16 July 2013 - 05:00 AM

Hello Grant,

 

if you used the Read() method, you allocate each time a new Event, but it dont clear it. Try this to the Methode.

public static int Read(){   if(EchoPin.OnInterrupt == null)   {      EchoPin.OnInterrupt += new NativeEventHandler(port_OnInterrupt);   }   EchoPin.DisableInterrupt();                         Distance();   //Debug.Print("distance = " + myDistance + " mm.");   Thread.Sleep(25);   return uDistance;}

Heroduino


In Topic: MPU 6050 Data are not constant

08 July 2013 - 04:47 PM

Herllo Attila,

 

sorry, but I have not understand the DMP completely. The Sensor have many options to configurate and I have here presented a tiny example code for the sensor.

 

If you want use the raw data from the sensor, deaktivate some setting in the initialisation. To Comment out the Gyro_Config (0x1B) and the Accel_Config (0x1C).

 

On the page 5 is a description what the DMP going to do. ;)

http://www.invensens...M-MPU-6000A.pdf

 

 

 

Heroduino


In Topic: MPU 6050 Data are not constant

05 July 2013 - 04:19 PM

Hello MoonWalker (Attila),

 

the elapsed time it is not necessary for filtering. For example you can progamming a attitude indicator with complemtary filtering without elapsed time. :)

 

What are you planing to do with this elapsed time?

 

 

 

Heroduino


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.