Recent Posts

Pages: [1] 2 3 ... 10
Hardware / Re: Convertitore segnali 5v ->...
Last post by SukkoPera - Today at 01:49 pm
I classici traslatori di livello 3.3/5 fatti con un MOSFET non dovrebbero funzionare anche con 5/24, usando MOSFET opportuni?

Intendo questo circuito:
Programming Questions / Re: LED Control
Last post by UKHeliBob - Today at 01:49 pm
I want to control led using servo.
Do you mean that literally or do you mean that when the servo is commanded to go to position 0 the Arduino also turns on the red LED etc ?

What code have you tried ?
Have you looked at the Servo Sweep code in the IDE ?
Have you tried modifying it to turn LEDs on/off when the servo is at the relevant positions ?
What type of servo are you using ?
How is the servo powered ?
I wonder what that  dir   pin on the board is for?  Hmmmm.

Here is a hookup guide and example code.

A snippet from the guide.
STEP -Logic Input. Any transition on this pin from LOW to HIGH will trigger the motor to step forward one step. Direction and size of step is controlled by DIR and MSx pin settings. This will either be 0-5V or 0-3.3V, based on the logic selection.

DIR -Logic Input. This pin determines the direction of motor rotation. Changes in state from HIGH to LOW or LOW to HIGH only take effect on the next rising edge of the STEP command. This will either be 0-5V or 0-3.3V, based on the logic selection.
Hi, I hope I'm in the right area.
I am running the IDE on a MacBook Pro, and am up to date.
I can load a sketch into the IDE, compile it without errors but when I try to load it into the Arduino (Uno) it fails. The fault seems to be that instead of using the Comms Port the IDE seems to be looking only at a Bluetooth Input.
I thought I could fix this by resetting the comms port but when I go to Tools Ports there is no "ports" option only Dev/cu.Bluetooth-Incoming Port.
In the Ports section "Ports" is greyed out and all I can see there is the dev/cu.... descriptor, which is ticked.
If I switch off Bluetooth it has no effect.
i've run out of ideas.
Has anyone else had this problem?
Did you consider the fact that you may need a driver?

Generale / Re: Collegamento Mega - relay ...
Last post by Patrick_M - Today at 01:48 pm
esistono anche i rele allo stato solido se è solo per il rumore....
Generale / Re: Arduino senza interferenze
Last post by Claudio_FF - Today at 01:47 pm
Quote from: steve-cr
un esempio di protezione ESD, dato che devo rifare i cs, te ne sarei grato!
P.S. non si accettano più di 2 componenti ogni ingresso !  :)
Cercando "input ESD protection" si apre un mondo.

Con il vincolo di due componenti... uno è sicuramente una R in serie al pin di ingresso (10..47k) che dovrebbe esserci comunque (vedere Protecting Inputs in Digital Electronics), l'altro è un diodo TVS unidirezionale, che potrebbe anche essere uno zener, ma il TVS è più veloce ed esiste anche in array SMD.

Il GND dei diodi scaricatori deve andare a un piano di massa più grande possibile e più vicino possibile all'alimentazione senza passare attraverso altre sezioni (...e sembra di descrivere lo Zelio).
Software / Re: ESP8266 wi-fi client e ser...
Last post by SukkoPera - Today at 01:45 pm
Non lo so, devi contare tu esattamente quanti pin ti servono e vedere se un NodeMCU può bastare da solo.

Se fai solo da server puoi fare la richiesta anche più spesso di una volta all'ora.
A lot of fans wish to have exact jerseys that their favourite players adore on the field. It is quite difficult to get the original jersey because of which a lot of brands have come up with innovative designs of shirts and t-shirts having Chicago Cubs' players initials on it. The sports world chicago is one such brand that has enormous stores having a wide range of products not only related to baseball but other sports as well.
A lot of buyers love buying material that is of good quality and initiates the original jerseys to a lot of extents. Clothing is not only based on patterns but on style as well. It is all about enhancing one's overall persona. The customers love going for brands that are providing them with great and resourceful services. The Chicago Cubs shirts are vibrant hand are available in all sizes at reasonable prices. The products brand initiate especially all type of the Chicago Cubs merchandise is for both men and women. Fans can be of any gender and people love buying Chicago Cubs T shirt having not only Chicago Cubs baseball initials but also some other durable emoticons that fascinates people of all age.
There is various sports equipment available for the people related to different sports that people can enjoy shopping for. The brand sells its products online as well via online shopping portals keeping the comfortability of all kind of customers.

Buy Chicago Cubs shirts online now
Hello there,
I am experiencing a problem with running an Arduino Sketch on an MKR Zero. The sketch that is malfunctioning is adapted from Arduino's MKR Zero Weather Data Logger, I have connected the Arduino MKR Zero to a DHT11 sensor via digital pin 3, a simple project that prints the temperature and humidity works. Anyway here is the code of the sketch,

Code: [Select]
#include <SD.h>
#include <RTCZero.h>
#include <DHT.h>

#define DHTPIN 3
#define DHTTYPE DHT11

const int chipSelect = SS1;
unsigned long previousTime;

int loadDataCheck;  //Checks if data needs to be loaded

RTCZero rtc;

/* Change these values to set the current initial time */
const byte seconds = 50;
const byte minutes = 44;
const byte hours = 17;

/* Change these values to set the current initial date */
const byte day = 1;
const byte month = 9;
const byte year = 16;

// the setup function runs once when you press reset
// or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  Serial.println("DataLogger Example:");
   // see if the card is present and can be initialized:
  if (!SD.begin(chipSelect)) {
    Serial.println("Card failed, or not present");
    // don't do anything more:
  Serial.println("card initialized.");

  //When power is supplied to the DHT22 sensor,
  //don't send any instruction to the sensor
  //within one second to pass unstable status
  Serial.println("Initializing DHT");
  Serial.println("Initializing RTC");
  rtc.setTime(hours, minutes, seconds);
  rtc.setDate(day, month, year);

  rtc.setAlarmTime(0, 0, 0);
  rtc.enableAlarm(rtc.MATCH_SS); //alarm attached every minute



  Serial.println("System ready...");  

// the loop function runs over and over again forever
void loop() {
  unsigned long currentTime=millis();
  if ((currentTime-previousTime)>5000)
    digitalWrite(LED_BUILTIN, HIGH);  // turn the LED on
    delay(100);                       // wait for a bit
    digitalWrite(LED_BUILTIN, LOW);   // turn the LED off
  if (loadDataCheck) logData();  

void dataCheck(){

void logData(void) {    
  float humidity = dht.readHumidity();  
  float temperature = dht.readTemperature();
  String dataString = "";
  dataString += "Temperature: " + String(temperature) + " C" + "\t" + "Humidity: " + String(humidity) + "%\t" + "Time: " + getTime();  
  // open the file. note that only one file can be open at a time,
  // so you have to close this one before opening another.
  File dataFile ="datalog.txt", FILE_WRITE);

  // if the file is available, write to it:
  if (dataFile) {
    // print to the Serial port too:
  // if the file isn't open, pop up an error:
  else {
    Serial.println("error opening datalog.txt");

String getTime(void) {
  String returnString = "";

  if (rtc.getHours() < 10)
    returnString += "0" + String(rtc.getHours());
    returnString += String(rtc.getHours());

  returnString += ":";

  if (rtc.getMinutes() < 10)
    returnString += "0" + String(rtc.getMinutes());
    returnString += String(rtc.getMinutes());

  returnString += ":";

  if (rtc.getSeconds() < 10)
    returnString += "0" + String(rtc.getSeconds());
    returnString += String(rtc.getSeconds());

  return returnString;

In this code, I have edited the DHT sensor module from DHT22 to DHT11 and the pin of the sensor, from 7 to 3 (I tested and it works). When I upload the sketch to my board via the Arduino Web Editor, the project runs as expected, but when I upload it using the desktop IDE, the SD Card module fails to initialise, in the section of code stating:

Code: [Select]
if (!SD.begin(chipSelect))
    Serial.println("Card failed, or not present");
    // don't do anything more:

The Arduino MKRZero prints Card failed, or not present to the Serial Monitor, this does not happen when running the code on the Arduino Web Editor. This is my first project working with the built-in SD Module of the Arduino MKRZero, though I have used the SD library several times before with an external SD Module and all projects worked.

I am running the latest version of the Arduino desktop IDE (1.8.5) on an iMac, the SD library is of version 1.2.1 both on the Desktop IDE and the Web Editor. This has never happened to me before, I am not sure if it is a Desktop IDE error or if the Arduino is malfunctioning, as I said, both the IDE and Web Editor use the same versions of the libraries and are at its newest version.

thank you for your help in advance.
Hardware / Re: Controlar vueltas de motor...
Last post by MCasellas - Today at 01:42 pm
Muchísimas gracias surbyte, esta misma tarde miro cómo adaptar lo que me has enviado, lo he compilado y si, justo lo que me lanza la salida es lo que necesito que haga.

Lo que me cuadra ahora es que me digas que mi código funciona bien. Te dejo un enlace a un video para que veas cómo actúa el motor tras iniciar el segundo giro, no para!! El contador deja de contar en la salida y no hay manera de hacerlo parar con el sensor.

Prueba parada motor con sensor

Gracias una vez más por tu generosidad.

Pages: [1] 2 3 ... 10