hanzibal's Content - Netduino Forums - Page 14
   
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 17-June 23)


By content type

See this member's


Sort by                Order  

#50969 BUILD 2013

Posted by hanzibal on 30 June 2013 - 08:26 PM in General Discussion

Yes, almost all BLE stuff I've seen is about talking to an iPhone but that does not really interest me plus I think wifi is better for that. I think the Agent and TI SensorTag combo would be much more interesting. Anyway, do you think one of these cheap BT 4.0 actually supports BLE and that it is able to talk to the Agent and/or the TI SensorTag over BLE? http://www.ebay.com/...=item3f1d09ffab Then of course, there's the API thing on a non-BLE equipped PC, I suppose that would be a show-stopper on Win XP.



#50929 BUILD 2013

Posted by hanzibal on 29 June 2013 - 12:00 PM in General Discussion

Ah yes, I've seen that shield. As you probably know, TI just released their CC2541 based BLE SensorTag - would it be possible to interface that using the Seed Studio BLE shield, one of those inexpensive dongles and (since you mentioned it) the Agent respectively?



#50871 BUILD 2013

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

We built an app for Windows 8.1 (and Windows RT 8.1) using the new Bluetooth Smart (Low Energy) WinRT proximity APIs.

Chris, I'm very interested in BLE and have a few questions about your setup:

 

1. What shield/module/device have you hooked up to your NP2?

2. Is your Win8 machine equipped with built-in BLE or are you using a dongle, if so what dongle is that?

3. Do you know if the BLE APIs are available for other Windows versions than Win8?

 

Thanks!




#50269 How does Netduino interact with a Computer

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

@Silent Walarus:

May I ask what sensor you would be getting the analogue readings from?

There aren't many USB<->analogue boards and if you find one, its likely to be much more expensive than a regular USB<->serial cable.

The Netduino is much better at dealing with analogue than a PC. Depending on your requirements, I think you'd be much better off letting your Netduino do the analogue readings. If your PC app needs the analogue readings, your Netduino could easily send them to the PC using a USB<->serial cable. From the PC app point of view, it's simply a matter of reading/writing to a COM port. You could define your own protocol for sending messages back and forth and having the Netduino perform various tasks initiated by commands sent from the PC app. Same thing on the Netduino side of things, simply read/write to a COM port.

The PeekyPokey is a PC<->Serial and PC<->GPIO combo and cannot operate without the supervision from a PC app running in the other end of the USB cable.

Here's what I think you should do next:

1. Get a USB<->UART (3V3) converter cable like this classic one:
https://www.sparkfun.com/products/9717

or a cheap board like this one:
http://www.ebay.com/...=item484bf4eb2f

2. Hook up your Netduino to your PC via the above cable/board:

Netduino ---------------------- Cable/board
UART_Tx ---------------------- Rx
UART_Rx ---------------------- Tx
GND --------------------------- GND

3. Find some code for doing serial talk from the forum (there are hundreds of posts regarding that)
http://lmgtfy.com/?q...UART Read Write

4. Using that info, write a small program to send the string "Hello world" from your Netduino to your PC

5. Implement your own serial protocol for data interchange and command execution

6. Start working on that sensor (if possible, have the Netduino do the readings)

7. Have tons of fun!



#50270 How does Netduino interact with a Computer

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

Wow, hanzibal, you've been busy :) Very nice! Chris

Thank you, I hope you didn't mind me writing about the board here on the forum. It's not commercially available (yet) though but a first batch of 200 have been ready for some time while I've been "perfecting" the software :-) Coding is very much inspired from my experiences with .NETMF in general and Netduino in particular. In many cases, I've actually been reusing code in both directions. Would you mind if I write a separate post about the board?




#50252 How does Netduino interact with a Computer

Posted by hanzibal on 04 June 2013 - 05:29 PM in General Discussion

Here's the other two videos, it seems one cannot include more than two videos in one post.

 

 

 

Oh, and sorry about the out-of-focus fuzziness and for speaking Swedish in the videos.




#50244 How does Netduino interact with a Computer

Posted by hanzibal on 04 June 2013 - 10:19 AM in General Discussion

For your 1st question, I'd like to add that, since you have a Netduino Plus, a nice way of doing that would be to use networking. That is, you would write a socket listener (or use one of the ready made webbservers available here on the forum) for performing tasks initiated by a PC application. You can also use a USB-to serial converter to communicate with one of the Netduino UARTs. It's also possible to implement a HID device on your Netduino but I think this would be the more cumbersome code wise.




#50251 How does Netduino interact with a Computer

Posted by hanzibal on 04 June 2013 - 05:07 PM in General Discussion

You should be able to find lot's of stuff regarding motor control here on the forum.

As for the PC comm I've made a USB device called PeekyPokey that acts as a virtual COM port and HID device on the PC (talks to Netduino via serial) and has 8 gpio. It comes with an extensive library in the form of an easy to use .NET assembly.

 

Below are a couple of videos of the board that, in order of appearance, 1) shows interaction with a Netduino mini (and a 2nd board), 2) controlling servos, 3) controlling a stepper motor and 4) controlling an LCD.

 

 

 

As can be seen in the videos, the library contains controls in the form of virtual LEDs, buttons and such that can be used for controlling stuff. It also contains USB game pad (joystick) support and a web server (last video).

 

I use the board a lot with my Netduino mini's since it can program/debug the mini, interact with it and power it.




#51132 Serial Ram 23K640 Library

Posted by hanzibal on 06 July 2013 - 12:45 AM in Project Showcase

Hello hanzibal,

Well yes i will reach that approach soon :), actually i am planning to use this ram to work with my HttpLibrarV3 So that it stores all the requests and manipulates them from the ram instead of an internal buffer hence making alot of free memory for code use and variable allocation,

my next project will be itegrating the ram with the HttpLibrary

Cool!

 

I really love this kind of small IC drivers, they're just so nice to have when you need them. It's really stupid we don't have a central repository for these kind of things.

 

As an example, people (including myself) keep making those LCD drivers with multi channel I2C support over and over...




#51113 Serial Ram 23K640 Library

Posted by hanzibal on 05 July 2013 - 02:46 PM in Project Showcase

Nice!

 

Many stream type classes can be created by passing a System.IO.Stream to the constructor. I'm not sure for which this holds true but I think it goes for TextWriter, StringWriter, XMLWriter etc.

 

This would mean that if your class RamStream where to inherit from the System.IO.Stream class (and implement a few basic methods), you could pretty much store all kinds of data onto that nifty little chip.

 

For example, I think it would let you implement memory files so that you can pass in a such a "virtual file" to any method expecting a regular FileStream.




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




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



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



#52306 Audio sampling

Posted by hanzibal on 23 August 2013 - 06:47 PM in General Discussion

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

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.

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 .

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.



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




#50461 Date from netduino plus

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

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?




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




#49491 HT12E and HT12D

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

Hi!

 

I suppose that would depend on the rate at which data must be processed and how lengthy transmissions are.

 

I think it's possible to emulate the decoder using a interrupt pin connected to the data out of the RF receiver since interrupts are correctly time stamped and buffered until your app is ready to examine them. However, if the reception is continuous or comes in too lengthy bursts, the interrupt buffer would overflow and cause communication to fail miserably. 

 

It's probably harder to emulate the encoder depending on the modulation and data rate but maybe it could be done using SPI.

 

Could you perhaps refer to a description (or picture) on how data is modulated outside the RF link?




#49396 multi threading problem

Posted by hanzibal on 13 May 2013 - 06:57 PM in Visual Basic Support

Hi! Start by removing the do...loop in Sub Main, instead use Thread.Sleep(Timeout.Infinite). Next, both your threads will exit as soon as sensor and button reads true respectively. Once a thread exits its method, it stops running and won't get called again per se. Therefore, replace the "loop untill..." with just "loop" in each of the corresponding methods and it should work better. Better still would be for you to declare both sensor and button as Interrupt ports and then use the interrupt to turn motor rotation on and off depending the edge being high or low.



#49399 multi threading problem

Posted by hanzibal on 13 May 2013 - 09:48 PM in Visual Basic Support

I forgot to say earlier; move the if block to inside the do...loop for both threads.



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



#50968 Compiling and downloading

Posted by hanzibal on 30 June 2013 - 08:14 PM in Visual Studio

Pleae note that the free version "Visual Studio Express" will work just fine for working with the Netduino. I recommend getting a Netduino Plus 2 as it is the most versatile with built-in networking and on-board SD card slot. Netduino mini is very small but not as powerful. Good luck!



#52116 Interrupts

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

The STM32F405xx datasheet says "Up to 140 I/O ports with interrupt capability" depending on package:

http://www.st.com/st.../DM00037051.pdf

 

They don't explicitly say that you can enable interrupts on all ports simultaneously and I strongly doubt you can.

 

The reference manual says the interrupt controller has 82 interrupt vectors:

http://www.st.com/we.../DM00031020.pdf

 

Since the interrupt vector table only has 82 entries of which many are used by peripherals, there's no way all GPIOs can be configured for external interrupts. This is confirmed in chapter 10.2.5 that says there are 16 external interrupts.

 

The NP2 has has a maximum of 22 GPIOs and it seems only any 16 of these can be used with interrupts.




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



#50744 Strange AnalogInput readings

Posted by hanzibal on 23 June 2013 - 09:44 PM in General Discussion

So you mean the pull-down I suggested for the open analogue pin was the one thing that helped?





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.