Recent Posts

Pages: [1] 2 3 ... 10
Sensors / Re: The values ​​of a string c...
Last post by cattledog - Today at 08:13 am
I can't find a problem with your parsing routines, and when I run your program with specified data strings as input it outputs correctly. I think the fact that it just stops printing indicates a memory problem. I'd look very carefully to see if one of the sprintf statements is overrunning the 125 character buffer. Writing outside of memory that you own can lead to strange problems.

Code: [Select]
//#include <SDISerial.h>
//#include "Arduino.h"
//in order to recieve data you must choose a pin that supports interupts
#define DATALINE_PIN 2
#define INVERTED 1
//#define BAUDRATE 1200

//for pins that support interupts (2 or 3 typically)
char* templ1;//temperature level1
char* templ2;//temperature level2
char* templ3;//temperature level3

char* huml1;//moisture level1
char* huml2;//moisture level2
char* huml3;//moisture level3

char* value_temperature;
char* value_moisture;

//SDISerial connection(DATALINE_PIN, INVERTED);

char output_buffer[125];

void setup() {
  // connection.begin(); // start our SDI connection
  //Serial.begin(BAUDRATE); // start our uart
  Serial.println("OK INITIALIZED"); // startup string echo'd to our uart
  delay(3000); // startup delay to allow sensor to powerup and output its DDI serial string
  //char* sensor_address = connection.sdi_query("?!", 1000);
  //sprintf(output_buffer,"Sensor address: %s",sensor_address?sensor_address:"No Response");
  Serial.println("Sensor address: 1");

  //char* sensor_info = connection.sdi_query("1I!", 1000);
  //sprintf(output_buffer,"Sensor info: %s",sensor_info ?sensor_info :"No Response");
  // Serial.println(output_buffer);
  Serial.println("Sensor info: 113SENTEK DD MTS104DD015142");

void loop() {
  //char* start_measurements_m = connection.sdi_query("1M!", 2000);
  //sprintf(output_buffer,"start measurements Moisture: %s",start_measurements_m ? start_measurements_m :"No Response");

  //char* moisture = connection.sdi_query("1D1!", 2000);
  char* moisture = "1+0.094927+0.108734+0.057404";
  sprintf(output_buffer, "Sensor Data Soil Moisture: %s", moisture ? moisture : "No Response");

  //char* start_measurements_t = connection.sdi_query("1M4!", 2000);
  //sprintf(output_buffer,"Start Data Soil Temperature: %s",start_measurements_t ? start_measurements_t :"No Response");

  //char* temperature = connection.sdi_query("1D0!", 2000);
  char* temperature = "1+23.47698+23.27770+23.7529";
  sprintf(output_buffer, "Sensor Data Soil Temperature: %s", temperature ? temperature : "No Response");


  char* command = strtok(temperature, "+");
  int counter = 1;
  while (command != 0)
    // Find the next command in input string
    command = strtok(0, "+");
    if (counter == 1) {
      templ1 = command;
    else if (counter == 2) {
      templ2 = command;
    else if (counter == 3) {
      templ3 = command;

  char* command2 = strtok(moisture, "+");
  int counter1 = 1;
  while (command2 != 0)
    // Find the next command in input string
    command2 = strtok(0, "+");
    if (counter1 == 1) {
      huml1 = command2;
    else if (counter1 == 2) {
      huml2 = command2;
    else if (counter1 == 3) {
      huml3 = command2;




Français / Re: Alimentation batterie exte...
Last post by hbachetti - Today at 08:11 am
Quand je suis allé a la boutique d'électronique, le gars m'a dit que c'était des équivalents.
As-tu acheté des modèles en boîtier plastique TO39 comme celui-ci ?

Quand tu me dis que tu me déconseilles. Quel est le risque concrètement ? Pourquoi ne conviennent ils pas ?
Le BC547 ne parviendra pas à fournir les 230mA. C'est un transistor petits signaux, avec un courant de collecteur de 100mA maxi.

Pour fournir un courant de base au 2222 le BC557 peut remplacer le 2N3906.
Mais utilise plutôt le 2N3906 et le PN2222 ou 2N2222 du schéma.

hello, my also same problem motor not working I tried with another cable technique still same problem,..
There is not only ATmega328P which is sensitive to high voltage. On the board is also ATmega16U2 - USB/serial transceiver (probably, that is why Rx LED doesn't blink at uploading). This is very small part, hard to replace for repair if you are not experienced and without appropriate tools. Fortunately, the board is not very expensive, even genuine one.
The problem is, that even with NO wires connected anywhere on the arduino other than a USB cord powering it, I'm getting an RPM value because my interrupts are triggered anytime my arduino is within 6 feet of the running engine!
You don't do anything with the interrrupt pin in setup, so the pin is floating if it's not connected to a sensor.

If you also having trouble with the sensor connected, then post a link to the sensor,
and a picture of the (shielded) wiring to the sensor.
Another real easy one with higher than average CPU fan usage is dust bunnies.
Just throwing that one out there.

just to refresh your memory...

im not talking about compiling or anything like talking about the IDE just sitting there in the background being open.... leave it running on your system for 24hrs or more and watch the 100% core usage for yourself..

currently after restarting the IDE its sayin 0% while its in the background.....ill leave it open for the night and show that its maxing out one core...
Audio / Arduino Shield is noisy with s...
Last post by HarryHirsch1 - Today at 08:03 am
Hi there,

i have a Speakers Signal which is very simply. Only in case a button is pressed a signal Needs to be processed (Beep 0.5sec). It is working when Speakers - is connected to Arduino GND and Speakers + is connected to Arduino +. As soon iam starting to use the Shield modul and a Network cable is Plugin in it is not working anymore because it continously blobs a click Sound back to Speakers.

So what to do:
I've searched in the internet for some components I might need. What do you think are they compatible and good for doing the project?

(And the rest would be resistors, capacitor, and so on)

I have an 9V Adapter at home for powering the Arduino and the LED Strip over the breadboard Barrel Jack

Quote from: vibhu18
There's another approach, what about controlling the LEDs with the pitch of the sound.
It would be an Idea. The problem is that I do not want to play all the time with sound coming from my inbuild speakers. I mostly play over Headset and I don't think that this would work.
Yes you can connect it to the sensor shield it has Rx Tx pins, but just you need to confirm one thing that some boards have the reverse connections for Rx and TX pins. there might be the least possibility that we have to connect Rx to Rx and Tx to Tx pin. but anyways it is another way around.
and one more thing if you are connecting the sensors to this boards, Do confirm that these floating pins have internal pull ups or not. if not then you have to use external pullups to treat the sensor as input
Project Guidance / Re: How to test arduino mega
Last post by john121212 - Today at 07:52 am
In practical terms the answer is NO. Even a very experienced Arduino programmer would find it difficult to figure out how a program works from the compiled code with no assistance from the person who wrote the program.

To be honest I think the Arduino is the least likely place where the fault lies. More likely there is a broken connection or a failed component somewhere else.

As has been suggested, get the trunk opened first. Then consider repairing or replacing the Arduino based system.

If you choose to repair it I presume this episode will encourage you to have a manual override in the new system :)

Ok, hmm a bit stuck then. There is a manual override, the only problem is that the earlier owner has installed it wrong during the renovation(the car is from 1955), so it doesnt work.

Is it possible to force to run the program from USB cabel and the IDE, without the source code? Its just two buttons, one to open, and one to close, and if that button is broken i would like to test it from another way. What do you think?
Pages: [1] 2 3 ... 10