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.

Luke Cummings's Content

There have been 38 items by Luke Cummings (Search limited from 24-May 23)


By content type

See this member's


Sort by                Order  

#9749 while(true)

Posted by Luke Cummings on 18 February 2011 - 07:07 AM in General Discussion

There is another way to grab execution without requiring the checking of a while, try this:
for(;;);

It looks funny but if you think about how a for loop works you can see how this basically turns into a looping nop instruction.

That said since you are dealing with an interpreted language I'm not sure if this would actually turn into an infinitely looping nop instruction like it would in c.


This makes it so that other threads may be delayed in getting access to processor time giving you a slow response and also doesn't let the chip go into a power saving mode.


It shouldn't delay any other threads as the processor is always doing "something" nop's or otherwise, but you're correct that it will increase power consumption.

Edit: This statement is unverifiably vauge



#10095 Simultaneous Outport Ports?

Posted by Luke Cummings on 24 February 2011 - 06:22 PM in Netduino Plus 2 (and Netduino Plus 1)

Sounds like your problem is a hardware related issue, can you be more specific as to what you are trying to do? Currently your saying these two pins will always have the same value. If so just use one pin.



#10205 Quadcopter Early Flight

Posted by Luke Cummings on 25 February 2011 - 05:04 PM in Project Showcase

Can you offer any details up about your platform?



#10226 Quad.Net Quadrocopter for .NETMF

Posted by Luke Cummings on 26 February 2011 - 12:40 AM in Project Showcase

Alright guys, I've some new hardware, footage and failure.

Here's the new flight video:
http://www.youtube.com/watch?v=8Dy-4ppzCIM

This is a drastic improvement over the last iteration, and it still involves no native code!

Check out the full post here.



#10231 Quad.Net Quadrocopter for .NETMF

Posted by Luke Cummings on 26 February 2011 - 03:00 AM in Project Showcase

how often does GC kick in?


about every 5 - 7 seconds



#10300 Simultaneous Outport Ports?

Posted by Luke Cummings on 27 February 2011 - 07:03 AM in Netduino Plus 2 (and Netduino Plus 1)

Wow Corey, I just has a "Duh" moment there... I guess some of us hardware guys have been spending a little too much time in .Net! :) Great explaination!



#10315 Strange Data on SDA/SCL

Posted by Luke Cummings on 27 February 2011 - 05:02 PM in Netduino Plus 2 (and Netduino Plus 1)

I have a BMP085, when I was messing around with it a while ago I mistakenly applied reverse voltage to it, and now it generates very similar data to yours... :mellow:



#10643 Quad.Net Quadrocopter for .NETMF

Posted by Luke Cummings on 07 March 2011 - 05:15 PM in Project Showcase

Hello Brandon

I am interrested by your project, i would like to read your code but i can't access google site and tortoise say "Forbidden
Your client does not have permission to get URL /p/quadnet/ from this server."

it's my fault (bad client or bad actions) or it's because you should give me a read acces before ?

Thanks a lot


Gilles,

Currently the project is not posted but we will be going live soon, the new project site is available at http://dotcopter.net/



#12507 Locking Cat Feeder

Posted by Luke Cummings on 26 April 2011 - 06:57 PM in Project Showcase

Any variable voltage (IE, not 3.3V OR 0V inclusive) needs to be measured through an analog pin. You may need to use a voltage divider to drop the voltage to a level between 0V and 3.3V. Look for a voltage divider calculator to find the correct values of the 2 resistors.

Please note, if you are tapping off a motor lead like that, you may need to use some form of circuit protection. Motors are noisy and may wreck havoc on the Netduino if the sampling circuit is not correctly done.


The netduino's MCU AT91SAM7X512 pins are 5V tolerant so even though they only output 3.3V they can handle up to 5V as an input, that being said I wouldn't let the netduino look at an inductive load like chris says. Your just asking for trouble. Instead I would recommend prying open the control board to look for a digital signal (5V or less) that represents the motor action. To do this you will need a multimeter, just trigger the motors and start probing around for the signal.

Cheers!



#21831 Convert byte[4] to float

Posted by Luke Cummings on 18 December 2011 - 10:17 PM in Netduino 2 (and Netduino 1)

Just for sake of it, here is the code I was using for my quad copter project. Of all my testing this ended up being the fastest. http://code.tinyclr....4/bitconverter/



#21885 Convert byte[4] to float

Posted by Luke Cummings on 19 December 2011 - 10:56 PM in Netduino 2 (and Netduino 1)

Hi Luke,

I'm used to programming in C & C++

...

e.g. is is possible to prevent .Net making changes to the memory in the background during an unsafe function call?

Paul


Paul,

Pointers in C# using the unsafe construct are just as dangerous as in any other case. For example check out how I managed to brick my FEZ panda on this thread: http://www.tinyclr.com/forum/12/2700/. Using pointers gives you unfettered access to any memory you choose.

Really my mistake could have been made whether I was using managed or native code. Once you start getting into more advanced topics, like accessing various chip features (ie IAP on the NXP chip that GHI uses for USBizi) it becomes risky, especially when you know just enough to get yourself in trouble ;)

edit:
@Mario: you are correct about it not being supported, but I've never had an issue using it. In this case my conversions were 3 times faster than anything else I could come up with.

-Luke



#21886 Convert byte[4] to float

Posted by Luke Cummings on 19 December 2011 - 11:08 PM in Netduino 2 (and Netduino 1)

Hi Luke,

I converted your code to a DLL, imported it into Visual Basic and it works like a charm. All other unsafe code I tried trashed my Netduino. Thanks for providing this badly needed functionality.

Baxter


Glad I could help. There definitely are some 'gotchas' using this technique.



#21887 Convert byte[4] to float

Posted by Luke Cummings on 19 December 2011 - 11:11 PM in Netduino 2 (and Netduino 1)

I would hate to drive traffic on a rival site so for fairness, here is the bitconverter class.

Attached Files





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.