Recent Posts

Pages: [1] 2 3 ... 10
I suspect this line will not compile
Code: [Select]
  if( (msgNr ==0) || (printDone == true) && (k<10) ) { 

I am always wary of complex IF statements - especially mixing and and or

I can't get away from the feeling that yours is a problem of thinking rather than programming. I'm still not at all clear how the relationship between your Arduino and the other device should be managed.

I don't know if you have said what is the device that is sending the data. Post a link to its datasheet or user manual where the interface is defined.


Project Guidance / Re: Flickering Potentiometer
Last post by ciabio - Today at 07:20 pm
Again, I can't help you if you don't post your exact code and complete error messages.
after putting the code that  you sent me,

the potentiometers worked .. I wanted to connect the slider pot too.
but there is a problem .. when I attack one it works with two also .. when i attack the third no longer goes and if I move the first one also moves the third .. I tried everything, I also remade the connections and tested individually slider ... I do not know how to move on

Can you post the code you've got?
Helping you would be easier then.
Portugues / Re: Arduino ethernet board com...
Last post by DiegoProtec - Today at 07:18 pm
Consegui enviar o sketch e resetar. Tá tudo ok.

Porém ainda não consigo ligar e apagar o LED.

Código arduino:

#define LED 7
#define BT0 2
#define BT1 3

int dadoRecebido = 0;
int bt0Value = 0;
int bt1Value = 1;

void setup() {
  pinMode(LED, OUTPUT);

void loop() {

  bt0Value = digitalRead(BT0);
  bt1Value = digitalRead(BT1);

  if (Serial.available() > 0) {
    dadoRecebido =;

    if (dadoRecebido & 0x01) {
      digitalWrite(LED, HIGH);
    } else {
      digitalWrite(LED, LOW);


Código Java:

Classe, Controle Arduino
Método abre a conexão, conectaArduino

public ConnectArduino conectaArduino(String porta) throws SerialPortException {
        this.portaSerial = new SerialPort(porta);
        this.portaSerial.setParams(SerialPort.BAUDRATE_9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
        this.portaSerial.addEventListener((SerialPortEvent serialPortEvent) -> {
            if (serialPortEvent.isRXCHAR()) {
                try {
                    byte[] b = this.portaSerial.readBytes();
                    int value = b[0] & 0xff;
                    String st = String.valueOf(value);

                } catch (SerialPortException ex) {
                    System.err.println("Erro ao abrir conexão.");
        return new ConnectArduino(this.portaSerial);

Retorna uma conexão para o método que executa o comando.

Classe de interface que executa os comandos, AucarInterface
Método que executa o evento, acenderBActionPerformed

private void acenderBActionPerformed(java.awt.event.ActionEvent evt) {                                         
        if (this.acenderB.isSelected()) {
            try {
                this.conecta.escritaDigital((byte) 0x01);
                this.acenderB.setText("Acender Led");
            } catch (SerialPortException ex) {
                Logger.getLogger(AucarInterface.class.getName()).log(Level.SEVERE, null, ex);
        } else {
            try {
                this.conecta.escritaDigital((byte) 0x00);
                this.acenderB.setText("Apagar Led");
            } catch (SerialPortException ex) {
                Logger.getLogger(AucarInterface.class.getName()).log(Level.SEVERE, null, ex);

Eu vejo que pelos leds dos Arduinos, o TX e o RX estão recebendo e enviando dados mas não consigo ver o que está acontecendo. O LED não acende e nem apaga...
Français / Re: synchroniser moteur PaP av...
Last post by kammo - Today at 07:18 pm

Synchroniser un capteur ultrasons avec des moteurs?

On récupère un signal (une distance) et de là, on dit quoi faire aux moteurs...

J'ai pas compris le problème, si les moteurs vont, alors ils fonctionnent :D

On peut en savoir davantage?
Software / Re: WiFiEsp.h Server e Client ...
Last post by voidbrain - Today at 07:17 pm
È dalla pausa pranzo che me lo domando, ma non trovo la risposta
Ti prego di non desistere  :smiley-roll-sweat:
Software / Re: intterupt in arduino
Last post by Standardoil - Today at 07:16 pm
EDIT: va low quando apri il monitor seriale di Arduino, non so come si comporta con in altri ambiti, parola agli esperti  :D
anche con moserial (linux)
Project Guidance / Re: Using automotive relays an...
Last post by dawm - Today at 07:16 pm
Thank you that's very helpful.
Hi Arduino community!

I have been trying to get my Neo-6M GPS to work with my Arduino Uno for a week now. I have read just about every thread related to the Neo-6M GPS on the entire internet and I found my solution by mere accident! I am wondering if one of the genius' here can help me understand why my change to my code made it work...?

My setup is very simple. I have one of these:

Ublox NEO-6M GPS Module

And it's connected to my Arduino Uno through the following connections:

Vcc from Ublox --> 5V Pin on Uno
Rx from Ublox --> Pin 3 on Uno
Tx from Ublox --> Pin 4 on Uno
Ground from Ublox --> Ground on Uno.

And this is my very simple code...

Code: [Select]

#include <TinyGPS++.h>
#include <SoftwareSerial.h>

static const int RXPin = 4, TXPin = 3;
static const uint32_t GPSBaud = 9600;

// The TinyGPS++ object
TinyGPSPlus gps;

// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);

void setup(){

void loop(){
  while (ss.available() > 0){
    if (gps.location.isUpdated()){
      Serial.print("Latitude= ");
      Serial.print(, 6);
      Serial.print(" Longitude= ");
      Serial.println(gps.location.lng(), 6);

I tried all week with many different ideas to get it working: I tried playing around with the GPSBaud value from 9600 to 115200 and that didn't do anything. I stood outside in my garden looking like an idiot trying to get better "signal" for my GPS and that didn't do anything too.

But in the end, it was the "delay(2000)" bit. I removed that from the code and it worked instantly. Can someone please tell me why this made it work? Did I need to store the gps.location.lng and lat to a variable and print that instead of printing direct from the output of the gps.location function?

Best wishes,

Lewis Norris

Français / Re: Identification d'un signal...
Last post by kammo - Today at 07:15 pm
Le bug est ligne 42 et il me semble que votre fil rouge est mal câblé...

enfin c'est ce que je vois


Blague à part... vous pensez nous avoir donné assez d'info?

Vous l'aimez bien, cette vanne, Monsieur JML ;)
Pages: [1] 2 3 ... 10