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.

TechnoGuy

Member Since 12 Jun 2013
Offline Last Active Mar 27 2019 08:17 AM
-----

#64785 Netduino 3 Wifi - Not seen in MFDeploy after Update to 4.3.2.2

Posted by TechnoGuy on 21 January 2016 - 04:59 PM

To answer your questions:

 

Netduino 3 WiFi firmware version:

As of the current date, the latest version of the firmware for this device is 4.3.2.2

 

MFDeploy - where do I get it?

There are instructions on the Netduino downloads page on how to setup your development environment.  It says to install 4 things, in a specific order:

  1. MS Visual Studio
  2. .NET Micro Framework SDK
  3. .NET MF plug-in
  4. Netduino SDK

If you've done all of the above, then you'll find MFDeploy by choosing the following from your Start menu (assumes Windows 7) doing either of the following:

  • Start -> All Programs -> Microsoft .NET Micro Framework 4.3 -> .NET Micro Framework Deploy Tool (MFDeploy)
  • Start -> All Programs -> Microsoft .NET Micro Framework 4.3 -> Tools
Pinging...TinyCLR
Yes, that's what you will see...

 

Setting Up WiFi Credentials on the Netduino 3 WiFi

In MFDeploy do the following:

  1. Change device type to USB & make sure your Netduino shows up (mine shows Netduino3_Netduino)
  2. Do a ping just to make sure it's responding; you should see the ack discussed above.
  3. Select Target -> Connect from the menu (you should see a message "Connecting to Netduino3_Netduino...   Connected"
  4. Select Target -> Configuration -> Network from the menu

At this point you should have a dialog box with the heading "Network Configuration" and there will be enterable fields for numerous items.  You'll see a Wireless Configuration group box and all the stuff you need to setup (Authentication, Encryption, Radio, Pass phrase, SSID).

 

Before doing anything, make sure your MAC address hasn't reverted to a default value.  Consult the MAC address label on the underside of your Netduino & re-enter it if necessary.

 

Please see if this all works for you...




#64409 More Digital I/O

Posted by TechnoGuy on 30 October 2015 - 06:36 AM

Hi Greg,

 

You're talking about using SPI - the Serial Peripheral Interface.  That's an interface where you can connect up multiple slave devices in a bus-type configuration.

 

For example you'd use the Netduino as MASTER (controller) and you could have (say) 3 devices as SLAVES.

 

To hook everything together, you'd make the connections as follows:

  • Connect MOSI (Digital 11) on Netduino to the MOSI pins on each of the slaves  "Master Output / Slave Input"
  • Connect MISO (Digital 12) on Netduino to the MISO pins on each of the slaves  "Master Input / Slave Output"
  • Connect SPCK (Digital 13) on Netduino to the clock pins on each of the slaves  "SPI Clock"
  • Connect power & ground as well

Then you'd need to use 1 additional Digital Pin on the Netduino as "Slave Select" (SS) for EACH of the 3 slaves.  You'd connect a separate wire from the Netduino to EACH of the 3 slaves.  On the SPI devices that I have, the corresponding pin on the slave is marked "CS" (chip select).

 

For "Slave Select", you can just use any digital pin (on the Netduino) that isn't already being used for something else.  There is not a specific pin to be used.  I have seen in the Arduino world that they have suggested pins to be used for different things - e.g. SD Card Reader, TFT Display, etc.  That's just a convention.  It's basically to avoid conflicts when stacking ready-made shields & to reduce the need to have to go into canned code & customize values.

 

I found an interesting SPI & I2C tutorial on Youtube the other day that was created by Pete Dokter of SparkFun Electronics.  He's very knowledgeable on these things.  You might want to check it out.

 

SparkFun According to Pete:  SPI & I2C

 

Lastly, I've found that the there are sometimes alternative names used on devices (both slaves & masters) for the pins.  I've seen "DOUT" used (for example) as an alternative name for MOSI and "DIN" as an alternate name for "MISO".  There's a good conversion table on Wikipedia, here.

 

Good luck.




#64120 Netduino Pin Guide

Posted by TechnoGuy on 14 September 2015 - 09:54 AM

First, a disclaimer:  I'm still learning as well ... I do NOT claim to be a guru.

 

Before going on, I will let you know that some of what you're asking is actually covered off in Chris Walker's book, "Getting Started with Netduino".  He does discuss the differences between the digital pins and the analog pins and how to use them.

 

Digital vs Analog Pins

Basically, the digital pins are meant for doing discrete logic (i.e. on/off or "black & white") whereas the analog pins are meant for dealing with ranges of values.  Each analog pin can discern between 4096 possible values.  If you think of the digital pins as handling black & white situations (i.e. on/off or yes/no), the analog pins handle the grey area in between.

  • You can connect on/off switches to the digital pins & turn things (e.g. LEDs) on/off with them.
  • You can connect things like analog sensors & potentiometers to the analog pins.

Overloaded Usage of the Digital Pins

You will see in the referenced diagram that all of the digital pins can be used for MORE than just turning things ON/OFF (or reading when things have switched states).  You will find that the certain subsets of the pins can be used in tandem to implement certain communication protocols.  In particular, the board supports these communication protocols:

I have included in the above list links to the corresponding Wikipedia articles.

 

Your choice of which pin(s) you use will generally be governed by the requirements of whatever sort of device you wish to connect to the Netduino.  For example, I have purchased a variety of temperature &/or humidity sensors from an outfit called Adafruit (they have good stuff).  I've purchased other things from a company called SparkFun Electronics (good stuff also).

  • My HTU21D-F temperature & humidity sensor communicates using I2C, so I have to use the 3V3, GND, SCL & SDA pins on Netduino to communicate with it
  • My DS18B20 temperature sensor communicates using OneWire, so I have to use 3V3, GND and then ANY available Digital I/O pin
  • I just got something called a BME280 (temperature, humidity & pressure) which can connect using either SPI or I2C, so this gives me options...
  • There's a fellow on the Netduino Forums who's using a TMP36 (Analog Temperature Sensor) to read temperature & upload it to a database - he has to interface it using 3V3, GND & one of the analog pins.

You basically need to read the product descriptions when you're buying these things.  Both of the companies mentioned above offer sample code (but it's written for the Arduino) and tutorials on making the connections.  You will benefit from going and reading the datasheets as well...  (I get my kicks from reading the Arduino code samples & translating them into equivalent code that runs under NETMF).

 

About the differences between the different communications protocols (I'm sure other people will have more to say about this or correct anything here that's not quite on the money):

  • I2C is considered to be a low speed communications protocol - it's used when the amount of data to be transferred is generally small (I have found that sensors usually use I2C versus SPI).  Usually you send a 1 or 2 byte command and get back a 2-4 byte response.
  • SPI is a high speed communications protocol (I have found that things like high resolution LCD & OLED displays are frequently implemented using SPI).
  • I2C & SPI are bus-oriented (i.e. you can connect multiple things to the bus / share communication lines).  With I2C, devices are distinguished from one another by means of a hard-coded bus address.  With SPI, an extra wire (one per device) is used to distinguish between devices.
  • OneWire is also a bus-oriented communications protocol.
  • I2C & SPI communicate using synchronous I/O (there is a separate clock signal)
  • UART-based devices communicate using asynchronous I/O (there is NO separate clock signal)
  • (I believe) that I2C & SPI peripheral devices need to be in fairly close proximity to the controller (i.e. the Netduino)
  • UART & OneWire devices can actually be more distant from the controller (with UART you'd use a TTL to RS-232 converter for this purpose...)

I'll leave it here for now.  My recommendation would be for you to buy a couple of temperature sensors and to read the various tutorials on how to use them / read the datasheets.  As mentioned above, the code samples are almost invariably oriented around the Arduino.  There's lots of benefit to be gained from "porting" the code over to NETMF (translating it).

 

If you want some particular recommendations, I'd suggest getting the following:

  • DS18B20 (OneWire):  $3.95 @ Adafruit
  • TMP36 (Analog):  $1.50 @ Adafruit
  • MCP9808 (I2C):  $4.95 @ Adafruit

That's 3 sensors for less than $11.00 US.  (Not including the shipping costs).

 

I have working code for all of these; I can share it with you.  There is working code for the DS18B20 posted in the forums also.




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.