Show Posts
Pages: 1 ... 3 4 [5] 6 7 8
61  Development / Other Hardware Development / Re: Small-run PCB assembly on: December 10, 2012, 04:50:21 pm
I used PCBCart.com
They make PCB's and also have assembly plant. Very reasonable, under $2 for an Uno type SMD board excluding components. Even with components it was reasonable.
62  Community / Products and Services / Re: Send Arduino data to Iphone -HID - Magic MonitorX on: December 07, 2012, 09:33:06 pm
HI
You can purchase it with HID Pre-Loaded at Roving Networks
http://www.rovingnetworks.com/products/RN_42
The part number is actually RN-42 HID @ $16.95
You can also buy it already mounted on a breakout board with a level-shifter on-board for $39, part number RN-42-SM, but you have to specify to them that you want the HID Profile pre-loaded.

Thanks
63  Community / Products and Services / Send Arduino data to Iphone -HID - Magic MonitorX on: December 06, 2012, 08:08:52 pm
As everyone knows, Apple blocks most paths to get data into the iPhone from a MCU via Serial or bluetooth. After trying many apparent solutions I decided HID was a simple way to do it. A new App on the Appstore called Magic Montor X uses the HID profile to send data from your Arduino or any other RX/TX device to the iPhone. Basically HID emulates a keyboard so it reads the incoming data in ASCII format. HID bluetooth is portable so you're not stuck with Ethernet Shield. It is cheap, you can add a HID bluetooth module for about $17 or even cheaper if you know how to implement HID profiles.
You can send up to 7 different data messages to the iphone and each will appear in a different "Monitor" Window. There are also 6 LED's you can turn ON or OFF. All this data will update each loop of your sketch.
You can customise the display to show 1 to 6 Data windows and name the units for each window.
The simplest solution I found is using roving Networks RN-42 and simply connecting it to RX/TX. It pairs seamlessly with iPhone and then you can just serial.Print data to the phone.

Control characters are used to get the correct data to the intended data window.
It is wireless and so much better than an LCD display.
Any questions, let me know
https://itunes.apple.com/us/app/magic-monitorx/id583180732?mt=8
64  Using Arduino / Programming Questions / Re: How to remain inside a function? on: October 11, 2012, 10:53:39 am
Right, that is why it worked ok in the UNO because it was mostly absolute. It is used only once from Reset so the 0-4 Seconds was just that, minus a small startup time. It doesnt work very well in leonardo because of the way the Serial port works so I am trying to find another way to test the Max and Min.
65  Using Arduino / Programming Questions / Re: How to remain inside a function? on: October 11, 2012, 10:36:13 am
But isn't that what the next 2 IF statements do? Test in the 0-4 seconds for the max value and test in 4-8 seconds for the min value?
66  Using Arduino / Programming Questions / Re: How to remain inside a function? on: October 11, 2012, 09:50:36 am
Hi Paul
Yes this was indeed just a dummy to show the branch requirement, that is why it did not matter about the variable, I just assigned it to a fixed value to see the result of branching without having to use the analog input for decision.
The reason I never need to get back to the main loop is that the application is a sensor that has 2 different data sets depending on the initial startup condition. So if the sensor value is X at startup the program should go to Branch 1 and if it is Y then it should go to Branch 2. Once in a particular branch, there is a calibration routine. For the first 4 seconds I read the sensors max value (with full load) and in the next 4 seconds I read its MIN value (with no load). Once it is calibrated, the sensor is used to make measurements until such time it is turned off, so i never need to get back to the main loop.
I have to find another way to do the calibration step. Below is what I was using which worked fine on the UNO, I guess I will have to use a few FOR loops?

Code:
static int sampleLow = 1024;
static int sampleHigh = 0;

  while (millis() < 8000UL)
 
  {
    if (millis() <4000) {
    lcd.setCursor(0, 0);
    lcd.print("Measure");
    lcd.setCursor(0, 1);
    lcd.print("High");
     Serial.println("Measuring High");
    }
    if (millis() >4000) {
    lcd.setCursor(0, 0);
    lcd.print(" Remove ");
    lcd.setCursor(0, 1);
    lcd.print(" Load");
    Serial.println(" Remove Load");
    delay (200);
  }
   
       
    // MEASURE
    int sensorVal = analogRead(A0);

    // MATH
      sampleLow = min(sampleLow, sensorVal);
      sampleHigh = max(sampleHigh, sensorVal);
}
67  Using Arduino / Programming Questions / Re: How to remain inside a function? on: October 10, 2012, 11:52:40 pm
Ok I think I found my problem. I have a while (millis() < 80000) statement in each of my branch functions  as usually this is the time for the initial calibration of my sensor. I measure the minimum and maximum value of my sensor in this time. Obviously by the time the serial connection is made with the Leonardo the millis is already counting down.
I will have to find another way to delay the calibration feature. This sensor has no buttons or switches that i can use as it just operates when you plug in the USB.
68  Using Arduino / Programming Questions / Re: How to remain inside a function? on: October 10, 2012, 11:36:43 pm
Thank you for the replies. Using the While statement works well. The actual issue i am having is with Arduino Leonardo. My original code runs without problems on the UNO, because the Uno resets when you connect to USB and that allows my sketch to do the analogRead and make the decision between the 2 loops. However the Leonardo does not reset. So I have been trying to troubleshoot it and wanted to make sure of the structure to use function calls.
I have followed the getting started guide for Leonardo and it says I can use the  while (!Serial) ;
statement to do nothing until a serial connection is made. This works when I structure it like the below but somehow when I apply it to my original code, the program just continues to execute even if the Serial Monitor is closed. This means i miss the calibration step in the beginning analogRead.
Sorry, I know it is confusing.
Code:
int i = 1;
//==========================================================================================================//
void setup()
{
  Serial.begin(9600);
  while (!Serial) ;
   }
//================================================================================================//
// Decision between option1 & option2
void loop()

   if (i == 1){
           Serial.println("Option 1"); 
   option1();
 
     } 
 
   else if (i = 2){
          Serial.println("Option 2");
     option2();

    }
  Serial.println("Why?");
}
//===============================================================================================================================================//
void option1()
{
 while (i==1){     
  for (int i=0; i <= 3; i++){
     
      Serial.println(i);
      delay(200);
        }}
}

//============================================================================================//
void option2()
{
      for (int i=10; i <= 13; i++){
   
      Serial.println(i);
      delay(200);
        }
}
69  Using Arduino / Programming Questions / How to remain inside a function? on: October 10, 2012, 09:59:40 pm
I need some assistance to understand structuring my own functions. I can create a function and call the function based on a decision in the void loop() but why does the program return to the loop afterward?
How do I structure it to just remain within the function once it has branched there. I know it sounds silly with this example but basically my application makes a decison between 2 different sets of data to execute based on the initial value of the analog input. Once that decison is made it should remain within the function. So in my example code I branch to option 1 which is executed and I would never expect the Serial.println ("Why?")  statement to be executed but it is.
Can someone explain why and tell me the correct way to structure this?

the output is -
Why?
0
1
2
3
Why?
0
1
2
3
Why?
0
1
2
3
Why?


Code:
int i = 1;
//==========================================================================================================//
void setup()
{
  Serial.begin(9600);
   }
//================================================================================================//
// Decision between option1 & option2
void loop()

   if (i = 1){
   option1();
          } 
 
   else if (i = 2){
     option2();
    }
  Serial.println("Why?");
}
//===============================================================================================================================================//
void option1()
{
      for (int i=0; i <= 3; i++){
     
      Serial.println(i);
      delay(200);
        }
}

//============================================================================================//
void option2()
{
      for (int i=10; i <= 13; i++){
   
      Serial.println(i);
      delay(200);
        }
70  Using Arduino / Programming Questions / Leonardo analogReference options? on: October 10, 2012, 12:39:01 pm
Hi
Does anyone know what options are available for analogReference in the Leonardo? The Atmega328 has an internal reference of 1.1v which I was using but does not work on leonardo.
What are my other options?
Thanks
71  Using Arduino / Microcontrollers / Re: Debugging UNO standalone - Help needed on: June 13, 2012, 09:41:51 am
Thanks, I figured it out. I did it in AVR Studio without all the DFU mode sequences, I just erased the chip and inserted the combined .hex. It would be nice to do it through the usb port but since I am already using AVR Studio to bootload the Atmega328, its just another connection.
The reason I dont use an UNO is seen in the pic. My Uno is about the size of a nano to fit in a specific location for standalone use. When I need a display, it fits onto a motherboard that has switches, inputs and a LCD stacked on top.
Can you tell, I dont like wires? :-)
72  Using Arduino / Microcontrollers / Debugging UNO standalone - Help needed on: June 12, 2012, 01:14:20 pm
I need some assistance figuring what the issue is with my standalone board. This is my second board, the first one was a Nano copy using the FT232RL and worked OK but I was unhappy with the sporadic enumeration of the USB. I redesigned it using Atmega16U2 just like Uno.
I am able to connect USb to the 16U2 and using FLIP I have loaded Firmware (Uno_and_USBSerial_combined.hex) and installed the driver so now it registers as Com port on my PC.
I am able to bootload the 328P using ICSP and AVRISPMK2 and loaded OPTIBOOT (optiboot_atmega328.hex).
I set fusebits as follows
uno.bootloader.low_fuses=0xff
uno.bootloader.high_fuses=0xde
uno.bootloader.extended_fuses=0x05
uno.bootloader.file=optiboot_atmega328.hex
uno.bootloader.lock_bits=0x0F
This all verifies correctly.

problem is when trying to upload a sketch, I get the avrdude: stk500_getsync(): not in sync: resp=0x00 error.

With the scope I can see the reset pulse when uploading, but I do not see any data coming into RXD. It goes low for a second but I never see the data pulses coming in.
The Atmega16u2 is so hard to verify correct connection as the pads are all under the device but I assume it is correct as I can DFU bootload it. I am trying 3 boards so its not likely a solder error.
ANY suggestions of troubleshooting would be appreciated.

73  Using Arduino / Microcontrollers / Re: Another DIY Arduino with PCB on: May 29, 2012, 11:33:38 pm
That sure is a lot of vias you used. Did you use an autorouter? Also see a lot of right angles in your tracks. Not a god idea for noise, but thats just my opinion. Looks good otherwise though
74  Using Arduino / Installation & Troubleshooting / Arduino Nano and Bluetooth issue on: May 20, 2012, 12:49:44 pm
I used a bluetooth module successfully with the Uno, connecting rx-tx as normal and am able to stream data through bluetooth. However when i connect the Bluetooth module to a Nano that uses the FR232RL chip the bluetooth does not work. The USB works of course to the RS232RL but the bluetooth module will not make a connection although it connected to the same lines on the ATmega328 D0(RX) and D1(TX)
Anyone have an idea why this is? Seems like the FT232RL "holds" the com line.
thanks
75  Community / Gigs and Collaborations / Looking for a Mac savvy programmer to port existing .NET application on: May 14, 2012, 05:51:55 pm
I am looking for a Programmer to convert an existing application that I have. It was written for me by Peter Baines as a paid project. I need a Mac version. The original is written in VB.NET and I wouldnt like to pay for a whole new development again. I was thinking if it could be converted to Processing or failing that, a Mac application. The principle is quite simple in that an Arduino streams data via VCP to a computer.
Pm or email me at liam1062@gmail.com if youre interested.
Pages: 1 ... 3 4 [5] 6 7 8