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.

hanzibal's Content

There have been 386 items by hanzibal (Search limited from 29-May 23)


By content type

See this member's


Sort by                Order  

#50188 USB CDC on Netduino Plus 2

Posted by hanzibal on 02 June 2013 - 02:19 AM in Netduino Plus 2 (and Netduino Plus 1)

@baxter: those boards are USB host modules, I was under the impression that a USB device was sought after. @Haurucki: As I gathered, you're looking to make your Netduino present itself as a USB virtual com port to the host PC, right?



#50933 Ultrasonic sensor code.

Posted by hanzibal on 29 June 2013 - 02:58 PM in Netduino 2 (and Netduino 1)

Hi! Found a few things to be a little odd, I'm not sure they'll solve your problem though. You are creating the trigger port each time GetDist() is called. If you wish to share the same trigger pin among multiple class instances, declare the trigger port member as static instead and make sure it only gets created once. Create both the trigger and echo ports in your constructor and store them in private members. Remove the pin members since there's no point in remembering those any more. About interrupts, when adding an event handler, you are only registering a method to be called if and when an interrupt occurs. You are not, as your comment implies, waiting for it to happen at that point. This also means you should move event handler registration to the constructor as well. How are the the instances ultraSonic1 and ultraSonic2 created, what parameters are passed to the constructor?



#50734 Turnkey RTC?

Posted by hanzibal on 23 June 2013 - 10:49 AM in General Discussion

Hi! While looking for adjacent info, forum member emg mentioned this module: http://www.ebay.co.u...e-/270762577188 That and other alternatives was discussed in this thread: http://forums.netdui...for-rtc-backup/



#49662 Time Machine

Posted by hanzibal on 21 May 2013 - 12:22 PM in General Discussion

I should expect so and hopefully even runs NETMF !

 

...and it really was a time machine!




#49653 Time Machine

Posted by hanzibal on 21 May 2013 - 12:06 PM in General Discussion

Looks sweet, don't know what it can do but still only a question of how much I should place!




#49648 Time Machine

Posted by hanzibal on 21 May 2013 - 12:01 PM in General Discussion

Yes, where is it?




#49655 Time Machine

Posted by hanzibal on 21 May 2013 - 12:09 PM in General Discussion

I must say, I never expect a smartwatch - I was so wrong, so very wrong!

 

I didn't. Backed. :-)

 

How much?




#49590 Time Machine

Posted by hanzibal on 20 May 2013 - 08:23 AM in General Discussion

Awesome video! - must have taken months to combine all those separate videos into one.

 

EDIT: Too me, the video would suggest something with an LCD on it.

 

Secret labs releasing a flux capacitor for hobbyists????  :o  :D

 

Could be sort of....the mystics around this seem to thicken by the hour...check out this post:

 

http://forums.netdui...mepage/?p=49589

 

Code cracked!




#49646 Time Machine

Posted by hanzibal on 21 May 2013 - 11:59 AM in General Discussion

I actually edited the post on 1:57 but that doesn't show...I initally wrote 4 minutes, but you beat me to that  :D




#49644 Time Machine

Posted by hanzibal on 21 May 2013 - 11:56 AM in General Discussion

No, its 3 minutes  :P




#51320 Thinking Of Begining To Use Netduino

Posted by hanzibal on 10 July 2013 - 11:29 PM in General Discussion

I agree, a Netduino is not a good choise for those things and I don't even think the PI could cope. Any of those would probably be a really big detour from achieving what you want. As all of the bullets are pretty high level stuff, I'd recommend using a PC. Later, you could move to a micro or nano ATX if size is important. Of course, a Netduino could perhaps handle some of it but what's the point if you got s PC on the side. To be quite honest, I think the stuff you've mentioned taken together could take years to develop no matter what hardware you got.



#50370 The latest thing: Oscilloscope Art

Posted by hanzibal on 09 June 2013 - 01:31 PM in General Discussion

...and here's how I did it:

http://forums.netdui...-potentiometer/




#50361 The latest thing: Oscilloscope Art

Posted by hanzibal on 08 June 2013 - 10:04 PM in General Discussion

Can you see what the oscilloscope says?  :ph34r:

 

oscart_text.JPG

 

I'll be uploading some code later so we can compete in drawing the best oscilloscope art  :D

 




#50791 The latest thing: Oscilloscope Art

Posted by hanzibal on 25 June 2013 - 10:31 AM in General Discussion

I used an MCP41100 digital pot for drawing the signal and here's the code for it:

http://forums.netdui...-potentiometer/




#50789 String.Contains - Error with custom 'Contains'

Posted by hanzibal on 25 June 2013 - 08:53 AM in Visual Basic Support

Good, then it was as I suspected and also the solution was the one I suggested earlier:

 

...If so just substitute "greater or equal" for just "greater" or...

 

Also, I see you got rid of the redundant calls to IndexOf (as I also mentioned).




#50775 String.Contains - Error with custom 'Contains'

Posted by hanzibal on 24 June 2013 - 10:46 PM in Visual Basic Support

Hi! I'm not sure but could be the VB implementation of the IndexOf imethod s one-based and that zero means "not found". If so just substitute "greater or equal" for just "greater" or simply replace the zero with a one. Also, your loop repeats the same call to IndexOf for as many times as there are characters in _src - is that intentional and if so, why?



#50804 String.Contains - Error with custom 'Contains'

Posted by hanzibal on 25 June 2013 - 06:37 PM in Visual Basic Support

I see, well then I suppose gfcwfzkm's tests did not run under the micro framework but under the regular. Btw, you do mean "iif" and not just plain old "if", right?



#50790 String.Contains - Error with custom 'Contains'

Posted by hanzibal on 25 June 2013 - 09:31 AM in Visual Basic Support

Also, IndexOf always returns -1 if not found.

In C# it does but are you sure it does so in VB too?

It doesn't seem to judging from the solution and VB is traditionally 1-based.




#50818 String.Contains - Error with custom 'Contains'

Posted by hanzibal on 25 June 2013 - 10:38 PM in Visual Basic Support

Ah, I was totally unaware of that, thanks for the info. I really liked the last part about the new operator being "short circuit" so that it only evaluates the true alternative and not both as the old iif did. I guess my VB is gettng a bit rusty from all the C#.



#50778 Strange data received from SRF02 I2C

Posted by hanzibal on 24 June 2013 - 11:13 PM in Netduino Plus 2 (and Netduino Plus 1)

Perhaps you got the msb/lsb conversion wrong or the values are signed? The ratio between inches and centimetres seem correct most of the time. I trust the I2C pull-up resistors are in place. Got any pins floating?



#50802 Strange data received from SRF02 I2C

Posted by hanzibal on 25 June 2013 - 06:01 PM in Netduino Plus 2 (and Netduino Plus 1)

Yes, two 10k resistors i parallel should correspond to a single 5k resistor. Well, it was just a thought.

 

Looking again at your code and comparing to the user manual you referred to, it seems you're are doing the reads wrong. You should read location 2 and 3 separately to get the high and low byte respectively. As it is now, you issue a series of four transactions where the read buffer gets overwritten by the the second read transaction. Your read buffer is 2 bytes but I think it only need be one byte since first you should read the high byte and then you read the low byte (the order does not seem to matter).

 

Also, I believe the location counter (address counter) auto-increments for each read performed so you could probably do something like this instead (here, the read buffer is still 2 bytes long):

xActions = new I2CDevice.I2CTransaction[]{	I2CDevice.CreateWriteTransaction(new byte[] { 0x02 }),	I2CDevice.CreateReadTransaction(RegisterValue),}int c = srf02.Execute(xActions, 1000);Debug.Assert(c > 0, "I2C write/read failed!");int val = (RegisterValue[0] << 8)|RegisterValue[1];

As you know, the Netduino is 5V tolerant and I wonder if the the LLC is really necessary - have you tried without it?




#50793 Strange data received from SRF02 I2C

Posted by hanzibal on 25 June 2013 - 11:36 AM in Netduino Plus 2 (and Netduino Plus 1)

I agree, the byte order is equal to that of the Arduino code.

 

In my experience floating pins can sometimes result in strange phenomena and I try to avoid them even if it theoretically shouldn't matter. I normally use 100k pull-downs on unused pins though.

 

You could try using stronger I2C pull-ups, say 4k7 as see if that helps.




#50806 Strange data received from SRF02 I2C

Posted by hanzibal on 25 June 2013 - 07:07 PM in Netduino Plus 2 (and Netduino Plus 1)

You're not skipping LSB, you read both MSB and LSB as two consecutive bytes - because they are one byte each, only when combined can they form the 16 bit number that represent the reading. About the "c == 2", I changed that shortly afterwards since it was a mistake, sorry for the confusion it may have caused. Fortunately, you quoted the correct version. As for the LLC, you usually only need that when talking to something that either 1) uses less than 3V3 and is intolerant of that or something that 2) uses something in between of 3V3 and 5V which doesn't think 3V3 qualifies as a logic high or 3) something that uses more than 5V as it could harm the Netduino. A logic low is normally ground and thus no problems with that. In your case, the Netduino will have no problem with the I2C lines being pulled up to 5V.



#50680 Strange AnalogInput readings

Posted by hanzibal on 20 June 2013 - 11:52 PM in General Discussion

You could try removing R1 and R2 on the shield, those are 2k2 I2C pull-up resistors to 5V. After removing them, add your own pull-ups to 3.3V externally. That should work as long as the RTC considers 3.3V as logic high, which I think it does but check the d/s first. Be careful desoldering R1 and R2 not lifting the pads in case you want to put them back in future. If you know you will never use R1 and R2, just take a sharp knife and cut the traces instead of desoldering.



#50669 Strange AnalogInput readings

Posted by hanzibal on 20 June 2013 - 07:42 PM in General Discussion

So basically, you leave the analogue input pin floating "in the rain" - I suppose that is bound to produce strange results. I once created kind of a "human body proximity sensor" consisting of 8 floating digital inputs and they all triggered when I held my hand about two inches away. I guess, in a moist environment the effect would be even stronger. I suppose you could try using a really weak pull-down resistor of several Mega Ohms but perhaps it would be better to use an actual humidity sensor?




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.