hanzibal'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.

hanzibal's Content

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


By content type

See this member's


Sort by                Order  

#49615 How use MuxShield.MuxMode.DigitalInput

Posted by hanzibal on 20 May 2013 - 11:05 PM in Netduino Plus 2 (and Netduino Plus 1)

Please refrain from duplicate posts, you already have this one going:

http://forums.netdui...067/#entry49614




#50584 looking for an old netduino 1 used ??

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

I got a Netduino Plus that can be flashed to behave the same as a regular Netduino (i.e. flash image w/o Networking) that I'm not really using if that works for you. I'm in Sweden which might render some additional shipping costs but I don't know how much.



#50658 start a new line in a TXT file

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

I usually use newline 'n' only and not vertical tab 'r' and as far as I remember, it should work.

 

Of course, when all else fails, you can always issue multiple calls to WriteLine().




#50548 file on SD card from Ethernet

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

Hi michel!

 

What is your setup?

 

Do you have a Netduino Plus attached to your network where the SD card you wish to modifiy is inserted into the CD card slot of the Netduino?

 

What kind of device needs to modify the SD card, is a PC, another Netduino or some other kind of network attached device?




#56338 Hitachi HD44780 LCD controller

Posted by hanzibal on 24 February 2014 - 02:32 PM in General Discussion

Yes, 8 bit mode would be faster - in 4 bit mode, you have to transfer the low and high nibble of each byte separately while as in 8 bit mode, you transfer a whole byte in each transaction. Will you be using a separate device (shift reg or similar) in between the Netduino the LCD and if so, may I ask which?



#50368 Empty post (by mistake)

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

EDIT: Admin, could you please remove this post.




#50019 Variable with USB name set in MFDeploy - exists?

Posted by hanzibal on 27 May 2013 - 02:00 PM in Netduino Plus 2 (and Netduino Plus 1)

Are you sure the name even sticks to the board?




#50758 issues moving from 4.1 to 4.2

Posted by hanzibal on 24 June 2013 - 12:37 PM in Netduino Mini

The emulator showing up would indicate that you haven't actively set the deployment channel to USB (or COM port for the mini) but I would think you've already checked that?

 

Sometimes VS looses the setting and I'll have to goto project properties and put it back.




#50764 issues moving from 4.1 to 4.2

Posted by hanzibal on 24 June 2013 - 04:51 PM in Netduino Mini

I see. Usually when I accidentally run the emulator, I get an exception since it does not have the periphals I'm working with :-)



#51250 Returning to the Netduino family

Posted by hanzibal on 09 July 2013 - 11:24 AM in General Discussion

Where have you been during your time in exile?




#50492 Another Newbie Steps into the Arena

Posted by hanzibal on 14 June 2013 - 08:51 PM in General Discussion

Halogen light contains lots of IR so, like Paul said, watch out if the room is heavily lit and with what. I made something similar with a electrical model car race track where I could use photointerrupters since those cars have small "fins" sticking down a slot in the middle of each track. I suppose you need to time each car separately and not just the winner which makes it more difficult. Another idea might be to use micro switches buried in each track at the finish line. The switches would have to be fitted with with fairly long arms to make them easy enough for cars to lever as the they rush by barely touching the switches. This might be the easiest way to do it.



#50553 How Many Motors can the Netduino Control?

Posted by hanzibal on 17 June 2013 - 03:29 PM in General Discussion

With the right controller, on, off, forward and backward (no speed control) would require 2 pins per motor. So depending on which Netduino you got, you could potentially control 8 to 11 motors and with an IO expander IC you could control many more.



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



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




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



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



#52408 debug success but output doesn't showing

Posted by hanzibal on 28 August 2013 - 06:44 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi there and welcome to the Netduino forums. Debug messages should show but I suspect you debug output is direct to the immediate Window. Either switch to immediate window while debugging or change Visual Studio settings to direct debug message to the output window.




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



#50243 Static or Instance

Posted by hanzibal on 04 June 2013 - 09:30 AM in Netduino Plus 2 (and Netduino Plus 1)

I'm with NooM here, try and keep classes as self-contained as possible. Avoid scattering bits and pieces as statics in the main class. Gather and isolate things that belong together. In my opinon, the more globals, the worse the code in terms of clarity, change management, maintainance, porting, scalability, generalizantion, scalability, etc. Be aware of the limited amount of system resources, primarily RAM and processing power (your code is being interpreted at run time, there's no JIT here). Create late and destroy early. Be clever and figure out more efficient ways of doing calculations etc than you perhaps normally would. Optimize, use hash tables. Keep it short, lean and mean. Whenever possible, use event driven constructs (interrupts) rather than polling. Avoid tight loops as much as possible. Use multithreading concepts like producer/consumer relations between threads employing sempahores and mutexes. The scheduler does a really excellent job, sometimes almost magical. If you must do tight stuff, remember to yield once in a while in favor of other threads. Other than that, at least I don't take any particular explicit actions for memory management. In general, the GC normally does a better job when left in peace. Personally, I don't care much for IDispose. I mean, if you for example instanciate a driver class for an LCD, a switch or something like that - would you dispose of it run time? I know I wouldn't. Naturally, transient objects should be disposed of early, don't allow stuff to "build up" over time. EDIT: Of course, don't apply all of the above per sé but selectively when necessary, sensible and justified.



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




#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

 




#49485 Outputting to I/Os in parallel

Posted by hanzibal on 16 May 2013 - 07:46 AM in Netduino Plus 2 (and Netduino Plus 1)

A really cool and useful feature of the PCF8574 8 bit I2C I/O Expander is that it is quasi-bidirectional meaning the pins work in both directions without the need for being configured in one direction or the other.

Also, I'm currently working on a driver class for the MCP23S17 which is a 16 bit I/O Expander with SPI interface. With my software, you can use it pin by pin or group pins together to form one or more parallel buses. This chip is also bidirectional and has excellent per pin interrupt handling. I'll be posting the code when done.



#49384 Outputting to I/Os in parallel

Posted by hanzibal on 13 May 2013 - 02:10 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi!

 

I have some vague notion of reading somewhere that you could group pins together to form a parallel data bus on the version 2 boards but I can't find that info now and could be that was only a feature of the CPU itself and hasn't been made available to managed code yet. Perhaps someone can correct me on this?

 

So from what I know, the short answer would be no, I don't think there's any parallel bus.

 

...but - there are plenty of different solutions involving some external component. For example, with a shift register you can create a virtually parallel bus using SPI to drive it. You might want to look at the 74F166 which is an 8 bit bidirectional shift register:

 

http://www.nxp.com/d...heet/74F166.pdf

 

Also there's the PCF8574 8 bit quasi-bidirectional I2C I/O expander which is easy to use. Both of these ICs are available in breadboard friendly DIP16 packages.

 

For the latter, I've written a driver class and I2C bus manager that can be found in this post

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




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




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.