Main Site Documentation

Netduino 3 Wi-Fi with TinyCLR OS: I2cDevice .Configuraton BMP180 and Networking Sockets class


GHI community: Thank you for taking on the Netduino boards in Visual Studio 2017 with TinyCLR OS firmware and support Libraries.
The addition of TinyCLR OS firmware (most recent v0.8.0) for Netduino 3 Wi-Fi boards has saved my base course material. General “Gpio” pin assignment has gone well. But, I am still struggling with I2c (temp sensor) specifically, I2cDevice.Configuration and Networking “Socket” class code transformation from previous working VS.NETMF build. Any help is much appreciated.
I am using legacy I2c code for BMP180 sensor and Networking. Trying to get the files “cleaned-up” for the STM32F4 build.

Can’t fild the workaround for I2cDevice.Configuration and Socket code. The platform is Netduino 3 Wi-Fi (TinyCLR app), and MSVS2017. Thank you in advance for your help.
Code I2c generating the error:
private I2cDevice.Configuration _slaveConfig = new I2cDevice.Configuration(BMP085_ADDRESS, 100);
error is: the name Configuration does not exist in the type I2cDevice
The instance _slaveConfig is referenced several times later in code:
I2CBus.GetInstance().ReadRegister(_slaveConfig, (byte)Registers.BMP085_REGISTER_CHIPID, whoami, TransactionTimeout);

Networking code “Sockets” generating the error:
private Socket webSocket = null;
/* Initialize the Socket Class */
webSocket = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);
Error message:
The type of Namespace “Socket” could not be found. Are you missing a a using directive…
Name “SocketType”, AddressFamily, ProtocolType all generate error message.

I have usings added to program build:
using System
using System.Threading
using System.Text
using System.Diagnostics
using System.IO
using GHIElectronics.TinyCLR.Networking
using GHIElectronics.TinyCLR.Networking.SPWF04Sx
using GHIElectronics.TinyCLR.Devices
using GHIElectronics.TinyCLR.Devices.Gpio
using GHIElectronics.TinyCLR.Devices.I2c
using GHIElectronics.TinyCLR.Pins

I have References added to the soluton


We haven’t tested I2C I believe, but we need your help so please provide any feedback you have there.

Networking is not in the current release yet. Contributions are also welcome. I think the original code is open source from netduino? If so, can it just be moved to the TinyCLR firmware?


As for I2C, the API is quite a bit different from what it was in NETMF. There’s no longer a configuration object. The docs have a simple intro example that should get you going with I2C.


thank you. I will work on this and share my progress.