Perhaps I don't understand but assuming you mean like sending Datetime.Now from N+ to another networked device, what could stop you from doing that?
- Netduino Forums
- → hanzibal's Content
hanzibal's Content
There have been 386 items by hanzibal (Search limited from 04-July 23)
#50461 Date from netduino plus
Posted by hanzibal on 13 June 2013 - 10:45 AM in Netduino Plus 2 (and Netduino Plus 1)
#56470 Gainspan WiFi module
Posted by hanzibal on 26 February 2014 - 10:22 PM in General Discussion
#56428 Gainspan WiFi module
Posted by hanzibal on 26 February 2014 - 08:24 AM in General Discussion
#56564 How to convert hex value stored in string to binary in string?
Posted by hanzibal on 01 March 2014 - 09:11 PM in Visual Studio
Might be possible to use something like int.Parse(...) in the other direction?
#50476 Date from netduino plus
Posted by hanzibal on 14 June 2013 - 06:19 AM in Netduino Plus 2 (and Netduino Plus 1)
Could you please explain in more detail, what you need to do exactly and why, perferably with a brief description of the overall purpose and goal of your project. One-liners tend to be cryptic, especially since english might not be you first language.
#57033 Gainspan WiFi module
Posted by hanzibal on 23 March 2014 - 07:15 PM in General Discussion
However, It can not do anything useful like accessing actual content on remote servers because of general problems reading and writing streams so there's little or no point in pblishing any code until I got those basics working.
There's probably as many recepies to writing drivers as there are chips to write them for but I think, In general the key is to read the d/s back and forth until you know your way in it, which sections contains which bits of information, where to find the info you need in various situations that you can anticipate.
Get the hang of the terminology used by the vendor and get a good feel for how the chip works and how you are supposed to use it. Ask your self the relevant questions, how can I achieve this or that required functionality and make sure you know where in the d/s the answers are.
Make up some kind of hypothetical API structure in your head and test it against what you have gathered from reading the d/s to see if your model is realistic and valid. Sometimes you can find some code for another architecture for inspiration or that you can port from but you will need to understand the chip nevertheless.
Proceed by establishing a working communication with the chip. Implement register read ops and verify by reading some expected power-on default value. Then get write ops working, verify using write and read-back testing. Write a value to some register and verify by reading back the register value to make sure it "stuck".
Come up with a programming model with some basic properties and methods supporting the model in your head. Create a class and definine the various constants, enums, register addresses and such that you will need.
Then start implementing, pick something simple like "getversion", "soft reset" or whatever is available, preferably something really simple that can be easily verified.
By now your knowledge and confidence will have grown enough to make the rest fall into place as if almost by itself.
Good luck!
#50169 USB CDC on Netduino Plus 2
Posted by hanzibal on 01 June 2013 - 11:32 AM in Netduino Plus 2 (and Netduino Plus 1)
#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)
#52680 netduino plus 2 compatible gps/gsm module
Posted by hanzibal on 10 September 2013 - 08:55 AM in Netduino Plus 2 (and Netduino Plus 1)
Hello again, I just found this complete kit with GM862 module, breakout, antenna, etc:
http://www.skpang.co...-usb-p-414.html
EDIT: Sorry, the kit has been sold out but might be available elsewhere.
#52663 netduino plus 2 compatible gps/gsm module
Posted by hanzibal on 09 September 2013 - 08:42 AM in Netduino Plus 2 (and Netduino Plus 1)
There's the GM862 module from Telit that has it all; GSM/GPRS/3G and GPS. Sparkfun used to carry a breakout for it (retired now) but might still be available from other locations:
https://www.sparkfun...cts/retired/281
EDIT: Found the bare Telit module here:
http://www.electroki...24?currency=USD
For GPS only, I've used the UBlox 6 based module that's cheap and works great:
http://www.ebay.com/...=item2ec7488539
The module comes with a small antenna but there's a uFL connector to support an alternative antenna of your own choosing.
#55288 Multiple *different* spi devices
Posted by hanzibal on 10 January 2014 - 08:58 PM in General Discussion
Yes, the Netduino can certainly talk to multiple SPI slaves, but you must serialize your data transfers. Basically, you create several SPI configurations and swap between these when interfacing to one or the other slave devices using different !CS pins.
In a multi-threaded environment, you must make sure that transfers are not interrupting each other. If necessary, use the lock statement to protect your SPI configuration swapping mechanism.
There are several implementations available, here's one for you:
#55449 Multiple *different* spi devices
Posted by hanzibal on 17 January 2014 - 09:53 PM in General Discussion
Those must have been some really bad wires, at these small currents and short distances, one would think such things should not matter, but there you go. Glad you solved it!
#52306 Audio sampling
Posted by hanzibal on 23 August 2013 - 06:47 PM in General Discussion
AFAIK, there's no ready made API for doing this, instead you need to modify the Netduino firmware to implement the functionality you need. This means setting up a C language tool chain for the micro in question, creating your own specialized branch of tinyCLR and thereby diverging and detaching from the Netduino main track. I haven't done this myself but many others have, so you can search the forum for guides on how to proceed along this path....However, I am more concerned about how things work if I wanted to get the high sampling rate you mentioned done in native code, while at the same time running managed code. How does that all work? It has been a long time since I did low level programming. Is it possible to have the native code reading the samples, by interrupts, using a timer, while at the same time feeding the results of this to a parallel executing managed thread?
That Bambino board looks interesting but for some reason I personally don't care much for gadgeteer boards and therefore don't know much about it. Ah, so there's a set of dedicated DSP instructions in M4, I was unaware of that. Texas are quite knowledgable within digital audio in general (especially since they aquired Burr-Brown) and the field of DSP in particular where they have a broad range of processors: http://www.ti.com/ls...AliasId=1200327 Did you have a look at MiniDSP.com? I really think that's more in line of what you are looking for. Please don't let this discourage you from getting a Netduino since I'm sure it would be a great tool for you to learn more of embedded programming and for interfacing with the other h/w parts that you will need. Please explain a little more of your goals and what you are hoping to achieve and I'm sure someone else here will be able to help you further.Just thought I'd post this here in case anyone ends up searching for the same stuff: http://www.iar.com/G...4_MCU_part1.pdf Cortex M4 has DSP instruction set and there are libraries available. Also - I found this: http://www.micromint...bambino200.html It is a .NET Gadgeteer compatible board with a multi core ARM Cortex .
#55386 Multiple *different* spi devices
Posted by hanzibal on 15 January 2014 - 02:06 AM in General Discussion
#51246 Proper way to multithread on Netduino
Posted by hanzibal on 09 July 2013 - 07:17 AM in Netduino 2 (and Netduino 1)
I was going to include some example code of a producer/consumer scenario but then I realized that the AutoResetEvent (ARE) is not really suitable for this. The reason is that you'd want precisely one item dequeued for every call to Set() and ARE cannot guarantee that.
Instead you need something with a counter in it that would increment with every Set() and decrement with every WaitOne(). In the regular framwork there is an synchronization object that works like this (can't remember its name right now) but sadly I don't think it's available in the micro framework. You need what I think is called a monitored queue.
Perhaps somebody else knows of how to correctly implement a monitored queue in .NETMF?
Correction: I made a typo before, it should have been System.Collections.Queue.
#50754 Seeking economical premade voltage sensor array?
Posted by hanzibal on 24 June 2013 - 08:47 AM in Netduino Plus 2 (and Netduino Plus 1)
Yes, the general idea was to use an analogue multiplexer that can handle the voltage and then a single voltage divider between that and the Netduino. The CD4067B 16 channel mux/demux can handle up to 20V but Vcc must also be 20V:
http://www.ti.com/li...ink/cd4097b.pdf
If 20V is not readily available you need a step-up converter from 12V which infortunately would increase cost. On the other hand, such converters come quite cheaply on eBay:
http://www.ebay.com/...=item1c33d18e42
If you spend some time searching, you might be able to find a demultiplexer that can handle input voltage significantly greater than Vcc and then of course you won't need the converter.
Audi?
#50736 Seeking economical premade voltage sensor array?
Posted by hanzibal on 23 June 2013 - 12:19 PM in Netduino Plus 2 (and Netduino Plus 1)
#50433 I2C driven LCD panel and IR remote
Posted by hanzibal on 11 June 2013 - 09:38 PM in Project Showcase
#50407 I2C driven LCD panel and IR remote
Posted by hanzibal on 10 June 2013 - 10:23 PM in Project Showcase
I'm pretty sure it will and I would love to see you confirm that. Other than the mini and the LCD (which I think you already have), you'll need these two:
PCF8574 8 bit IO expander with I2C Interface
http://www.nxp.com/d...74_PCF8574A.pdf
38kHz IR receiver with built in decoder and aplifier
http://www.electroki...e/download/2205
Or a pair with equivalent functionality (TI also makes a PCF8574). Personally, I love that IC, so versatile, uses only two pins (I2C), easy to use and simple to interface. The code above contains drivers for the IC, LCD (4-bit mode), IR reciver and a I2C bus manager.
Btw, I saw your monster DAC and it looks amazing! I must read more carefully before I can comment though.
EDIT: Did you see my CD player? Among other things, it uses the code in this post.
http://forums.netdui...now-with-video/
#50756 Seeking economical premade voltage sensor array?
Posted by hanzibal on 24 June 2013 - 09:18 AM in Netduino Plus 2 (and Netduino Plus 1)
It suddenly hit me that you need an analogue switch instead of a multiplexer. There are many but this one is a 16 channel switch that can deal with 230V signals. I don't know but they could be expensive.
http://datasheets.ma...05-MAX14806.pdf
EDIT: Here's an overview from Texas Instruments:
#51088 HELP with servo on NP2
Posted by hanzibal on 04 July 2013 - 07:32 PM in Netduino Plus 2 (and Netduino Plus 1)
#52255 Audio sampling
Posted by hanzibal on 21 August 2013 - 11:26 AM in General Discussion
Hi!
I think max sampling rate is 2Ms/second (see datasheet for the microcontroller) but you won't come anywhere near that rate or probably even 44.1kHz in managed code (plus for stereo you would need 2 channels = half the rate with a single multichannel ADC).
The Netduino ADC is only 10 or 12 bit (depending on micro) and meant for reading sensors and such much rather than sampling audio signals. För CD quality, even native code won't help.
I suggest you look at some external ADC board with more suitable specs, possibly something with a DSP onboard. Also bear in mind you need to handle the data stream which would be 2 * 16 * 44100 = 1,4Mbit/second for CD quality audio so if you're looking to do real time DSP, you're in for a real challenge.
You might want to look at the VS1053b from VLSI, it's an primarily a MP3 decoder but it can sample CD quality audio producing an MP3 (or Ogg Vorbis) encoded audio stream for you. The chip also has a few simple DSP effects.
You should probably check out www.minidsp.com
Sorry if I sound negative but I really don't think Netduino is you best choice for the task.
Good luck!
#51199 Proper way to multithread on Netduino
Posted by hanzibal on 08 July 2013 - 09:00 AM in Netduino 2 (and Netduino 1)
Hi!
There's no special class for "Background threads", they are the same as any System.Threading.Thread. In the post you refer to, the term is used to denote a Thread who's purpose is to process data produced by an interrupt service routine (ISR) in order to avoid lenghty operations in the ISR itself.
The AutoResetEvent is used to have the "background thread" wait for a signal before going to work. It's a good example of the common producer/consumer pattern where the ISR is the producer and the background thread is the consumer.
You can use a System.Connections.Queue object for the ISR to quickly tuck work items away (using the Enqueue method) to be processed by the background thread (using the dequeue method) at a slightly later point in time.
Yes, the background thread would typically run a while loop and perform a WaitOne on the AutoResetEvent as means of syncronization before dequeuing each work item for processing. When there are no items to be processed, the thread goes to sleep and will not wake up again until another work item has been enqueued. If necessary, you can use Thread.Sleep(n) to yield once in while in order not to choke the CPU degrading responsiveness of you application.
Hope this helps!
#51929 Exploiting the world of R/C hobby vehicles
Posted by hanzibal on 03 August 2013 - 10:00 PM in General Discussion
#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?
- Netduino Forums
- → hanzibal's Content
- Privacy Policy