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

baxter's Content

There have been 63 items by baxter (Search limited from 25-April 23)


By content type

See this member's


Sort by                Order  

#60137 Windows Phone 8 and BLE

Posted by baxter on 18 September 2014 - 06:20 AM in General Discussion

If other people with 8.1 on their phone run into problems with BLE, it's likely because you have the developer version of 8.1 installed.

 

For now (not sure on long term here), the firmware won't deploy to Nokia devices running the developer version of 8.1. In order to get the firmware (which is required for BLE) you need to revert your device back and install the consumer 8.1.

 

Super inconvenient, sorry. But I want to make sure you have a workaround.

 

Pete

 

A bit off topic, but do you suppose that the following problem that I am having could be related to the developer version of 8.1. My 521 is unlocked, no SIM installed with Win 8.1.1 preview developer edition and is connected to my wireless network. If I type a known site such as Google or Yahoo into IE on the 521, the page display is nearly instantaneous so WiFi works just fine.

 

The problem is I have several devices on my network that are administered by web servers. If I type an IP address such as 192.168.0.166 to access the server it is necessary to login with a user name and a password. I can login from any computer on my network, but not with the Lumia 521. With the 521, the login page comes up and I enter the correct user/password, but it is always rejected.

 

I bought the Lumia 521 specifically to test login to the device servers from the Internet via DynDns. Port forwarding is setup correctly on my router. However, when I insert a T-Mobile SIm in good standing (wiFi, off) and issue <MyDevice>.dyndns.org:8080 from IE on the 521, the same thing happens; the login is rejected.




#60140 Windows Phone 8 and BLE

Posted by baxter on 18 September 2014 - 07:00 PM in General Discussion

Thanks Pete, I tried your suggestion, but it didn't work for a simple network login to my router. The problem must be somehow related to the developer preview 8.1 for Windows Phone. I guess I am forced dig out an old DD-WRT router with NAT-loopback enabled to test internet access for devices behind my router.




#60195 Windows Phone 8 and BLE

Posted by baxter on 22 September 2014 - 10:06 PM in General Discussion

 Cyan isn't available for the Lumia 521, but thanks for the link.




#58882 Windows on Devices? When?

Posted by baxter on 25 June 2014 - 01:07 AM in General Discussion

Hi All,

 

just registered on the windowsondevices web site, replied to their confirming email and some seconds later they replied again:

 

Quote: "Thank you for signing up for the Windows Developer Program for IoT.  We’ll let you know when your kit has shipped."

 

So appearantly something has changed ....

 

Cheers,

 

Me.

Got the same message ...

Interesting that they ask if using Spark IO (Spark Core) as a development board. I bought one and it does WiFi quite well. It has the  same footprint as the Mini; just a bit longer.




#60853 Which Micro SD Cards will work

Posted by baxter on 03 December 2014 - 06:42 PM in Netduino Plus 2 (and Netduino Plus 1)

I recall that Chris recommended a 2GB kingston from Amazon,

http://www.amazon.co...B/dp/B0015R2NUW




#62970 Unique device ID

Posted by baxter on 29 May 2015 - 04:27 PM in Netduino Plus 2 (and Netduino Plus 1)

See post #8,
http://forums.netdui...uino-unique-id/




#58584 Starts in boot mode always after flash

Posted by baxter on 06 June 2014 - 03:48 AM in Netduino Mini

I resorted to 4.1 firmware and do not encounter this issue. Both TinyCLR and RESET are working.

 

After looking through the posts here, I see that the 4.2.0.0 firmware is not available. Does anyone have a copy of it that I can test?

Here is the link for Mini firmware 4.2.0.1, both RS232 and TTL

http://forums.netdui...-v420-update-1/




#58961 Spark Core (TI CC3000) Porting for Super WiFI Mini?

Posted by baxter on 30 June 2014 - 05:34 PM in Netduino Mini

Yes, piwi ...




#58948 Spark Core (TI CC3000) Porting for Super WiFI Mini?

Posted by baxter on 29 June 2014 - 06:11 AM in Netduino Mini

Are you still working on your CC3000 Managed Driver? I noticed Jan 9 was the last commit on CodePlex. The 2nd generation CC3100 looks intersting. Maybe they have some of the CC3000 kinks worked out. I was going to buy a CC3200, but then changed my mind after recalling my experiences with the CC3000 Boost module and LaunchPad.

 

I purchased a Spark Core and it works pretty much as intended. It's easy to establish a local network connection, serve webpages and so on, but curiously, it won't respond to a ping. However, it will send pings and get responses. They blame this on firmware 1.29 which removed ping responses to fix an an ARP problem. Earlier firmware versions supposedly did have ping  response. In any event, I am reasonably happy with the Spark Core; I just wish it ran MF managed code.




#58787 Sound Sensor, Wifi Shield and BreadBoard

Posted by baxter on 19 June 2014 - 06:51 PM in Netduino Plus 2 (and Netduino Plus 1)

I don't think there any Netduino specific WiFi shields. Look for an Arduino shield. Here is one,
https://www.sparkfun.com/products/9954
The problem with these shields is that the drivers are Arduino specific. This is a Netduino project using an Arduino shield with Netduino drivers,
http://forums.netdui...rary/#entry7870
But, expect to be frustrated with these shields because you need to talk to them over SPI. However, You don't need a WiFi shield. The Edimax simply turns your Netduino ethernet port transparently into a wireless connection; thereby avoiding all driver complications. After you configure the Edimax for your network, connect its ethernet port into the Netduino ethernet port, provide power to the Edimax and the Netduino will be connected to your wireless network. Also, another advantage is that you do not tie up any SPI pins.

 

If you want a stack arrangement,, just get a protoshield and affix the Edimax to it. The Edimax will fit exactly between the headers without any modification.




#58765 Sound Sensor, Wifi Shield and BreadBoard

Posted by baxter on 18 June 2014 - 05:55 PM in Netduino Plus 2 (and Netduino Plus 1)

Google is your friend,
http://www.newegg.co...N82E16833315095
http://www.ebay.com/...cat=0&_from=R40

You can buy breadboards anywhere; Mouser, Adafruit ...




#59740 Servers Ultimate Pro Free Android App from Amazon

Posted by baxter on 16 August 2014 - 07:15 PM in General Discussion

Don't know much about it, but may be useful with a Plus 1 or 2.

http://www.amazon.co...e/dp/B00E00C70C
http://slickdeals.ne...free-on-amazon?




#62108 Serial Port read data

Posted by baxter on 14 April 2015 - 05:57 PM in Netduino Plus 2 (and Netduino Plus 1)

I was using this with an ESP8266 AT command set driver (since abandonded in favor of the Lua firmware). Just instantiate the port without an event handler and then receive serial in a wait loop.

Public Sub New(ByVal ComPort As String, _
                   Optional ByVal baud As Integer = 9600)
        Port = New SerialPort(ComPort, baud, Parity.None, 8, StopBits.One)

        With Port 'note no event handler
            .Handshake = Handshake.None
            .WriteTimeout = 200
            .ReadTimeout = 200
            .Open()
        End With
        InputString = String.Empty
        'need to change if not 9600
        If (baud <> _DefaultBaud) Then '9600 is default baud rate of ESP8266 firmware (0.9.2.2)
            _Baud = baud
        End If
    End Sub

---------------

Public Function GetFromESP(Eot As String) As String
        'this is the main reader for ESP responses. It will wait for the expected Eot or
        'a socket exception will be thrown if the response contains, ERROR or Unlink

        Dim n As Integer = 0
        Dim response As String = String.Empty
        InputString = String.Empty
        While (True)
            If (Port.BytesToRead > 0) Then
                Dim buff = New Byte(Port.BytesToRead - 1) {}
                n = Port.Read(buff, 0, Port.BytesToRead)
                Thread.Sleep(200)
                InputString &= New String(Encoding.UTF8.GetChars(buff))
                'Debug.Print("Inputstring: " & InputString)

                If (Contains(InputString, Eot)) Then 'expected return
                    Exit While
                    'Trap for socket connect to inactive server
                ElseIf (Contains(InputString, "CIPSTART") And _
                       (Contains(InputString, "ERROR") _
                        Or Contains(InputString, "Unlink"))) Then
                    response = InputString
                    InputString = String.Empty
                    Throw (New ESPexception("Socket can't connect: GetFomESP returned ERROR Unlink"))
                End If
                Thread.Sleep(50) 'need this delay (maybe more)
            End If
        End While
        response = InputString
        InputString = String.Empty
        Return response
    End Function



#59577 Serial port issues

Posted by baxter on 06 August 2014 - 02:29 AM in Netduino 2 (and Netduino 1)

You need to add,

using System.IO.Ports;




#59355 Serial Issues

Posted by baxter on 23 July 2014 - 07:44 PM in Netduino Plus 2 (and Netduino Plus 1)

RS232 uses inverted logic; TX/RX idle logic low. Netduino COM ports idle high. Most PC serial ports are RS232 and they may or may not conform to the RS232 standard (+/- 12V). Measure the TX voltage on your PC serial port. If it is less than about 2.5V, then your problem is inverted logic. You can invert TX/RX with a 74LVC2G14 or a 74HC14 Schmitt trigger Inverter The simplest thing to do is just buy a USB to serial TTL adapter and forget the PC serial port.
 




#60332 Scheme-it

Posted by baxter on 03 October 2014 - 12:56 AM in General Discussion

There's  easyEDA,

http://easyeda.com/

 

It was free when I signed up, but I haven't used it much. Also, LTspice IV,

http://www.linear.co...tools/software/




#59981 Safe code to convert byte[4] to float

Posted by baxter on 04 September 2014 - 01:06 AM in General Discussion

Here is some VB code to go from an IEEE 754 single to 4 bytes and back to a single. It is indeed the hard way to do it. I wrote this before the "unsafe" bitconverter appeared on the scene, but now use the unsafe BC and have never had problems with it.

Imports Microsoft.SPOT
Imports Microsoft.SPOT.Hardware
Imports SecretLabs.NETMF.Hardware
'Imports SecretLabs.NETMF.Hardware.NetduinoPlus
Imports SecretLabs.NETMF.Hardware.Netduino
Imports System.IO
Imports System.Text
Imports System.Collections
Imports System.Diagnostics
Imports System.Text.RegularExpressions
Imports System.Math

Module Module1

    Sub Main()  
        Dim buf() As Byte
        Dim sing As Single
        Dim svalue As Single = 44411.5625
        buf = SingleToFourByte(svalue)
        sing = FourByteToSingle(buf)
        Debug.Print("value - sing = " & (svalue - sing).ToString) '--> 0
    End Sub
End Module

    Public Function FourByteToSingle(ByVal ByteArray() As Byte) As Single

        Dim bin As String = String.Empty
        Dim denormalized As Boolean = False
        Dim exp, start, coeff As Integer
        Dim mantissa As String
        Dim sum As Double
        Dim TwoPow As Integer = 1
        Dim mult As Double = 1

        'Convert 4 byte array to binary in reverse order 
        '(assumes  given array came from a 32bit little-endian integer)
        '--------------------------------------------------------------
        For i As Integer = ByteArray.Length - 1 To 0 Step -1
            bin &= IntToBin(ByteArray(i))
        Next

        'Split apart the binary string. Assumes IEEE 754 single format
        '-------------------------------------------------------------
        Dim sign As Integer = If(bin.Chars(0) = "1", -1, 1) 'leading bit
        Dim expt As Integer = CInt(BinToInt(bin.Substring(1, 8))) 'biased exponent
        Dim fraction As String = bin.Substring(9)           'fractional part
        Dim TempFraction As Integer = CInt(BinToInt(fraction))    'integer for testing

        'Test for special cases (zero, denormalized, +/-infinity, NaN)
        'a good reference for thes cases: http://steve.hollasch.net/cgindex/coding/ieeefloat.html
        '----------------------------------------------------------------------------------------
        If (expt = 0 And TempFraction = 0) Then Return 0
        If (expt = 0 And TempFraction <> 0) Then denormalized = True
        If (expt = 255 And TempFraction = 0) Then Return CSng(If(sign = 1, 1 / 0, -1 / 0))
        If (expt = 255 And TempFraction <> 0) Then Return 0 / 0

        If (denormalized) Then
            exp = -126
            mantissa = fraction
            start = 0
            sum = 0
        Else
            exp = expt - 127
            mantissa = "1" & fraction
            start = 1
            sum = 1 'implied bit
        End If

        'Convert mantissa to single using double arithmetic to keep full precision
        '-------------------------------------------------------------------------
        For i As Integer = start To mantissa.Length - 1
            TwoPow = 2 * TwoPow
            coeff = If(mantissa.Chars(i) = "0", 0, 1)
            If (coeff = 0) Then Continue For
            sum = sum + 1.0 / TwoPow
        Next

        'scale the power of 2: 2^exp --> [(2^exp)*(10^-pow10)]*(10^pow10)
        '----------------------------------------------------------------
        'Constant to scale away exponent power of 2
        'log(2)/log(10) = 0.30102999566398119521373889472449
        'reqd power of 10 = (power of 2)*(log(2)/log(10))
        Dim ReqPowerOf10Const As Double = 0.3010299956639812

        Dim Pow10 As Integer = CInt(exp * ReqPowerOf10Const)
        Dim Pow2 As Integer = exp - Pow10 'reduce the power of 2 exponent [10^pow10 = (2^pow10)*(5^pow10)]
        mult = (2 ^ Pow2 / 5 ^ Pow10) * 10 ^ Pow10

        Return CSng(sign * sum * mult)
    End Function

    Public Function SingleToFourByte(ByVal singl As Single) As Byte()
        Dim byts(3) As Byte
        Dim test As UInt32 = CUInt(singl)
        Dim SingnOf As Integer = Sign(singl)                ' = -1 if negative
        Dim FracPart As Single
        Dim IntPart As UInt32 = CUInt(Floor(Abs(singl)))    'integer part
        FracPart = CSng(Abs(singl) - CSng(IntPart))         ' fractional part
        Dim FracPartBin As String = String.Empty
        Dim IntPartBin As String = String.Empty
        FracPartBin = DecFracToBin(FracPart)
        IntPartBin = DecIntToBin(IntPart)

        'Normalize
        Dim BinExpt As Integer = IntPartBin.Length - 1  'Highest bit set -1
        Dim Exponent As UInteger = CUInt(BinExpt + 127) ' Biased exponent
        Dim BiasedExpt As String = DecIntToBin(Exponent)

        'Remove most significant bit
        IntPartBin = IntPartBin.TrimStart({"1"c})
        'concatenate the mantissa and pad to 23 bits if necesary
        Dim Mantissa As String = IntPartBin & FracPartBin
        Dim LenMant As Integer = Mantissa.Length
        Dim Pad As String = String.Empty
        Do Until (LenMant = 23)
            Mantissa = Mantissa & "0"
            LenMant = Mantissa.Length
        Loop
        Dim IEEE754 As String = If((SingnOf = -1), "1", "0") & BiasedExpt & Mantissa
        Dim LenIEEE As Integer = IEEE754.Length
        Utility.InsertValueIntoArray(byts, 0, 4, BinToInt(IEEE754))
        Dim k As Integer
        Dim substr As String = String.Empty

        Return byts

    End Function

Function IntToBin(ByVal byt As Byte) As String
        'Convert a byte to a binary string 
        Dim temp As Byte = byt
        Dim binval As String = String.Empty
        Dim count As Integer = 0
        Do
            binval = CStr(temp Mod 2) & binval
            temp = CByte(temp \ 2)
            count += 1
        Loop Until count = 8 'pad leading zeros

        Return binval

    End Function

Public Function BinToInt(bin As String) As UInteger
        'Horner's method to evaluate polynomial
        '01110110 msb, msb-1, ... 0 (e.g. msb to lsb, left to right)
        Dim len As Integer = bin.Length
        Dim temp As UInteger = CUInt(If(bin.Chars(0) = "0", 0, 1))
        For i As Integer = 1 To len - 1
            temp = CUInt(temp * 2 + If(bin.Chars(i) = "0", 0, 1))
        Next
        Return temp
    End Function

Public Function DecFracToBin(frac As Single) As String
        Dim BinFrac As String = String.Empty
        Dim temp As Single
        Dim carry As Integer
        While frac <> 0
            temp = frac * 2
            carry = CInt(Floor(temp))
            BinFrac = CStr(carry) & BinFrac
            frac = temp - carry
        End While
        Return BinFrac
    End Function

    Function DecIntToBin(ByVal Intgr As UInteger) As String
 
        Dim temp As UInteger = Intgr
        Dim binval As String = String.Empty
        Dim count As Integer = 0
        Do
            binval = CStr(temp Mod 2) & binval
            temp = CUInt(temp \ 2)
            count += 1
        Loop Until (temp = 0)

        Return binval

    End Function




#60188 RS-232 Pins

Posted by baxter on 22 September 2014 - 07:12 PM in Netduino Mini

Question 1 is yes, but  cross connect them TX-RX, RX-TX and GND.  You do need a TTL/RS232 adapter for COM1 if you want to use your RS232 cable for both ports.

 




#60193 RS-232 Pins

Posted by baxter on 22 September 2014 - 09:39 PM in Netduino Mini

http://www.amazon.co...i/dp/B004CT1ZUE
As far as I know, there are no plans to discontinue production.




#60737 Porting eLua to the NetDuino

Posted by baxter on 17 November 2014 - 10:03 PM in Netduino 2 (and Netduino 1)

I only tried the binary for the ET-STM32 Stamp.




#59272 NP2 Wireless Button/Switch

Posted by baxter on 17 July 2014 - 01:47 AM in Netduino Plus 2 (and Netduino Plus 1)

The Ciseco XRF has a 1km max range with the supplied whip antenna (300m with chip antenna). Other models with chip antenna are of the order of 100m (max). Cheap 433 MHz modules typically have 20-100m range (mostly toward the lower end) depending upon the power, antenna and obstructions.

 

Reading toward the bottom of the page, that Amazon combo has Specifications:
Transfers distance: 80m (100-200m to the max for open spaces)
Receiving distance: 200m (100-200m to the max for open spaces)
and also, the battery probably costs more than the combo.

Important Note: The remote control does not include battery because of the strict customs inspection. Please prepare a "23A 12V" battery for it. We appreciate your understanding and support. 

 

Edit: While looking at that page, I spotted another remote control (claims 100m),
http://www.amazon.co...13FQECK319ARBPC




#59260 NP2 Wireless Button/Switch

Posted by baxter on 16 July 2014 - 07:02 PM in Netduino Plus 2 (and Netduino Plus 1)

433 MHz
http://code.google.com/p/rc-switch/
http://www.amazon.co...r/dp/B00JL30QQU

If you need some intelligence at the remote end look at Pololu Wixels
http://www.pololu.com/product/1336

I have a pair of these and they work quite well up to about 50 ft.

This is a well regarded long range module,
http://shop.ciseco.c...le-xbee-shaped/
You can change the personality of the module by installing the appropriate firmware (Appendix 2: Dual Relay?)
http://openmicros.or...-llap-reference




#59169 New Modules Seen in the Wild

Posted by baxter on 11 July 2014 - 09:27 PM in Netduino Go

 

Mine has sat unused in its box since I excitedly bought one when it first came out. I expect it to stay there.

Mine also 




#59078 NETMF SerialPort and "BreakState"

Posted by baxter on 07 July 2014 - 04:48 PM in Netduino Plus 2 (and Netduino Plus 1)

I searched for the SRF01,
http://www.robot-ele...m/srf01tech.htm
you have not picked an easy part to start your hardware adventures. The problem is you are sending out on Netduino TX to SRF01 RX and SRF01 is sending back on the same line, but you are listening on the Netduino RX which has no connection to the SRF01. Hook Netduino TX/RX with the diode as shown in this circuit from the reference and it will probably work. The site looks to be pretty complete for interfacing the SRF01.

Attached Thumbnails

  • TX_RX Interface.JPG



#59031 NETMF SerialPort and "BreakState"

Posted by baxter on 06 July 2014 - 04:25 AM in Netduino Plus 2 (and Netduino Plus 1)

Here is a Netduino post that might interest you,
http://forums.netdui...mx-transmitter/
He is using the AND gate approach for the BREAK. Apparently it works because he has tested it.

 

Completely missed this reference ...





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.