Recent Posts

Pages: 1 [2] 3 4 ... 10
Project Guidance / Re: Arduino HC-05, Master can ...
Last post by slipstick - Today at 05:43 pm
i am not quite sure how to poste code, but if needed i can work something out.
Reading "How to use this forum - please read" which is at the top of this and every other forum might give you some useful hints...that is what it's there for.

Also, I'm a bit confused about the serial ports. Adafruit says in this tutorial we need to use #define Serial SerialUSB" at the top of the sketch in order to print out in the serial monitor, but the examples for Arduino Zero in the IDE just use "Serial".

My biggest question is: can I print out to the serial monitor via the native USB port and use hardware serial to communicate with a module? If so, which "Serial" instances should I use? I'm assuming "SerialUSB" is the virtual port which I can use for serial monitor debugging (like ATmega32u4) and "Serial1" is pins 0 and 1 for hardware serial to communicate with a module, etc.
Programming Questions / Re: How to work with array?
Last post by UKHeliBob - Today at 05:40 pm
Code: [Select]
for (int i = 0, i < 2, i++){Wrong syntax.  Read up on for loops
General Electronics / Re: High resistivity wire
Last post by certicoms - Today at 05:40 pm
I thought about using a capacitor to have a similar behavior, but I have two problems with that. The first is that the reaction must be fast (at least 1kHz) and accurate and the second is how to correctly charge the capacitor from the touch of the finger? While the resistive wire would be simple and fast.
You haven't given any real information or posted links to the motor or motor driver you're using or posted any code or said how everything is powered.

My guess is you don't have sufficient power to move the motor. But without information it is just a guess.


Website and Forum / Re: Chatroom on the Arduino We...
Last post by Robin2 - Today at 05:40 pm

Spam pre cursor ?

That did cross my mind.

I imagine the problem lies deep inside your code, which appears to be a state secret. Once a connection has been established, I don't think it matter which is master and which is slave
it would be easier for me if i could see how it's done
But you will not learn as much.

Start by putting the code for each state in its own function and calling them in turn from loop()
Caugh the mistakes I have uploaded the new sketch

  Relay on off with button press and then start a cycle if button pressed to create a
  PWM signal that increases in value. If button is let go it will go to fadevalue 0
  and open the relay.ledstate shared with pwm
Created by Art Castillo
int fadeValue = 255; //pwm value
int motor = 9;      // LED connected to digital pin 9
// constants won't change. Used here to set a pin number:
const int ledPin =  LED_BUILTIN;// the number of the LED pin
const int relay =  6;
// Variables will change:
int ledState = LOW;             // ledState used to set the LED
int pinButton = 8; //the pin where we connect the button
int stateButton;
unsigned long previousMillis = 0;        // will store last time button was updated

const long interval = 200;           // interval at which to blink (milliseconds) contant wont change

void setup() {
  pinMode(ledPin, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(pinButton, INPUT); //set the button pin as INPUT
  pinMode(motor, OUTPUT);

void loop() {
  unsigned long currentMillis = millis();

int stateButton = digitalRead(pinButton); //read the state of the button
  if (currentMillis - previousMillis >= interval) {
    // save the last time you blinked the LED
    previousMillis = currentMillis;
    int fadeValue = fadeValue;
    if (stateButton == 1 && fadeValue < 255) {
      ledState = HIGH;
      if (fadeValue >= 245)
            fadeValue = 255;
    } else {
      ledState = LOW;
      fadeValue = 0;

    // set the LED with the ledState of the variable:
    digitalWrite(ledPin, ledState);
    digitalWrite(relay, ledState);

Now the problem is that it needs to be high and go low. So start at 255 to give 5.12v and drop to 0 to give full speed. The relay works but when i connect my mosfets i have 5.1v and if i close the button no change up or down. Im thinking something is wrong with the code.
I'm not sure how to declare 'prevFix' or 'currentFix'

I don't see your code.

Is it the sketch on your Instructable entry, Weedinator_NMEA_MEGA_36.ino?

fix.heading() only works ok at speeds above 86 mm/s on my 10 m test track.
You probably shouldn't use fix.heading below some minimum speed, say 3km/h.  If your locations are really accurate to 20mm, you can use them to calculate speed and heading very accurately.
Pages: 1 [2] 3 4 ... 10