Recent Posts

Pages: [1] 2 3 ... 10
1
Le bar / Re: Solution technique présenc...
Last post by Jambe - Today at 07:02 pm
Super, merci pour la précision
2
Deutsch / Re: Funk?
Last post by Tommy56 - Today at 07:02 pm
Das ist wohl noch verrückter.

Wenn ich einfach das Link-Symbol klicke, ist das Eingabefeld auch leer. Wenn ich bereits einen Text markiert habe, der dann im Link erscheinen soll, dann erfolgt die Vorbelegung mit http://

Getestet mit: FF 62.0.3, Chrome 69.0.3497.100, IE 10

Gruß Tommy
3
Displays / Re: Cannot get the touchpanel ...
Last post by amalard - Today at 07:02 pm
Thanks for your answer David,

So I need to check connections for :

RESET
TX0
RX0

or for

RESET
DB0
DB1
?

Because, I already saw that there was no connection for TX0 between
PIN#7 (U5) = A5 and PIN#7 (J19) = D1 TX0 accordind to this Elecfreaks schematic

Thanks,
4
Français / Re: New ping library
Last post by Pomtu - Today at 07:00 pm
OUi c'est compliqué  :) mais est ce bon :

Code: [Select]
#include <NewPing.h>

#define TRIGGER_PIN  12
#define ECHO_PIN     11
#define MAX_DISTANCE 11
 
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE);

/* Utilisation du capteur Ultrason HC-SR04 pour contrôler un servomoteur*/
#include <Servo.h>
Servo myservo;  // create servo object to control a servo

// définition des broches utilisées
int servo = 9 ;
int trig = 12;
int echo = 11;
long lecture_echo;
long cm;
int val;
long lastCm = 0;


#include <Stepper.h>
const int enable = 30;
int nombreDePas = 48*64;

Stepper monMoteur(nombreDePas,8,13,10,6);

void setup()
{
    Serial.begin(115200);
   
   myservo.attach(servo);
  pinMode(trig, OUTPUT);
  digitalWrite(trig, LOW);
  pinMode(echo, INPUT);
  Serial.begin(9600);
 
  monMoteur.setSpeed(9);
}

void loop()

   delay(50);
  Serial.print("Ping: ");
  Serial.print(sonar.ping_cm());
  Serial.println("cm");
   
  digitalWrite(trig, HIGH);
  delayMicroseconds(10);
  digitalWrite(trig, LOW);
  lecture_echo = pulseIn(echo, HIGH);
  cm = lecture_echo / 58;
   int diff = int(abs(lastCm - cm)); // detection de grand saut
 if(diff < 20){ // seulement si diff est faible
  val = min(cm,179);
  if( val< 179){

   Serial.print(diff);
   Serial.print(" : ");
   Serial.println(val);
   myservo.write(val);
 }
 }

  delay(10);
      lastCm = cm;
 
  monMoteur.step(100);

  monMoteur.step(-200);

}
5
Generale / Centrale idroelettrica
Last post by Gotovar - Today at 06:59 pm
Buonasera a tutti, vi scrivo per chiedere qualche consiglio sulla costruzione di un prototipo di centrale idroelettrica con, ovviamente, Arduino. Il mio obiettivo al momento è semplicemente quello di sfruttare l'energia elettrica prodotta da una turbina per accendere qualche Led, per poi estenderlo successivamente ad altri utilizzi. Ahimè sono ancora un novizio (a parte per qualche progetto fatto in precedenza), dunque non saprei proprio come iniziare. La mia idea era quella di usare un alternatore collegato alla turbina, quest'ultima mossa da acqua proveniente da un tubo con regolatore di getto. Il tutto monitorato da Arduino che deve misurare la corrente prodotta (se possibile) e il numero di giri effettuati dalla turbina per avere una stima sulla quantità media di acqua necessaria per farla girare. In ogni caso vi ringrazio in anticipo.
6
Project Guidance / Re: AC motor control
Last post by wvmarle - Today at 06:59 pm
PWM is for DC. In case of AC you use phase cutting - similar idea but very different implementation.

Annotation looks OK to me, but the value for R1 and R2 is way too low - that's a recipe for smoke. Add another zero to those numbers and it'll work a lot better.

3A is no problem; a common BT136-600 will do great. Do add an RC snubber as you're controlling a motor, otherwise the TRIAC most likely won't switch off at zero crossing.

This code and circuit works fine for a 640W pump. Almost 3A. Note that it uses peak detection rather than zero crossing detection. Use at least X2 rated safety caps on the high voltage side (or X1 if you happen to have them, even better).
7
if there's any cons to supplying my 5v solenoid with 3.3v instead since there's no digital 5v pin outs on my board.
#1 - if you have never seen any tutorials online that teaches people to drive a solenoid with a digital output pin of an arduino..... then it should be an obvious indicator that it is not meant to be done.

#2 - if a solenoid is meant to have 5V applied to it for reliable operation.... then it's probably a good idea to use 5V. The assumption is that the voltage source is able to also the required amount of current...........so... power supplies have power ratings.
8
Programming Questions / Re: Managing program "states"
Last post by Perehama - Today at 06:58 pm
The problem with using flags for program states is that if you accidentally set more than one bit you have an ambiguous state.
I totally agree and would not use flags for program states. I was making the point that a state machine may NOT be desirable, for example, if there is Serial data received that is to be written to the SD card and the CAN bus. If a state machine IS necessary, Johnwasser's approach is correct.
9
Deutsch / Re: Auto Kamera Switch
Last post by HotSystems - Today at 06:57 pm
Auch wenn es bei dir jetzt funktioniert, hast du es noch nicht geschafft.

Das mit dem Interrupt ist so keine Lösung.
Und du kannst den Interrupt nicht durch einen weiteren Interrupt unterbrechen.
Der tut erst mal seine Arbeit.
Erst danach kannst du die nächste Funktion starten.

Und dein Projekt braucht def. kein Interrupt, das kannst du alles in der Loop abhandeln.
10
Thank you rpt007, yes its a clone, it was a gift from a friend,  I will go find the CH340x comm driver,
cheers Denis
Pages: [1] 2 3 ... 10