- Netduino Forums
- → monewwq1's Content
monewwq1's Content
There have been 104 items by monewwq1 (Search limited from 29-April 23)
#19625 Netduino - WiFi
Posted by monewwq1 on 23 October 2011 - 03:54 AM in Project Showcase
In this video, the Netduino's connect to each other via an ad-hoc Wi-Fi connection- there are no routers or computers involved in this demo. At the start, each Netduino powers up and sets its LED high. After a short initialization delay, the first Netduino then sends a TCP message to the other Netduino to set a random color for its LED. The second Netduino responds and sets its color. Then the second Netduino sends a TCP message to the first Netduino to set its LED to a random color. The first Netduino responds by setting its color and then sends a message back to the second Netduino, etc., etc...
The effect is a visual representation of the ad-hoc TCP messages between the two Gainspan modules. This could be the basis for a wireless sensor network. I did a rough test in the backyard and these modules can talk back and forth out to 150 feet apart in an open-air scenario.
I moved the modules around in the video just to demonstrate that it is completely wireless. It is kind of a long video, but still cool. My bag of Doritos and my iPad make a brief cameo appearance. Lol
Netduino: Gainspan ad-hoc Wi-Fi communications
#19623 Netduino - WiFi
Posted by monewwq1 on 23 October 2011 - 03:39 AM in Project Showcase
I just got a gainspan 1011 breakout board in the mail to give my netduino some wireless comm. I looked at the datasheet and it appeared all I had to do to it was put power and rs232 on it and start throwing AT commands down the serial connection. I'm using my netduino for powering the gainspan board. I'm using a rs232 cable with flying leads coming from my computer and a program called RealTerm (v2) for talking to it. I started with the my settings at 9600,8,n,1. When I send the "AT\r" command, I just get jibberish back. It looks like the baud settings are wrong, but those are the default settings from what I can tell. Does anybody have any ideas as to what I'm doing wrong?
According to the documentation, the module requires repeatedly sending the "AT\r" command until an "OK" response is received. Are you sending "AT\r" multiple times until you receive "OK"? If you are, and you're never getting an "OK", it sounds like a baud rate or wiring/setup issue.
#19621 Grounding/ungrounding a single wire
Posted by monewwq1 on 23 October 2011 - 02:48 AM in General Discussion
Netduino touches my iPad.
See video action here: Netduino triggers iPad Drums. The ticking sound is not a metronome- it is the 9vdc relay I'm using to open and close the Ground.
I also notice that if I increase the speed, sometimes it misses hits on the touchscreen. Does anyone know why? Other than the anti-static foam, should I use other materials to get a more reliable contact?
#19619 Grounding/ungrounding a single wire
Posted by monewwq1 on 23 October 2011 - 02:00 AM in General Discussion
#19615 Netduino - WiFi
Posted by monewwq1 on 23 October 2011 - 12:57 AM in Project Showcase
#19612 Swag
Posted by monewwq1 on 23 October 2011 - 12:42 AM in General Discussion
#19598 Netduino - WiFi
Posted by monewwq1 on 22 October 2011 - 03:30 PM in Project Showcase
Hi,
Can you tell me the commands I need to pass using the usb ttl device to firstly connect to my network and secondly do the firmware update.
I have connected to the device and have found my network but can't figure out how to connect to it?
Also I have no idea what I need to do to flash the new firrmware on to it?
I am using the tera term app that came with the firmware update files.
Thanks in advadance your help is much appreciated.
Andy
If you're using a USB-to-TTL connection, just connect it directly to the Gainspan. You do not need to connect to any network. You're using UART comms at that point.
If you have the full documentation, the FIrmware download should have provided a com port program to use for updating the firmware (note: this is not the Tera Term app; it is another app in the download files. SOrry, I don't remember the name of it at the moment).
#19569 Grounding/ungrounding a single wire
Posted by monewwq1 on 21 October 2011 - 10:22 PM in General Discussion
- Connect anti-static foam directly to the display of an iPad (the anti-static foam is the stuff that IC's are normally mounted on when shipped)
- Connect a wire from Ground to the anti-static foam
- Trigger the Ground connection on and off
This makes the Netduino "touch" the iPad touchscreen. I've already tested this simple scenario and it works, but I have to physically touch the wire to Ground and remove it. I need some way of doing this with Netduino programming.
I have an iPad drums application, and my current idea is to make an automatic drum sample controller with the Netduino;
- Connect anti-static foam to each drum kit point on the iPad display
- Connect separate Grounds for each wire
- Trigger these wires individually so I can press each drum-kit item separately (high-hats, cymbals, bass drum, etc.)
- Record and play back the drum sample on the Netduino, sort of like one of those pianos that plays automatically.
This would also allow me to trigger the drum kit with other materials by using pressure sensors. Ultimately, I could use regular drum sticks on other materials to play the electronic drum kit on the iPad.
The problem I'm solving with this: the iPad display is small, and obviously I cannot smack real wooden drum sticks directly onto the iPad display, so I have to use my fingers to play the drum kit, which is not true to a real drum set, and it is cumbersome.
This would open up the ability to create a small electronic drum kit that could be played with real drum sticks. All the sounds are already there on the iPad; I just need to implement the electronic connections to "touch" the iPad display.
What do you think? Dumb idea? Cool idea? Useless idea?
Has anyone done anything like this before? Any tips?
Thanks!
#19551 Grounding/ungrounding a single wire
Posted by monewwq1 on 21 October 2011 - 06:08 PM in General Discussion
#19278 Netduino - WiFi
Posted by monewwq1 on 16 October 2011 - 11:43 PM in Project Showcase
Hi,
I have just got a gainspan module from sparkfun, and I wondered if you could help...
Firstly can you tell me which version of the firmware do I need (I have the NDK now), I have downloaded both but am not sure which one to use; the Mxp or MEE?
Also how do I then update the firmware?
Finally do you have an example web script as I have not really done much with websites before and don't really know where to begin with that side?
Many thanks,
Andy
Andy,
Out of the box, you do not need to update the firmware. If you need the current functionality, such as Bulk Data mode and others, you'll need to update the firmware.
The part number should be written on the device. Mine is a GS1011MIP, so I would use the MxP firmware. The part number just indicates whether it uses an internal or external Power Amplifier (PA) and whether it uses an external or PCB antenna. For example, an MIP has an internal PA with PCB antenna. An MEE has an external PA with External antenna. See also http://www.gainspan....e/s_modules.php
I update the firmware using a 3.3v USB-to-TTL adapter and the communication software provided with the Gainspan software download. I can't remember the name of the software at the moment but it is included in the download, as long as you have a login and have signed the non-disclosure agreement. Just plug the USB end of the adapter into the computer and wire the 3.3V, Tx, Rx, and Gnd from the ttl adapter to the corresponding pins on the Gainspan module, with Tx to Rx, and Rx to Tx.
As for the example web script, maybe describe what you're trying to do exactly and I can try to help.
Nick
#19090 NetduinoBlinkingLED (Native)
Posted by monewwq1 on 12 October 2011 - 10:09 PM in Project Showcase
#19059 WiFi Shields
Posted by monewwq1 on 12 October 2011 - 12:38 AM in General Discussion
Thanks for all the responses. Being new to Netduino it seems to me that their is not a lot of wifi compatible hardware out there for the netduino.
I have seen the following "Mantis" bot at this site.
http://ttjcrew.com/2...robot-controls/
They are using the netduino plus (with the ethernet port) and used a 12 volt car battery in addition to a wireless router.
I was thinking that this might be an alternative way of acheiving my objective.
I purchased my netduino yesterday and can't wait for it to arrive, so I can start playing.
Regards
ScottBrady
If the physical size does not hinder the project, then using a wireless router with a Netduino Plus is a good method. I think you'll find Netduino to be a useful microcontroller platform. Good luck.
Nick
#19057 WiFi Shields
Posted by monewwq1 on 11 October 2011 - 11:59 PM in General Discussion
I see there is an Xbee WiFi module available, but I have never used it and I do not know if it is compatible with Netduino.
#18887 Netduino - WiFi
Posted by monewwq1 on 07 October 2011 - 02:36 AM in Project Showcase
I'm using the gainspan 1011. I followed your source code and have tcp working nicely, thanks! I'm trying to get the httpsend feature working to send an http post. I setup a php script that accepts two fields and I've verified it works using putty. So far, the php script is telling me I'm sending an empty message. So, I'm definitely talking to the server, just not sending any data. I think maybe I've got the escape sequence incorrect. Here's the relevant commands I'm sending the gainspan:
at+httpconf=20,User-Agent: Mozilla/4.0\r at+httpconf=3,keep-alive\r at+httpconf=11,<myhost>\r at+httpconf=7,application/x-www-form-urlencoded\r at+httpopen=<myhostip>\r at+httpsend=0,3,10,/test_post.php,23\r\x1BHname=myName&info=myInfo
Any suggestions? I'm not sure what to try next.
Hi, unfortunately I have not used the built-in http features of the Gainspan. For my Gainspan projects I rolled my own http communications.
#18545 Creating an FIQ-accelerated pin
Posted by monewwq1 on 28 September 2011 - 02:15 PM in General Discussion
...make that pin an FIQ-accelerated pin...and then use an FIQ handler in your code to count the number of pulses. Then you can easily create a "startcount" and "StopAndGetCount" managed code method to capture the values. FIQs will activate in less than one microsecond, will supercede the .NET MF runtime and...as long as they're quick...will not interfere with your code. We're using them for software PWM in an future update of the firmware, for instance.
Chris et. al,
How do I start with getting this set up? I downloaded the .Net MF Porting Kit and the Netduino Plus firmware, and I've copied the Netduino firmware into the Porting Kit directory. Now I need to know how to modify the firmware to get this operational.
#18520 New Shield from Sparkfun
Posted by monewwq1 on 28 September 2011 - 01:36 AM in General Discussion
X10 is mainly using PLC technology. An RF standard is available but the PLC version is the most used, and still very much in use. I use it, but I also use devices communicating over 433 MHz RF, using hardware from RFXCOM.
Oops! For some reason, I keep mixing up X10 and Zigbee. Don't ask me why because I have no idea why. I guess Z's and X's cause confusion.
So, when I said that personally I would choose X10 over PLC, what I really meant was I would choose a newer communication protocol over PLC or X10 which are dated technologies even though they're still very much in use. We could also say that DOS is still very much in use, but would you really want to write new software for DOS? Well, maybe you would, but I wouldn't.
#18445 Speed of i2c bus on Netduino
Posted by monewwq1 on 26 September 2011 - 07:01 PM in General Discussion
#18432 Math.Log issues
Posted by monewwq1 on 26 September 2011 - 02:11 PM in General Discussion
float Sv = (float)(Math.Log((float)0.3*iso,2)); float Bv = (float)Math.Log(lux / (float)0.3 * (float)14, 2); return ((float)(Bv + Sv));
returns the same 14.7439928 value I am getting from the .Net MF version of Log. So it looks like initially I wrote the Windows Forms function incorrectly.
14.7439928 is not the value I expected, but that is a whole other issue.
#18430 Math.Log issues
Posted by monewwq1 on 26 September 2011 - 01:20 PM in General Discussion
float Sv = (float)(Math.Log10((float)0.3 * iso) / Math.Log10(2));This (and the corresponding code in your first version) is redundant - that's just the binary logarithm of the first argument.
That is because I need to calculate Log2 to get the Film Sensitivity. The actual equation I am trying to calculate is:
Film sensitivity (Sv) = log2( ASA / 3.125 )(see APEX units)
This code is ported from Arduino code and Arduino does not have a built-in Log2 function, hence to get Log2, the code uses the fact that the logarithm of any base other than the natural is the natural logarithm divided by the natural logarithm of the base.
In C#, I could indeed re-write that line as:
float Sv = (float)(Math.Log((float)0.3*iso,2));
But I still don't have an answer as to why Math.Log returns the expected value, but that other .Net MF code does not. I may just have to solve and then divide by 2 for now.
#18412 Math.Log issues
Posted by monewwq1 on 26 September 2011 - 02:09 AM in General Discussion
public static double Log(double x, double newBase) { // Based on Python sourcecode from: // http://en.literateprograms.org/Logarithm_Function_%28Python%29 double partial = 0.5; double integer = 0; double fractional = 0.0; double epsilon = 2.22045e-16; if (x == 0.0) return double.NegativeInfinity; if ((x < 1.0) & (newBase < 1.0)) throw new ArgumentOutOfRangeException("can't compute Log"); while (x < 1.0) { integer -= 1; x *= newBase; } while (x >= newBase) { integer += 1; x /= newBase; } x *= x; while (partial >= epsilon) { if (x >= newBase) { fractional += partial; x = x / newBase; } partial *= 0.5F; x *= x; } return (integer + fractional); }
Now, I am using the above Log code for the following function:
static float calc_ev( float lux, int iso ) { // calculate EV using APEX method: // Ev = Av + Tv = Bv + Sv //lux = 19.6F; //iso = 100; // We'll use the right-hand side for this operation // Bv = log2( B/NK ) // Sv = log2( NSx ) float Sv = (float)(Log((float)0.3 * iso,10) / Log(2,10)); float Bv = (float)(Log((lux / (float) 0.3 * (float)14),10 ) / Log(2,10)); return( (float)(Bv + Sv)); }
If I run calc_ev( 19.6F, 100 ), the result is 14.7439928
Now, if I create a Windows Forms project, and use the built-in Math.Log10 function for the following function which is like the function above:
private float calc_ev(float lux, int iso) { // calculate EV using APEX method: // Ev = Av + Tv = Bv + Sv // We'll use the right-hand side for this operation // Bv = log2( B/NK ) // Sv = log2( NSx ) float Sv = (float)(Math.Log10((float)0.3 * iso) / Math.Log10(2)); float Bv = (float)(Math.Log10((lux / (float)0.3 * (float)14) / Math.Log10(2))); return ((float)(Bv + Sv)); }
With the Windows Forms app, the result for calc_ev(19.6F, 100) is 8.389544
Why are the results different? I expected the two results to be the same. I need an accurate Log value in .Net MF. The proper value is the 8.389544 value, so something wrong is happening in .Net MF. What am I doing wrong?
#18408 Graphing in .NET
Posted by monewwq1 on 25 September 2011 - 08:55 PM in General Discussion
#18407 Graphing in .NET
Posted by monewwq1 on 25 September 2011 - 08:46 PM in General Discussion
#18388 New Shield from Sparkfun
Posted by monewwq1 on 25 September 2011 - 12:09 AM in General Discussion
#18387 5V Relay Driving Circuit
Posted by monewwq1 on 24 September 2011 - 11:44 PM in General Discussion
However the transistors are connected to the 5v onboard power, so I expected the output to be at 5V rather than 3.3v is that correct?
I have confirmed the NetDuino is outputting 5v on the 5v onboard output and if I connect the relay directly it works fine.
Any ideas, have I misunderstood something?
Thanks,
Charlie M
I don't quite follow this. Are you connecting the transistors to the 3v3 or the 5v on the Netduino? The Netduino has outputs of 3.3vdc and 5vdc depending on which pin you use.
Also, what is the application with the kettles? When you say kettles, do you mean like teakettles for boiling water?
---> Edit, I think I follow now. Do you mean you are getting 3.3vdc from the I/O pins? That is what you will get. The I/O pins output 3.3v but are 5v tolerant. See the lower right corner of the spec sheet.
You will need to use the 5v supply pin to power your 5v device.
Oops, I didn't mean to double post! Sorry!
P.S., when it says that the I/O pins are 5v tolerant, it means you can connect a 5v signal input to the pins without damaging them.
#18386 5V Relay Driving Circuit
Posted by monewwq1 on 24 September 2011 - 11:41 PM in General Discussion
However the transistors are connected to the 5v onboard power, so I expected the output to be at 5V rather than 3.3v is that correct?
I have confirmed the NetDuino is outputting 5v on the 5v onboard output and if I connect the relay directly it works fine.
Any ideas, have I misunderstood something?
Thanks,
Charlie M
I don't quite follow this. Are you connecting the transistors to the 3v3 or the 5v on the Netduino? The Netduino has outputs of 3.3vdc and 5vdc depending on which pin you use.
Also, what is the application with the kettles? When you say kettles, do you mean like teakettles for boiling water?
- Netduino Forums
- → monewwq1's Content
- Privacy Policy