Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
Microcontrollers / Re: Arduino UNO R3 SMD- How t...
Last post by srnet - Today at 07:48 am
You either have to program the processor before you add it to the 'new board' or you program it in-situ, via connections that you will have designed into the new board.

Try a Google search on;

'standalone Arduino R3'

For some examples and pictures.
22
i have an hc05 bluetooth module in which i want to transmit a value in char to the other bluetooth module in order to make a traffic light on the same direction go green and the other to red.but i cannot do it normally because the code does not take my event(which is the button press).i want to make an interept to read serial data if i sent anything to the bluetooth otherwise do the normal traffic light thingy.i have a code please look at it.i don't know what to do.please help me.
23
I believe I have burn out two arduino boards now with my project. one mega and one uno and im not sure why.

i am powering my board with a 12 volt 5 amp car battery charger. (not connected to any car).

i have a "buck" step down voltage converter board connected to the charger adjusted to bring down the voltage to around 6 volts. (tested with a multimeter).



If anyone is wondering, I need the higher volts and amps to supply power to the motors in my project so the larger power supply is ideal for them.


my boards began malfunctioning after being used in my project for a couple hours. when the first stopped working i thought it coincidence. now the replacement has malfunctions the same way.


its kind of odd. the boards still function just fine in my project, but i can no longer get a computer to recognize them for uploading a sketch.

the boards get power from usb but no longer show up in the device manager or get a system noise when plugged in. I have fully troubleshooted.after fully disconnecting the boards from my project i have plugged them into two working computers and tryed two working usb cables. and my third board that i have not used in my project takes uploads just fine. so i beleive somehow the serial communications are fried on both.


im still learning about electronics. is it OK to supply more amps than needed in a circut if voltage is correct?

all my negatives are connected before the voltage step down is that ok?

anything else that could cause an arduino board to become "UnProgrammable"?

24

Threads merged.

25
This topic has been merged into Hey people ( delays and repetitive stuff).
27
Project Guidance / Re: Make 4 different motors tu...
Last post by wvmarle - Today at 07:38 am
I've had quite good results doing this with a simple 2-wheeled robot and encoders on the wheels, about 20 ticks per rotation. Not much at least. I was doubling the resolution by counting both the rising and falling edges. To make the 90° turn I'd just run one of the two motors for the desired number of ticks, the overshoot will be roughly the same every time, so set your ticks accordingly. Switch off the motor when the motion is complete.

This is of course anything but accurate, but definitely good enough for a toy. The turn ends up somewhere between 85 and 95 degrees, which is good enough to have a robot turn away from an obstacle.

To keep the thing move straight I'm looking at the encoders, the moment one encoder gets ahead of the other the wheel on the one side gets one PWM point extra power, reset the encoder counts, and continue that way. Keeps it moving pretty straight. Running at 60-70%, that's fast enough and keeps the motors from burning (I think they're designed for ~6V so 2x LiPo is a bit much of a voltage).
28
i got the mistake I was doing and made some changes with what I was willing to do from so long. I am posting the code if anyone needs the similar help

Code: [Select]
/*Itteration: 10*/
char incomingMessage[] = "Hello World, int1, int2, int3, int4, int5, int6, int7, int8, int9, int10";

const byte nbTokenExpected = 10;
char * ptrArray[nbTokenExpected]; // pointing at each token when we parse

const byte numChars = 32;
char receivedChars[numChars];
boolean newData = false;
bool success = false;
 
bool parseIncomingMessage()
{
  char * strtokIndx;
  byte tokenCount = 1;


  for (byte i = 0; i < nbTokenExpected; i++) ptrArray[i] = NULL; // reset the list

  ptrArray[0] = (strtokIndx = strtok(incomingMessage, ","));
  while ((tokenCount < nbTokenExpected) && (strtokIndx != NULL)) {
    ptrArray[tokenCount++] = (strtokIndx =  strtok(NULL, ","));
  }

  if ((tokenCount == nbTokenExpected) && (strtokIndx != NULL)) {
    Serial.println("Got them all");
    for (byte i = 0; i < nbTokenExpected; i++) {
      Serial.print("ptrArray[");
      Serial.print(i);
      Serial.print("] --> \"");
      Serial.print(ptrArray[i]);
      Serial.println("\"");
      success = true;
    }
  }else {
    Serial.println("Not enough data");
  }
  return success;
}

void setup()
{
  Serial.begin(115200);
  Serial.println("This demo expects 3 pieces of data - text, an integer and a floating point value");
    Serial.println("Enter data in this style <HelloWorld, 12, 24.7>  ");
    Serial.println();
 
}

void loop()
{
  recvWithStartEndMarkers();
    if (newData == true) {
        strcpy(incomingMessage, receivedChars);
            // this temporary copy is necessary to protect the original data
            //   because strtok() used in parseData() replaces the commas with \0
        parseIncomingMessage();
        showParsedData();
       
        newData = false;
    }
  }

void recvWithStartEndMarkers() {
    static boolean recvInProgress = false;
    static byte ndx = 0;
    char startMarker = '<';
    char endMarker = '>';
    char rc;

    while (Serial.available() > 0 && newData == false) {
        rc = Serial.read();

        if (recvInProgress == true) {
            if (rc != endMarker) {
                receivedChars[ndx] = rc;
                ndx++;
                if (ndx >= numChars) {
                    ndx = numChars - 1;
                }
            }
            else {
                receivedChars[ndx] = '\0'; // terminate the string
                recvInProgress = false;
                ndx = 0;
                newData = true;
            }
        }

        else if (rc == startMarker) {
            recvInProgress = true;
        }
    }
}

void showParsedData()
{
  Serial.print("I got in the showParsedData Function");
  if (success == true) { // if we can successfully parse the message
    // then build our scrolling text

    char scrollingText[20]; // big enough for what we want to do
    sprintf(scrollingText, "Date:%s %s %s",ptrArray[1], ptrArray[0], ptrArray[2]);
    Serial.println();
    Serial.println(scrollingText);
    Serial.print("The length of the scrolling text is ");
    Serial.println(strlen(scrollingText));

    Serial.println();
    char scrollingText1[50]; // big enough for what we want to do
    sprintf(scrollingText1, "Total Feedback recorded till now: %s",ptrArray[3]);
    Serial.println();
    Serial.println(scrollingText1);
    Serial.print("The length of the scrolling text is ");
    Serial.println(strlen(scrollingText1));

    Serial.println();
    char scrollingText2[50]; // big enough for what we want to do
    sprintf(scrollingText1, "Total Air Feedback recorded till now: %s",ptrArray[4]);
    Serial.println();
    Serial.println(scrollingText2);
    Serial.print("The length of the scrolling text is ");
    Serial.println(strlen(scrollingText2));

    Serial.println();
    char scrollingText3[20]; // big enough for what we want to do
    sprintf(scrollingText, "Total Toilet Feedback recorded till now: %s",ptrArray[5]);
    Serial.println();
    Serial.println(scrollingText3);
    Serial.print("The length of the scrolling text is ");
    Serial.println(strlen(scrollingText3));

    Serial.println();
    char scrollingText4[50]; // big enough for what we want to do
    sprintf(scrollingText4, "Total Service Feedback recorded till now: %s",ptrArray[6]);
    Serial.println();
    Serial.println(scrollingText4);
    Serial.print("The length of the scrolling text is ");
    Serial.println(strlen(scrollingText4));

    Serial.println();
    char scrollingText5[50]; // big enough for what we want to do
    sprintf(scrollingText5, "Total Average Air Feedback recorded till now: %s",ptrArray[7]);
    Serial.println();
    Serial.println(scrollingText5);
    Serial.print("The length of the scrolling text is ");
    Serial.println(strlen(scrollingText5));

    Serial.println();
    char scrollingText6[50]; // big enough for what we want to do
    sprintf(scrollingText6, "Total Average Toilet Feedback recorded till now: %s",ptrArray[8]);
    Serial.println();
    Serial.println(scrollingText6);
    Serial.print("The length of the scrolling text is ");
    Serial.println(strlen(scrollingText6));

    Serial.println();
    char scrollingText7[50]; // big enough for what we want to do
    sprintf(scrollingText7, "Total Average Service Feedback recorded till now: %s",ptrArray[9]);
    Serial.println();
    Serial.println(scrollingText7);
    Serial.print("The length of the scrolling text is ");
    Serial.println(strlen(scrollingText7));

    Serial.println();
    char scrollingText8[20]; // big enough for what we want to do
    sprintf(scrollingText8, "Total Average Feedback recorded till now: %s",ptrArray[10]);
    Serial.println();
    Serial.println(scrollingText8);
    Serial.print("The length of the scrolling text is ");
    Serial.println(strlen(scrollingText8));
  }
}


I am still working on it and shortly planning to pass all these scorlling text on DMD. J-M-L thanks for your timely and kind help.
29
Hi pert,

crystal clear recovery actions.

It worked perfectly: thanks so much for swing help!

Oustanding support indeed.

Cheers from a deep raining Milan, Italy.
30
sorry!!
yes that is my aim, any advice on how this would be done?
Pages: 1 2 [3] 4 5 ... 10