Show Posts
Pages: 1 2 [3] 4 5 ... 38
31  Using Arduino / Networking, Protocols, and Devices / Re: NMEA protocol decoding on: December 29, 2013, 08:28:25 am
Look for TinyGPS and TinyGPS++ libraries as they will take all the grunt work away and you can then pull out whatever data you need from the GPS very easily.
32  Using Arduino / Networking, Protocols, and Devices / Re: maniacbug's rf24 libraries - How to change data rate? on: December 28, 2013, 08:16:21 pm
Can't lookmfor you directly at the moment but it is inone of the files, probably RF24.cpp

Do a search for 1MBPS or 2MBPS.

I can look properly tomorrow if you haven't solved it by then.
33  Using Arduino / Project Guidance / Re: Control Arduino with iPad locally on: December 28, 2013, 07:47:06 pm
You can use the Arduino as a server but I'm not sure if there is any way to make it act as an Access Point.

One way of doing it would be run a HTTP server on an Arduino with Ethernet then use a TP-Link WR702N Nano, in Access Point mode, connected to the ethernet on the Arduino. The Nano runs from 5V via a USB lead, so is easily hackable.

Your iPad could then just connect to the car access point and get onto it's local network, which simply has the Arduino server on.
34  Using Arduino / Programming Questions / Re: SoftwareSerial problem , but only on 1284p on: December 28, 2013, 07:41:52 am
Where is fast pin mode? I've not come across that. I Will try some searching...
35  Using Arduino / Programming Questions / Re: TestGPRS code example from Arduino not working. on: December 28, 2013, 07:32:40 am
I'm not familiar with the gizDuino cores etc.

The board is more Sanguino like, being based on the 644.

Certainly from the screen shot it looks like it's not pin for pin compatible with Uno. The functions are in the same place for shields but the pin numbers are different.

It seems to be some issue due to the different config.

Many of us are  using 644 and 1284 with the maniacbug 1284 cores as base. The Bobuino variant matches pins to Uno as closely as possible. I've certainly had good success with most code, even if having to make some adjustments to fix hardware differences.

Without having one of these boards it'll be hard to help any further. You could probably use the mighty1284 core and Bobuino variant with the board though, just adjust pin numbers from what is printed on the board to what the standard Uno layout is. I'd only suggest trying this if you have some understanding of what younare doing.
36  Using Arduino / Networking, Protocols, and Devices / Re: Making a PUT request with arduino ethernet on: December 28, 2013, 04:33:09 am
It looks like you need to be sending a username and devicename too.

The following link seems to have some useful information on the API

http://channel9.msdn.com/coding4fun/articles/Philips-Hue-Lighting-Controller
37  Using Arduino / Networking, Protocols, and Devices / Re: Making a PUT request with arduino ethernet on: December 28, 2013, 04:20:21 am
Does it use port 80?
38  Using Arduino / Programming Questions / Re: Best practice for {...} in IF with only one line on: December 28, 2013, 04:13:50 am
I always use braces, on their own line, and indent conditional blocks.

As per PaulS and Coding Badly 'Better Hair' examples.
39  Using Arduino / Microcontrollers / Re: FIX : INPUT_PULLUP error/not working on maniacbug 1284/644 cores on: December 27, 2013, 06:18:58 pm
You selected Bobuino as the board type? That was the one that had issues.
The Software Serial issue, due to pins_arduino.h, was the Bobuino variant specific one

The INPUT_PULLUP was more general for the shared core across all 1284 variants.
40  Using Arduino / Programming Questions / Re: for loop is wierd? [solved] on: December 27, 2013, 06:04:45 pm
Sorry for the overkill, peeps, I was shooting from the hip smiley
Apology is mine. You were right, although unsigned long would be more appropriate. I only looked at the data posted and a rollover at 1420 loops, but he must have had another rollover earlier already as the total should have been about 96000 odd.

My train of thought was unsigned int due to that and only seeming like 80 more loops required.

 smiley-red
41  Using Arduino / Programming Questions / Re: for loop is wierd? [solved] on: December 27, 2013, 05:39:42 pm
Surely keeping variables as local as necessary is good practice to encourage?

Code:
for (int i = 0; i < 1500; i++)
42  Using Arduino / Programming Questions / Re: for loop is wierd? [solved] on: December 27, 2013, 05:31:34 pm
Quote
But you don't need  long int, as has been mentioned
Chaps, yes, you almost certainly do - 1500 readings of any analogRead over 43 is going to require 32 bits.
True. I was just looking at his quoted example of the rollover at 1420, but actually it would appear that is his second rollover!

So BareMetal was right on the long type. My apology there. One of the downsides to being on a phone and just using the info presented without checking personally.

It would still help malawi to think about the original question and it's aim to consider the right type for application, and whether he requires negative values.

Understanding each data type and it's value range is useful basic understanding.
43  Using Arduino / Programming Questions / Re: for loop is wierd? on: December 27, 2013, 05:12:34 pm
Awesum !!!
That long int solved my problem

Thank you guys
But what have you learnt by being given the (wrong) answer?

We were trying to help you learn the fundamentals of variable type appropriate to what you wish to assign to it.

In this case the answer is not a 'long', although it does fix your issue it is actually overkill. You are now using a 32 bit variable where a 16 bit one would be sufficient, and hence using 2 more bytes of that precious 2kB of SRAM that isn't required.

BareMetal has not helped you with that answer really.
44  Using Arduino / Programming Questions / Re: for loop is wierd? on: December 27, 2013, 05:04:53 pm
You need a long int
Actually, he doesn't in this example.

We're trying to help him learn by working it out as it's a fundamental error.

@OP, as AWOL hinted, what is the range of values a 16 bit int can hold? Next, consider the maximum value you will be assigning to it with your 1500 additions.
45  Using Arduino / Programming Questions / Re: for loop is wierd? on: December 27, 2013, 04:51:20 pm
Code:
int tot;

Can hold what range of values?

With readings of around 69 each time, what happens to the value in that variable as you get 1400+ x 69 added to it?

Your output isn't at all puzzling. It's exactly what is expected from the code you have written. ;-) One small change will fix it.

Also look at the standard way to use a for loop. Do the examples show you declaring a Variable to use for the loop counter in the manner you've done?
Pages: 1 2 [3] 4 5 ... 38