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.
- Netduino Forums
- → baxter's Content
baxter's Content
There have been 63 items by baxter (Search limited from 10-May 23)
#60140 Windows Phone 8 and BLE
Posted by baxter on 18 September 2014 - 07:00 PM in General Discussion
#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.
#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.
#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.
#59396 Netduino Unique ID
Posted by baxter on 25 July 2014 - 05:48 PM in Netduino 2 (and Netduino 1)
Assuming that the Netduino is part of some circuit, maybe you could use a 1-wire unique serial number,
#58962 ATTiny85 talking to Netduino?
Posted by baxter on 30 June 2014 - 06:27 PM in General Discussion
#60509 Function for a curve?
Posted by baxter on 22 October 2014 - 07:15 PM in General Discussion
Here is a nice sequential mean and variance estimator,
http://www.johndcook..._deviation.html
Just sample the analog input or distance for X ms and you have the mean value together with the error estimate.
#60498 Function for a curve?
Posted by baxter on 22 October 2014 - 01:36 AM in General Discussion
I have a Sharp GP2Y0A02YK0F 20-150 cm Distance Sensor. I get good results with the attached function relative to a known distance. I am sorry I don't have the attribution for the curve fit. I think it comes from the Arduino forum. If you search for "Sharp ir distance sensor curve fit", other fits will turn up others with varying degrees of approximation. The functional relationship accurately describes the curve. Your sensor may yield different constants. Just pick some points off of the curve and do a curve fit for the constants in Excel. You might also want to do some smoothing on the measurements because they are noisy with this sensor.
'enable Sharp Analog GP2Y0A02YK0F 20-150 cm Distance Sensor Friend SharpSensor As AnalogInput = New AnalogInput(Cpu.AnalogChannel.ANALOG_0) 'Netduino Plus 1 analog pin 0 SensorVal = distance(SharpSensor.Read() * 3.3) 'in inches Public Function distance(Volts As Double) As Double Dim result As Double Dim A As Double = 0.008271 Dim B As Double = 939.6 Dim C As Double = -3.398 Dim D As Double = 17.339 Dim one As Double = 1.0 result = (A + B * Volts) / (one + C * Volts + D * Volts * Volts) Return result / 2.54 'inches End Function
#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.
#60115 Netduino 2 and Dfrobot GSM/GPS Shield
Posted by baxter on 14 September 2014 - 06:25 PM in Netduino 2 (and Netduino 1)
I just bought a discounted Seeed Gprs at Radio Sack,
http://www.seeedstud...erface_Function
I now find that Seeed is selling a new model, but the basic functionality is the same as the old one.
The serial setup is different from yours, but I think they are doing the same thing. I have mine with the jumpers set to hardware. The shield is plugged in to the Netduino and Netduino is directly talking to the module via COM1. If you want to talk to the module from a PC terminal, configure yours for hardware, but don't plug it in to the Netduino.and take power externally. Then connect a USB-TTL cable to D0, D1 on the shield. The USB to RS232 cable you linked is wrong for this application. You might look at these depending upon the versatility you want ( you can get a cheaper USB to TTL adapter on ebay),
https://www.sparkfun.../products/12977
https://www.sparkfun.../products/11736
My driver in VB seems to working ok with simple commands,
SeeedGprs.SendReceiveCmd("AT") 'can communicate Debug.Print("CmdSent: " & SeeedGprs.CmdSent) Debug.Print("CmdAnswer: " & SeeedGprs.CmdResponse) Thread.Sleep(400) SeeedGprs.SendReceiveCmd("AT+COPS?", , 400) 'Carrier info Debug.Print("CmdSent: " & SeeedGprs.CmdSent) Debug.Print("CmdAnswer: " & SeeedGprs.CmdResponse) Thread.Sleep(400) SeeedGprs.SendReceiveCmd("AT(+CSQ)") 'signal quality Debug.Print("CmdSent: " & SeeedGprs.CmdSent) Debug.Print("CmdAnswer: " & SeeedGprs.CmdResponse) CmdSent: AT CmdAnswer: OK CmdSent: AT+COPS? CmdAnswer: PS: 0,0,"T-Mobile" OK CmdSent: AT(+CSQ) CmdAnswer: OR
To go much further, I need an activated SIM card. The phones I have use a micro SIM and these modules take a standard size. I guess the answer is to just use the carrier for a micro SIM in in an activation kit.
#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.
#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.
#59722 Netduino Plus 2 for $40
Posted by baxter on 14 August 2014 - 07:41 PM in Netduino Plus 2 (and Netduino Plus 1)
RETROSPARK promotional code doesn't work on this item. I just tried to buy it. The price is $50.
#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
#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
#58819 De-Icing, Chickens, and Artificial Sunrise
Posted by baxter on 21 June 2014 - 04:58 AM in General Discussion
Here is a nice automatic chicken door project from the UK,
#58925 convert data types to byte[] and back for streaming
Posted by baxter on 27 June 2014 - 05:47 AM in General Discussion
I previously confronted this issue and found a couple of references,
https://www.ghielect...3/serialization
http://bytes.com/top...ture-byte-array
I copied the structure serialize code (near the bottom of the page) from the second reference and it compiles
just fine on the Mini using firmware 4.2.0.1.
Imports Microsoft.SPOT Imports Microsoft.SPOT.Hardware Imports SecretLabs.NETMF.Hardware Imports SecretLabs.NETMF.Hardware.NetduinoMini Imports System.Reflection Imports System.Runtime.InteropServices Imports Microsoft.VisualBasic.Constants Imports System.Text Imports System.Threading Imports System.Collections Module Module1 Sub Main() Dim s As Struct = New Struct Dim ms As MyStruct = New MyStruct With {.el1 = 1, .el2 = 2, .el3 = 3} Dim sb() As Byte = Struct.Convert(ms) End Sub <StructLayout(LayoutKind.Sequential, Pack:=1, Size:=12)> Private Structure MyStruct Dim el1 As Byte Dim el2 As Int16 Dim el3 As Byte End Structure Public Class Struct 'Charles Law 'http://bytes.com/topic/visual-basic-net/answers/357098-convert-structure-byte-array Public Shared Function Convert(ByVal MyStruct As Object) As Byte() Dim al As ArrayList Dim Fields As FieldInfo() = MyStruct.GetType.GetFields al = New ArrayList For Each fld As FieldInfo In Fields If fld.FieldType.Equals(GetType(Byte)) Then ' Add byte to array list al.Add(CByte(fld.GetValue(MyStruct))) ElseIf fld.FieldType.Equals(GetType(Int16)) Then ' Add 16-bit value to array list Dim i16 As Int16 i16 = CType(fld.GetValue(MyStruct), Int16) al.Add(CByte(i16 >> 8)) al.Add(CByte(i16 And &HFF)) Else Throw New Exception("Cannot convert type.") End If Next fld Return DirectCast(al.ToArray(GetType(Byte)), Byte()) End Function End Class Public Function PrintArray(title As String, ByVal Arr() As Byte) As String Dim s As String = title & vbCrLf For i = 0 To Arr.Length - 1 s &= "i = " & i.ToString & " " & "Byte = " & Arr(i).ToString("X2") & vbCrLf Next Return s.Trim End Function End Module
I didn't run it for this post because my Mini is in storage. I lost interest in this because I found for my purposes it was easier to just convert the data type to a string and then convert the string to bytes and then reverse this to go back to the data type (not too efficient, but it works)
#59735 Netduino Mini $10
Posted by baxter on 16 August 2014 - 02:02 AM in Netduino Mini
Thanks ... Great price, bought one.
#60391 I2C issue with multiple sensors
Posted by baxter on 11 October 2014 - 08:34 PM in Netduino Plus 2 (and Netduino Plus 1)
Have you looked at this for multiple devices on the I2C bus?
http://forums.netdui...e-i2cbus-class/
#58657 NetDuino Plus 2 + Spark.io ?
Posted by baxter on 10 June 2014 - 03:50 AM in Netduino Plus 2 (and Netduino Plus 1)
I don't think the Spark Core is Micro Framework compatible. You may have a bit of trouble connecting the hardware to a Netduino Plus 2. Maybe you could talk to it over the serial interface. Or perhaps, give your Netduino a wireless interface with an ethernet to wireless adapter ,
#58926 NetDuino Plus 2 + Spark.io ?
Posted by baxter on 27 June 2014 - 06:53 AM in Netduino Plus 2 (and Netduino Plus 1)
I bought a Spark Core and it looks to be a nice companion to provide WiFi capability for a Mini or a Netduino 1 or 2 by talking over the serial port as EnergySmithe noted. There are two serial ports, serial and serial1. The former is the regular Arduino debug port to be used with a serial terminal and the latter would be used to talk to a Netduino. The IDE is cloud based with the same buttons as the Arduino IDE, verify, flash ... They also have an Android App to work with the pins and configure the core for your network. I found the following sample code for a webserver and it works like a charm. The only problem I see with it vs Netduino is shifting gears to program an Arduino.
TCPClient webClient; TCPServer webServer = TCPServer(80); char myIpAddress[24]; int LED = D7; void setup() { pinMode(D7,OUTPUT); // Turn on the D7 led so we know it's time digitalWrite(D7,HIGH); // to open the Serial Terminal. Serial.begin(9600); // Now it's ok to open your serial terminal software, and connect to the // available COM port. The following line effectively pauses your // application waiting for a character to be received from the serial // terminal. While it's waiting it processes the background tasks to // keep your Core connected to the Cloud. Press ENTER in your // serial terminal to start your application. while(!Serial.available()) SPARK_WLAN_Loop(); Spark.variable("ipAddress", myIpAddress, STRING); IPAddress myIp = Network.localIP(); sprintf(myIpAddress, "%d.%d.%d.%d", myIp[0], myIp[1], myIp[2], myIp[3]); Serial.print("Spark Core connected to IP: "); Serial.println(myIp); digitalWrite(D7,LOW); // Turn off the D7 led ... your serial is serializing! webServer.begin(); } void loop() { if (webClient.connected() && webClient.available()) { serveWebpage(); } else { webClient = webServer.available(); } } void serveWebpage() { //TODO: read in the request to see what page they want: //TODO: retrieve larger content from flash? webClient.println("<html>Hello I'm serving a webpage!</html>\n\n"); webClient.flush(); webClient.stop(); delay(100); }
#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
#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,
#59359 How to control netduino plus 2 over the Internet
Posted by baxter on 23 July 2014 - 09:19 PM in Netduino Plus 2 (and Netduino Plus 1)
What about DynDNS,
http://dyn.com/support/wizard/
http://www.tp-link.u...icle/?faqid=297
I haven't used it for a while, but I set it up for a Netduino Plus 1. It's fiddly to get going from behind your router unless you have a smartphone (or use a neighbor's network). Most consumer routers do not have NAT loopback so testing needs to be done from a network external to your local network. Or, in my case, I used a spare router running DD-WRT with NAT loopback for local testing. DynDNS is no longer free, but there are other services.
I don't see that this poses a greater security risk than other traffic coming in through your ISP.
#58704 How to 3D print your project a custom case!
Posted by baxter on 13 June 2014 - 04:58 PM in General Discussion
As someone obviously familiar with 3D printing, what do you think of the Da Vinci 1.0 3D Printer?
- Netduino Forums
- → baxter's Content
- Privacy Policy