Recent Posts

Pages: [1] 2 3 ... 10
1
I am trying to set the Arduino Uno's  high fuse to allow the EEPROM to not be erased when programmed.
But a normal Arduino upload to an Uno doesn't erase the EEPROM. You mean you DO want to erase it every time?
2
I also bought this shield:

https://electronilab.co/tienda/ethernet-shield-con-wiznet-w5100-internet-para-arduino/

having no breadboard, how could i connect the sensor to the ethernet shield and the ethernet shield to the arduino uno?
3
Storage / Re: SD cards no more radable b...
Last post by Nick_Pyner - Today at 02:41 am
(maybe there is a way to format them through arduino?);
The only way to format SD is by using the proper formatting programme - not the Windows OS. There is a sticky to that effect at the head of this forum. You actually do this on the PC, not Arduino. Failure to do this may be what your your problem is about.
4
It looks like the serial monitor is current "uncolored" compared to the other Arduino windows.
The relevant code to change THAT looks like:
Code: [Select]

diff --git a/app/src/processing/app/AbstractTextMonitor.java b/app/src/processing/app/AbstractTextMo
index 1602e86..8d3a353 100644
--- a/app/src/processing/app/AbstractTextMonitor.java
+++ b/app/src/processing/app/AbstractTextMonitor.java
@@ -82,6 +82,9 @@ public abstract class AbstractTextMonitor extends AbstractMonitor {
     upperPane.add(textField);
     upperPane.add(Box.createRigidArea(new Dimension(4, 0)));
     upperPane.add(sendButton);
+//+WEW
+    upperPane.setBackground(Theme.getColor("linestatus.bgcolor"));
+//-WEW
 
     mainPane.add(upperPane, BorderLayout.NORTH);
 
@@ -117,6 +120,9 @@ public abstract class AbstractTextMonitor extends AbstractMonitor {
 
     serialRates.setMaximumSize(serialRates.getMinimumSize());
 
+//+WEW
+    pane.setBackground(Theme.getColor("linestatus.bgcolor"));
+//-WEW
     pane.add(autoscrollBox);
     pane.add(Box.createHorizontalGlue());
     pane.add(noLineEndingAlert);


Wrapping that in some sort of UI and code to actively change the colors is a more complicated issue, but perhaps this will be a useful clue to someone.  (the "linestatus.bgcolor" is controlled by lib/theme/theme.txt, which is user-editable, but not a value that can be changed at runtime, nor saved...)

How many instances did you want to have?

5
Did I mention a reward for the help ??

Thanks I'm desperate here
Mike
6
Bar Sport / Re: Not on forum as much latel...
Last post by MAS3 - Today at 02:37 am
Thanks for letting us know, CrossRoads.

You've spent more than enough time on these forums over the years (during working hours or in your own time), so no one can hold anything against you.
One might wonder why you aren't around any more as much as you used to be, but you just explained that.

Also, you've got a lot of other things going on besides your daily work.
Like the fencing, your Arduino (or whatever) products and your (the both of you) initiatives to help youngsters getting started with Arduino and /or microcontrollers.
So you won't fall into any hole, wondering how to spend time after retirement.
So do retire when you can, and enjoy that next step in life.

I'm sure you'll still spend much more time over here than the average user, and i'm sure i'll learn a lot from your future posts.
7
I checked the voltages at all the pins also the PWM i/p to the controller is same but the Voltage output for the two motors is different.
wawa is right. They two motors are the same model, but they will have physical differences, just like twin people will have physical differences.

One first-attempt fix to improve the situation is to add suitable 'offset' values to one or both motors.

The offsets for each motor (that you manually add in software) will usually be different values. The offset values can do 2 things for you. One thing is that they can alleviate dead-band issue....where the motor just doesn't move when not enough voltage is applied to it. So adding some kind of extra voltage (in advance) can often at least reduce this dead-band or dead-zone effect.

The other thing that the different offsets can do for you is to even-up the motor behaviours. So, after a lot of experimenting and tinkering ...... you may manage to find suitable offset values for each motor..... so that both motors can behave similarly for the an overall control input value.

eg.

input_value = 66
offset_A = 9
offset_B = 4


PWM_A =  input_value + offset_A
PWM_B - input_value + offset_B


In the above.....  the input_value is an overall value you want to drive the motors with. And the offsets are automatically (and conveniently) added by your software. So at the end.... you can drive the motors (with offsets added) using PWM_A and PWM_B levels.


And later, if you want to take things further, and if you have them....... there are wheel encoders (like quadrature encoders) that allow you to measure angular velocity, or wheel speed. This can allow you to have more information about each wheel during operation. And the wheel velocity information could be used to equalise wheel speeds (when a suitable control algorithm is used).
8
If you want to use BLE, your phone needs to be BLE compatible. You can get an app to test this. All that Feather stuff seems over complicated, over-priced, and probably doesn't absolve you from learning to use a soldering iron anyway.

Quote
… which would be the right sketch to connect my phone (via Bluetooth) to Feathers for my application:
Advertising: Beacon or
BLE UART: Controller
Definitely not the first and probably neither. As I understand it, you just want to send serial data, and that requires no special code. Your code will be all about managing the data sources.

I can't comment further on BLE, other than that I hear rumour that only BLE-specific apps can be used on the phone. I only use HC-05 and HC-06.

Read replies #3 and #1 again.

9
Cool video.  Thanks.
Another suggestion to help with accuracy.
Mechanically change things to use more/most of the servo travel.
Right now, it looks like you are only using a very small portion of the travel.  This means that for the full travel of your pen, you are only using a small number of the available steps that the servo supports.

Lets say that an inexpensive servo can see 512 discreet steps in the 1000-2000 microsecond PPM signal.
A digital might see 1024 steps, with high quality recognizing 2048 and the extreme servos a full 4096 steps.
For discussion, lets say your servo recognizes 512 steps.  That is 512 that correlated into the full swing of the servo arm.
It looks like the total swing used to move the pen the full range on the page is only a small fraction of that full swing.  For discussion, lets assume 25% of the total servo travel.
Instead of 512 steps usable, you are down to just 128 steps.

Do something mechanically so that the servos make larger movements to move the pen the same distance.
Put shorter sections attached to the servos.  Yes, you will have to reqork your formulas to work with the new lengths, but I think you will end up with finer resolution at the pen with the same program, same transmitted signal resolution.

Make sense?
10
i have been using a adruino uno with a gps module to be uses as a gps tracker.  my data goes to the sd card. but when i insert it in to my computer i get no data. this is the code i have been ruining.
[code
#include <Adafruit_GPS.h> // Laden GPS bibliotheek
#include <SD.h>        // SD-card biblitheek oproepen
#include <SPI.h>       // SPI bibliotheek oproepen
#include <SoftwareSerial.h> // Laden bibliotheek van de software seriële poort
SoftwareSerial mySerial(3,2); // Initialeseren van de tx- en rx-pin als seriële poort
Adafruit_GPS gps(&mySerial);  // Crëeren van het GPS object

String NMEA1;   //Variabel voor de eerste geografische coördinaat
String NMEA2;   //Variabel voor de tweede geografische coördinaat
char c;         // uitlezen van de characters uit de GPS

int chipSelect = 4; // De chipselect is aangesloten op de UNO pin 4
File mySensorData;  // Verklaren variabel voor de sd-card objecten
void setup() {

Serial.begin(115200); // Aanzetten seriële monitor met een gekozen snelheid
gps.begin(9600);      //Aanzetten GPS vanaf 9600 baudrate
gps.sendCommand("$PGCMD,33,0*6D"); // Uitschekelen de antene updates
gps.sendCommand("$PSRF103,02,00,00,01*26"); // desactiveren GSA sentences
gps.sendCommand("$PSRF103,03,00,00,01*27"); // desactiveren GSV sentences
gps.sendCommand(PMTK_SET_NMEA_UPDATE_1HZ); // Stuur 1 data per seconde, frequentie regeling
gps.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA);//Wens enkel de RMC en GGA sentences te verkrijgen
delay(1000);

pinMode(10, OUTPUT); // Pin 10 vermelden als een output om de SDcard te laten goed functioneren
SD.begin(chipSelect); // Initialiseren SD-card door te vermelden dat het aangesloten is aan de chipSelect

if (SD.exists("gpsData.txt")) { // Indien er al een bestand bestaat, verwijderen en nieuw schrijven
SD.remove("gpsData.txt");
}

if (SD.exists("gpsDATADetails.txt")) {
  SD.remove("gpsDATADetails.txt");
  }
}
uint32_t timer = millis();
void loop() {

readgps();
delay(10000);  //om de 10 seconden sentences doorgeven
if(gps.fix==1) { //Data opslaan enkel indien de GPS een fix heeft
 
  mySensorData=SD.open("gpsDATADetails.txt", FILE_WRITE);  // Bestand openen om op te slaan
  mySensorData.println(NMEA1);  // Schrijven van eerste sentence op de SD-card
  mySensorData.println(NMEA2); // Schrijven van tweede sentence op de SD-card
  mySensorData.println("");    // Spatie schrijven
  mySensorData.print("\nTime: ");
  mySensorData.print(gps.hour, DEC); mySensorData.print(':');
  mySensorData.print(gps.minute, DEC); mySensorData.print(':');
  mySensorData.print(gps.seconds, DEC); mySensorData.print('.');
  mySensorData.println(gps.milliseconds);
  mySensorData.print("Date: ");       // Schrijven van de datum in Dag/Maand/Jaar
  mySensorData.print(gps.day, DEC); mySensorData.print('/');
  mySensorData.print(gps.month, DEC); mySensorData.print("/20");
  mySensorData.println(gps.year, DEC);
  mySensorData.print("Fix: "); mySensorData.print((int)gps.fix); // Vermelden van aantaal fix en de qualiteit ervan
  mySensorData.print(" quality: "); mySensorData.println((int)gps.fixquality);
    if (gps.fix) {
      mySensorData.print("Location: "); //Schrijven van de locatie
      mySensorData.print(gps.latitude, 4); mySensorData.print(gps.lat);
      mySensorData.print(", ");
      mySensorData.print(gps.longitude, 4); mySensorData.println(gps.lon);
     
      mySensorData.print("Speed (knots): "); mySensorData.println(gps.speed); // Schrijven van de snelheid, hoek, aantaal gebruikte satellieten en de altitude
      mySensorData.print("Angle: "); mySensorData.println(gps.angle);
      mySensorData.print("Altitude: "); mySensorData.println(gps.altitude);
      mySensorData.print("Satellites: "); mySensorData.println((int)gps.satellites);
      }
  mySensorData.close();        // Bestand sluiten
 
  mySensorData=SD.open("gpsData.txt", FILE_WRITE); //Tweede bestand openen
  mySensorData.print("\nTime: ");
  mySensorData.print(gps.hour, DEC); mySensorData.print(':'); // Schrijven van tijd in H:M:S
  mySensorData.print(gps.minute, DEC); mySensorData.print(':');
  mySensorData.print(gps.seconds, DEC); mySensorData.print('.');
  mySensorData.println(gps.milliseconds);
  mySensorData.print(gps.latitude,4);   // Schrijven van de latitude
  mySensorData.print(gps.lat);          // Noord of Zuid ?
  mySensorData.print(",");              // komma
  mySensorData.print(gps.longitude,4);  // Schrijven van de longitude
  mySensorData.print(gps.lon);          // West of Oost ?
  mySensorData.println("");             // Spatie schrijven
  mySensorData.print(gps.altitude);     // Schrijven altitude
  mySensorData.print(gps.speed);        // Schrijven grondsnelheid
  mySensorData.close();                 // Bestand sluiten
 
}

}

void readgps() {

  cleargps();
  while(!gps.newNMEAreceived()) { // loop van de character tot de GPS een goede NMEA senteces ontvangt,
  c=gps.read();                   // van zodra er een nieuw sentence is springt men uit de while functie
    }
   
    gps.parse(gps.lastNMEA());     //doorgeven laatste goed NMEA sentence
    NMEA1=gps.lastNMEA();
   
    while(!gps.newNMEAreceived()) { // loop van de character tot de GPS een goede NMEA senteces ontvangt,
  c=gps.read();                   // van zodra er een nieuw sentence is springt men uit de while functie
    }
   
    gps.parse(gps.lastNMEA());     //doorgeven laatste goed NMEA sentence voor de tweede coördinatie
    NMEA2=gps.lastNMEA();
   
    Serial.println(NMEA1);
    Serial.println(NMEA2);
    Serial.println("");
   
    if (timer > millis())  timer = millis(); // Reset indien de millis () of timer omslagen

  if (millis() - timer > 2000) {  // Ongeveer elke 2 seconden, print de gegevens uit
    timer = millis(); // reset de timer
     Serial.print("\nTime: ");
    Serial.print(gps.hour, DEC); Serial.print(':');
    Serial.print(gps.minute, DEC); Serial.print(':');
    Serial.print(gps.seconds, DEC); Serial.print('.');
    Serial.println(gps.milliseconds);
    Serial.print("Date: ");       // Schrijven van de datum in Dag/Maand/Jaar
    Serial.print(gps.day, DEC); Serial.print('/');
    Serial.print(gps.month, DEC); Serial.print("/20");
    Serial.println(gps.year, DEC);
    Serial.print("Fix: "); Serial.print((int)gps.fix); // Vermelden van aantaal fix en de qualiteit ervan
    Serial.print(" quality: "); Serial.println((int)gps.fixquality);
    if (gps.fix) {
      Serial.print("Location: "); //Schrijven van de locatie
      Serial.print(gps.latitude, 4); Serial.print(gps.lat);
      Serial.print(", ");
      Serial.print(gps.longitude, 4); Serial.println(gps.lon);
     
      Serial.print("Speed (knots): "); Serial.println(gps.speed); // Schrijven van de snelheid, hoek, aantaal gebruikte satelliten en de altitude
      Serial.print("Angle: "); Serial.println(gps.angle);
      Serial.print("Altitude: "); Serial.println(gps.altitude);
      Serial.print("Satellites: "); Serial.println((int)gps.satellites);
      }
      }
}

void cleargps() { // Maakt het mogelijk de vier sentences goed uit te lezen anders verkrijgt men oude sentences
 
  while(!gps.newNMEAreceived()) { // loop van de character tot de GPS een goede NMEA senteces ontvangt,
  c=gps.read();                   // van zodra er een nieuw sentence is springt men uit de while functie
    }
   
    gps.parse(gps.lastNMEA());     //doorgeven laatste goed NMEA sentence
   
    while(!gps.newNMEAreceived()) { // loop van de character tot de GPS een goede NMEA senteces ontvangt,
  c=gps.read();                   // van zodra er een nieuw sentence is springt men uit de while functie
    }
   
    gps.parse(gps.lastNMEA());     //doorgeven laatste goed NMEA sentence
 
  }



]
 
Pages: [1] 2 3 ... 10