Show Posts
Pages: 1 ... 247 248 [249] 250 251 ... 837
3721  Using Arduino / Project Guidance / Re: cheap WiFi module on: November 02, 2013, 10:51:47 am
For your first question, the answer is here:

http://www.lmgtfy.com/?q=cheap+WiFi+module+for+Arduino

For the second question, there are some Arduino clones with RF integral transceivers which support over-the-air programming, but I don't know of any WiFi ones. If all you want to alter is data then you could do that easily enough by including a feature in your sketch which enables it to receive data updates over the WiFi interface and save them locally, for example in EEPROM.

I suggest you get a prototype working before you worry about the economics of scaling up for production. It's pretty unlikely you would be using consumer parts by the time you get to production.
3722  Using Arduino / Project Guidance / Re: Digital or Analog inputs for DAQ ? on: November 02, 2013, 10:48:01 am
To be able to answer your question really needs an understanding of your overall system. Do you have / can you create a block diagram identifying the main components, the connections between them, and the nature of the signals on those connections? If, for example, you already have an async serial data stream carrying the data you want to log then two wires to an Ardulog would be all you need. In reality I doubt you will get that lucky, but knowing what data is available and what form it is available in has to be your starting point.
3723  Using Arduino / Project Guidance / Re: Cable Counter on: November 02, 2013, 10:43:08 am
You didn't say that you need to be able to measure the cable travel in both directions - I assumed it was just a dispenser. If it needs to be reversible then instead of using a single reed switch you would need two of them to act as a crude encoder with a resolution of one rotation. If you need a finer resolution than that, you would use a real encoder which would give you a resolution down to one or two degrees.

It is not sensible to measure the rotation of the spool itself because the amount of cable dispensed per revolution is not predictable. Use a separate idler pulley that the cable runs over. This also means you don't need to modify or attach anything to the supply pulleys - you just pass the cable through your gauge as it is dispensed.
3724  Using Arduino / Project Guidance / Re: Transfer of charge wirelessly via inductive coupling on: November 02, 2013, 10:33:07 am
Basically, can someone guide me towards using an oscillator with a coil, and calculating how a secondary could receive the power from the primary.

There's nothing stopping you from investigating if you're interested, but the problem of wireless electromagnetic power transmission is one that has had a lot of money invested in it in the past few years and still hasn't been solved well enough to make a viable product. The problem requires you to understand how magnetic fields are generated and propagated and how to direct and focus them. If you're trying to do it by connecting a DC power source to a coil this suggests to me that you are several years of education away from understanding this well enough to get anywhere.

If you're willing to consider a less ambitious project then you could just take the base and charging coil from a rechargeable electric toothbrush, connect the coil output to a boost converter and see over what sort of distance you can transfer enough power to operate an LED. I think it'll fall well short of 4" but you never know 'til you try.

If you decide to take your investigation further than that then you don't need an Arduino - you need an electronics lab.
3725  Using Arduino / Project Guidance / Re: Controlling Stepper Motor CW and CCW thru inputting the degrees using 4x4 Keypad on: November 01, 2013, 10:51:45 pm
I get what you're trying to do, but it's obviously incomplete and the logic of handling the reset button doesn't look quite right. Also, you don't set confirm back to false after you have sent the command to the stepper motor.

To start with I suggest you ignore the stepper motor and concentrate on getting the keypad input logic right, and print out the value of digit1 and digit2 after each button press so that you can see what effect it has had. Keeping the same architecture you have currently, I think the logic ought to be something like this:

Code:
  if(digit1 < 0)
  {
  // we're setting digit1
  switch(key)
  {
  case '0' ... '9':
  digit1 = key - '0';
  break;
  case '#':
  // no action - confirm not applicable when entering first digit
  break;
  case '*':
  // no action - cancel not applicable when entering first digit
  break;
  }
  }
  else
  {
  // we're setting digit2
  switch(key)
  {
  case '0' ... '9':
  digit2 = key - '0';
  break;
  case '#':
  confirm = true;
  break;
  case '*':
  // cancel previous digit
  digit1 = -1;
  break;
  }
  }

What is the stepper motor intended to do, by the way? Are you trying to move it by a specified distance, or move it to a specified position?
3726  Using Arduino / Programming Questions / Re: while(!Serial) in setup, leonardo on: November 01, 2013, 10:06:49 pm
The while(Serial) loop is NOT waiting for you to open the Serial Monitor. It is waiting for the USB to Serial chip to report that it us ready. That chip gets ready pretty quick.

I don't have a Leonardo, but my understanding from other people's comments here and supported by the documentation for the board is that on the Leonardo the Serial operator bool() returns true when the virtual serial port at the far end of the USB/serial connection has been opened i.e. when the serial monitor has been opened.

Quote from: Guide to the Arduino Leonardo and Micro
Unlike the Arduino Uno, the Leonardo and Micro won't restart your sketch when you open a serial port on the computer. That means you won't see serial data that's already been sent to the computer by the board, including, for example, most data sent in the setup() function.

This change means that if you're using any Serial print(), println() or write() statments in your setup, they won't show up when you open the serial monitor. To work around this, you can check to see if the serial port is open like so:

// while the serial stream is not open, do nothing:
   while (!Serial) ;
3727  Using Arduino / Programming Questions / Re: NRF24L01+ Fails to send, but is receiving fine! (Using RF24Network lib) on: November 01, 2013, 08:14:48 pm
same results.... smiley-cry((

Obviously that can't be literally true since the previous sketch printed the success rate and the ping pair one doesn't.

What actually happens - what proportion of the sender writes are received at the receiver, and what proportion of the send writes report success, and what proportion of the successful writes result in a response being received and what proportion of those responses are indicated as successful by the return status of the receiver's write call?

There are lots of messages being sent and received in a simple 'ping' operation, and you need to work out which ones are failing. The successful sequence should look something like this:

Quote
A calls radio.write().
    A sends message to B and waits for response.
    message received at B
    B sends ack message
    A receives ack message
radio.write returns success status

B processes received message from A
B calls radio.write to send response
    B sends message and waits for response.
    message received at A
    A sends ack message
    B receives ack message
radio.write returns success status
3728  Using Arduino / Programming Questions / Re: else statement is not working ! on: November 01, 2013, 08:03:34 pm
what do you mean ?

He means let the editor change all the occurrences of a variable name for you rather than trying to find and correct them manually. Because the existing names are so poor, there's a good chance when doing it manually that you would make mistakes.
3729  Using Arduino / Programming Questions / Re: How to perform a ethernet request locally on: November 01, 2013, 08:00:59 pm
Additionally, I recommend that you improve your code layout. Put each { and } on separate lines with matching pairs indented by the same amount and lines between them indented one extra level. Always follow if, else, do, while, for with a compound statement enclosed in { and } even if there is only one statement in it. The tools/autoformat command can be used to correct the indentation.
3730  Using Arduino / Programming Questions / Re: No satisfactory place to define variables? on: November 01, 2013, 07:56:20 pm
Quote
in this context 'global' just means global to the compilation unit that you have defined them in.
Um.  No.
In fact, it is a significant problem in "large C programs" when multiple compilation units define global variables with the same name.  The linker doesn't necessarily do what you'd expect.


Um. Yes.

If you want your global data to be local to a compilation unit, give it internal linkage by declaring it static. If you want to share it between compilation units, give it external linkage and use some other technique to avoid name collision. For example you can put it in a class, or in a namespace, or in a class in a namespace ... The bigger your solution is the more effort you need to put into addressing this sort of issue and managing the resulting complexity but there are solutions which will scale up as big as you want - certainly far beyond what you would ever run on an Arduino.
3731  Using Arduino / Project Guidance / Re: trying to build a screen for my device. on: November 01, 2013, 07:39:47 pm
Perhaps you could wedge the Arduino under the edge of the screen to level it? Otherwise I don't see the Arduino contributing anything here. If you buy a screen with an interface that your computer's graphics adapter supports, then you can just connect it. If you buy a screen that doesn't provide an interface that your adapter supports then you can't connect it.
3732  Using Arduino / Project Guidance / Re: processing, firmata, UDP, and libraries on: November 01, 2013, 07:36:33 pm
It would be possible in theory to use Firmata or similar as a way to interact with pins remotely and put the driver logic on the client on a PC, but it would give extremely limited performance and be more complicated to implement and would give you no advantages at all that I can think of. Perhaps that explains why it is not common for people to write device drivers using that approach. There's nothing stopping you from writing your own like that if you want, and perhaps you could use the Arduino libraries for inspiration, but frankly it strikes me as a daft approach.

What would be slightly less daft, but only slightly, is to write your libraries on Bitlash so that you can download then to the Arduino without uploading a new sketch. It would be a much more complicated solution (bit not as bad as the Firmata approach) and I still can't imagine what benefits this would give you to justify such a contrived approach. But it's technically feasible.
3733  Using Arduino / Project Guidance / Re: Simple optical trigger (Need help!) on: November 01, 2013, 07:31:40 pm
PeterH - I shied away from a wand/switch setup because I was worried about the whip bouncing back and forth.  Also, some of the trees are clumps, with more than one stem and I was afraid of entanglement or other unwanted behavior.

From a mechanical point of view it would be very simple and you could deal with 'bouncing back and forth' very easily by adding some mechanical damping. I don't see how any entanglement could occur. You would position the wand so that it sticks straight out at 90 degree to the direction of travel. If it hits a trunk it will be deflected back which means it will inherently slide past whatever it has hit. If you think your driver if going to be moving back and forth and wiggle the wand into a clump of trees then make the wand out of something flexible such as a fiberglass rod as used for kite spars. The issues here are all simple mechanical ones and much easier to deal with than getting an electronic sensor to detect tree trunks reliably.
3734  Using Arduino / Project Guidance / Re: Cable Counter on: November 01, 2013, 07:26:45 pm
You need to decide where and how you're going to display the output. If it's on a dedicated LCD connected to an Arduino, there are lots of sources for those and the ones that are marketted for use with an Arduino will come with examples showing how to display data on them.

I suspect you'll need some buttons for things like resetting the counters. Some display shields include some buttons.

You will need to measure the amount of wire that has been dispensed. I suggest that the best way to do that is probably with an idler wheel that the cable runs past. Depending on the accuracy you may be able to just count rotations e.g. with a magnet/reed switch, or you may need to use a rotary encoder to measure the rotation angle more accurately.

The software part of this would be very simple.
3735  Using Arduino / Project Guidance / Re: Linking a Website, Arduino and Thermal Printer.. help? on: November 01, 2013, 07:21:28 pm
Seems that you have already got somebody else's working solution that lets the Arduino print stuff to your printer.

If you want to have the data for printing submitted via a web site then you need to implement a web app that lets people submit documents and/or data to be printed (and it is up to you to define how they do that) and then send it to the Arduino via the serial port. How you encode the data over the serial port will depend on the nature of the data, which will be determined by what data format your printing library supports and what data format you are going to expect from the user. If there's any data conversion to be done, do it inside the web app.

As an aside, given that the tricky part of interfacing with the printer has been done for you and what's left for you represents a few hour's work, are you really sure this is suitable for a final year project?
Pages: 1 ... 247 248 [249] 250 251 ... 837