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 21-September 23)


By content type

See this member's


Sort by                Order  

#50498 what material is Smartwatch made up of?

Posted by hanzibal on 15 June 2013 - 05:22 PM in General Discussion

Kickstarter has a very low tolerance for antagonists. Having an account on kickstarter is a privilege.

That sentence pretty much summarizes what I disapprove of - the lack of balance. A crowd of yey-sayers can easily contribute in creating an unjustified hype over something that you are not allowed to be critical of. That's just does not seem right to me. How could it be a privildge to have an account, the account holders usually pay money, don't they? The priviledged ones ought to be the project owners. I can only imagine how much hard work it takes to get a project up there and reaching the monetary goals, but then again, it's not supposed to be easy either. Don't get me wrong now, I'm not against the Kickstarter concept in essence and also have nothing against the Agent smartwatch or any other Kickstarter project for that matter. It's the lack of balance I'm against. In fact, I really love the Kickstarter idea - it's a great way for people to get great products on the market using the common approval rather than that of a few capitalists and the kind of control they usually imply. There's so much great talent and potential out there and I think Kickstarter presents a fantastic opportunity for those to come into the open.



#52524 Low baud rates on serial port

Posted by hanzibal on 03 September 2013 - 02:36 PM in Netduino Plus 2 (and Netduino Plus 1)

Yes, a soft UART would work for receiving since interrupts are correctly time stamped but sending is trickier.

 

Still, if the meter doesn't really use full duplex (won't receive and respond in parallel) you might get away with sending too - 300 baud means >1 ms between pin toggles and that is a pretty long time even for an NP2.




#50514 How to read input from sound sensor?

Posted by hanzibal on 16 June 2013 - 12:17 PM in Netduino 2 (and Netduino 1)

Hi and welcome to the forum! It sounds as if you got it wired correctly but beware the Netduiono analague ports are not 5V tolerant. You could try feeding the module 3V3 instead of 5V and see what happens. I'm not saying you have but there's a possibility you might have damaged the ADC of your Netduino. According to the discription, you should get a transition (in either direction doesn't clearly state which) on the digital pin when the sound pressure exceeds a certain threshold depending on the potentiometer position. Could be transition is made from high to low so try wiring to an interrupt port and have it trigger on both edges. Then put a Debug.Print in the event handler and see if you get anything as you clap and dial the pot slowly from one extreme to the other. I assume that if you had a scope, you would have already used it so I guess you either don't have a one or didn't see a signal According to the review, you need to make a pretty loud noise for it to react, like clapping your hands very close to it. Since you probably already tried this, it would seem to me you got a rotten egg :-(



#50876 Compiling and downloading

Posted by hanzibal on 27 June 2013 - 03:27 PM in Visual Studio

Hello and welcome to the forum! You need Visual Studio 2010 or 2012, either the free Express version or any of the commercial ones. You also need the .NET Micro framework SDK and the Netduino SDK. Programming, debugging and deployment (firmware upload to the Netduino) is then performed from within Visual Studio by the click of a button. It's all a really simple and straight forward procedure so I guess that's why it is not often discussed explicitly. Don't worry, you'll be up and running very quickly. EDIT: You'll find all the required software for download on this page: http://netduino.com/downloads/



#50859 Led.dispose() turns on led...why?

Posted by hanzibal on 27 June 2013 - 06:49 AM in General Discussion

It so happens that the pin you are claiming is electrically connected to an on-board LED. When disposing the pin, it reverts to its default config and usage. I'm not sure but, could it be the pin (and thus the LED) is used as a power indicator on your board?



#50815 Anyone using WCF?

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

If you only want to send simple messages back and forth, you could always use sockets but perhaps that's a bit too simple plus you'd have to do any and all marshalling by yourself if you plan to transfer more complex structures. A web server doesn't have to be all that "full" either, you could just parse out the query string from the headers, perform the corresponding operation(s) and return a string like "OK" or whatever. I don't know if the HttpListener class et al is available but if so, it would make it very easy to implement a light weight web server. You could do many of the requests using AJAX and thus do the request/response parsing in client side javascript while displaying a fancy main page with the buttons and controls and what have you. Maybe throw in some JSON to get a little more structure in the server (device) responses. Now, I don't really know WCF or its benefits and maybe you have already considered the above.



#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/




#49461 New to this, I want to make sure I use the right tools

Posted by hanzibal on 15 May 2013 - 11:12 AM in General Discussion

Hi Dave and welcome to the forum,

I totally agree with Dave  :P

 

Seems like a good kit to start with. As you know the Netduino Plus 2 has networking capabilities and can send emails and such. As for sound, you can use PWM to play a chime on that piezo buzzer.

 

Since you're an experienced developer, I'm sure you'll manage to put the door bell/mailer together.

 

Good luck!




#49964 PWM Constructor Trouble

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

Hello and welcome to the forum!

Yes, I believe you should use the PWMChannel enum as you suggested yourself, I also noticed this at some point and I think it was introduced with v4.2 of the framework. Take a look at the code attached for the lcd driver class in the below post and you should be able to see how to use PWM. I believe the file is named lcd1602.cs or something like that.

http://forums.netdui...-and-ir-remote/

Good luck!



#50071 PWM Constructor Trouble

Posted by hanzibal on 29 May 2013 - 06:27 AM in Netduino Plus 2 (and Netduino Plus 1)

Thats great, have fun!



#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

 




#51705 Anyone tried XMarine?

Posted by hanzibal on 26 July 2013 - 10:35 AM in General Discussion

This is not directly related but looks an interesting way to build smartphone apps for interfacing with your Netduino, for example via sockets over a network.

 

As I understand, XMarine would enable you to use Visual Studio for writing apps for both Android and iOS devices.

 

http://xamarin.com/

 

To me it sounds very cool. Has anyone of you guys tried it?




#51251 Webserver and locking

Posted by hanzibal on 09 July 2013 - 12:58 PM in Netduino Plus 2 (and Netduino Plus 1)

You should use an interlocked exchange to change the value of the _serverReady varible. The Interlocked.Exchange method will replace the value and return the previous value in a single atomic (unbreakable) operation.
int _serverReady = 1;if(Interlocked.Exchange(ref _serverReady, 0) == 1){            // process request       .      .      .      // done, open unlock the door      _serverReady = 1;}else{      // server busy}
As indicated above, I think you have to declare _serverReady as an integer for this work. You might want to use the volatile modifier on your variable declaration but I don't know if that feally matters in .NETMF. There might also be a way to configure the listener as synchronous so that the server will never attempt to process requests in parallel. Could be this feature is not available in .NETMF, I'm not sure.



#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.



#56349 bitwise comparison & IF condition

Posted by hanzibal on 24 February 2014 - 09:45 PM in General Discussion

That makes it compile but it's not quite the same thing, I'd say it translates into this:
if ((this_led_color & mask) != 0)       SDI.Write(true);else       SDI.Write(false);
Checking for equality to mask is no longer the same when mask has other than a single bit set.



#56471 Lcd 16x4 initialization

Posted by hanzibal on 26 February 2014 - 10:33 PM in General Discussion

Faith, what controller is it, got a datasheet you can point to?



#50660 Vin

Posted by hanzibal on 20 June 2013 - 12:18 PM in Netduino Plus 2 (and Netduino Plus 1)

If you mean what the pin is used for, I believe it is for supply voltage 7.5 - 9V.




#50385 Driver for the MCP41100 digital potentiometer

Posted by hanzibal on 09 June 2013 - 07:19 PM in Project Showcase

Yes, I even mentioned PWM in the end of my post. Naturally, the MCP41100 is not at all intended for signal generation (for many reasons), it just seemed like a "fun thing" as opposed to being something of practical value. 



For debugging, that simple type of signal can be good. You just hook up a voltmeter, or a lead to a multi-channel voltage data-logger, and you can get valuable information.  :)  It's also much easier than a serial output.  And, a handheld voltmeter is small and easy to use, and to look at signals/test-points.

That's a good tip!

 

Speaking of PWM, below is a sine(-ish) wave form that I generated using a UART and an LP-filter. It was done using a regular USB to TTL UART converter cable with code running on the PC in an attempt to produce audio - see how beautifully smooth it is?  :lol: 

UART_sine.JPG

 

Also, I was actually thinking of doing PWM audio on an MSP430 but someone beat me to it:

 




#50369 Driver for the MCP41100 digital potentiometer

Posted by hanzibal on 09 June 2013 - 01:20 PM in Project Showcase

Hi all!

 

The MCP41100 is a programmable digital potentiometer with SPI interface and comes in a breadboard friendly DIP-8 package. You can set it to any value between 0 (zero) and 100 kOhm in 256 steps. You can of course tweak it into doing other ranges by wiring in series or in parallel with other (fixed) resistors.

 

For another project, I needed to produce a variable voltage between 0 (zero) and 5V so I made a simple driver class for it and thought I'll share it with you. Attached you'll find the driver and demo app. It is written for my beloved mini but works with others too requiring only small modifications.

Attached File  miniMCP41100.zip   4.51KB   7 downloads

 

You simply use it like this:

var r = new MCP41100(new SPI.Configuration(Pins.GPIO_PIN_17, false, 0, 0, false, true, 10000, SPI.SPI_module.SPI1));// set half resistance (i.e. ~50k)r.Level = 128;// set zero resistancer.Level = 0;// ...or you can use the Resistance property to set ~50k like sor.Resistance = 50000;// set ~100kr.Resistance = 100000;

The demo app assumes the IC has been wired as a voltage divider like in this schematic (Pw = output):

mcp41100.PNG

When connected that way, you can use it as an a very slow "arbitrary signal generator" meaning you can pretty much draw any signal over time like I did in this post or a nice sine wave if you prefer that:

MCP41100_sine.JPG

 

I guess you could think of the MCP41100 like a "poor man's DAC" :) but since the mini does not have a DAC, it can actually very useful at times as it's also much simpler than to use PWM.

 

Enjoy!

 

EDIT: Note that the MCP41100 is not suited for signal generation in general.




#50151 Analog.ReadRaw unhandled exception in SecretLabs.NETFM

Posted by hanzibal on 31 May 2013 - 07:56 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi, That "first chance" is from an exception being caught in a try...catch and the second is an exception (the same?) not being caught. I suppose the error is what it is said to be, e.g. an object that unexpectedly has a value of null. Since the code has run for quite a while and the exception looks not to originate from your own code, my guess would be that it is due to unsufficient memory available or something else that builds up over time. I would think its hard for anyone to say much more about it having not seen your code.



#50462 Netduino Plus 2, SPI interferes with Networking?

Posted by hanzibal on 13 June 2013 - 10:55 AM in Netduino Plus 2 (and Netduino Plus 1)

I would have thought it be unusual for an SPI slave device to ignore chip select but could be it only looks at the raising edge of the clock as long as !cs is asserted, i.e. performing and AND operation on the two. Maybe that is defacto standard procedure. The parameters you set do matter and controls how the Netduino SPI module manages the cs and clock pins respectively but I guess you knew that already.



#49420 Old school ft. New school: Snake with a Lumia 920 controlling a 5110 LCD usin...

Posted by hanzibal on 14 May 2013 - 11:42 AM in Project Showcase

Very nice, at first I didn't see the Lumia but only an old 5110 but then I noticed the animated "fly by" arrows and reallzed the 5110 was never capable of that. Thanks for sharing! Edit: also, congrats on becoming a Nokia Developer Champion!



#50732 Netduino + Video Experimenter shield

Posted by hanzibal on 23 June 2013 - 08:26 AM in Netduino Plus 2 (and Netduino Plus 1)

The shield is probably based around the Maxim MAX7456 chip. Sparkfun has a similar board based on the MAX7456: https://www.sparkfun.com/products/9168 That one has been discussed in these threads: http://forums.netdui...58-netduino-tv/ http://forums.netdui...-video-overlay/ I'm pretty sure I've seen it in other posts as well but I can't find that info right now. Hope that helps a little anyway.



#50681 Mocking Inputs?

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

Instead of Unit-testing, you might consider "black boxing" by writing a corresponding set of interfaces through which data Is introduced. You would then make your fake implementations always returning fixed or random dummy data as needed. Later of course, you would make real (non-fake) implementations.



#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/




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.