Recent Posts

Pages: [1] 2 3 ... 10
Project Guidance / Breadboard concern.
Last post by DannyIsOnFire14 - Today at 04:46 am
    I recently bought a 6v 2000mAh NIMH battery to power around 4 or 5 micro servos. I'm just wondering if it is safe that I connect this battery directly to the solderless breadboard (provided by Arduino Starter kit) in parallel with each of these servos.

   Thanks for the feedback. I'm a somewhat beginner to the world of electronics.
Yeah, that would make a lot more sense.  Glad you go it figured out. 
yeah i am sorry i just relised.

Code: [Select]

/* This example shows how to get single-shot range
 measurements from the VL53L0X. The sensor can optionally be
 configured with different ranging profiles, as described in
 the VL53L0X API user manual, to get better performance for
 a certain application. This code is based on the four
 "SingleRanging" examples in the VL53L0X API.

 The range readings are in units of mm. */

#include <Wire.h>
#include <VL53L0X.h>
const int SDAPIN = 21;
const int SCLPIN = 22;
VL53L0X sensor;

// Uncomment this line to use long range mode. This
// increases the sensitivity of the sensor and extends its
// potential range, but increases the likelihood of getting
// an inaccurate reading because of reflections from objects
// other than the intended target. It works best in dark
// conditions.

#define LONG_RANGE

// Uncomment ONE of these two lines to get
// - higher speed at the cost of lower accuracy OR
// - higher accuracy at the cost of lower speed

//#define HIGH_SPEED

void setup()
  Wire.begin(21 , 22);

#if defined LONG_RANGE
  // lower the return signal rate limit (default is 0.25 MCPS)
  // increase laser pulse periods (defaults are 14 and 10 PCLKs)
  sensor.setVcselPulsePeriod(VL53L0X::VcselPeriodPreRange, 18);
  sensor.setVcselPulsePeriod(VL53L0X::VcselPeriodFinalRange, 14);

#if defined HIGH_SPEED
  // reduce timing budget to 20 ms (default is about 33 ms)
#elif defined HIGH_ACCURACY
  // increase timing budget to 200 ms

void loop()
  if (sensor.timeoutOccurred()) { Serial.print(" TIMEOUT"); }


This was my example code . i'm put wire.begin(21,22); because that i relised that if i dont put 21,22 inside the () my sensor range only can detected until mostly 700 it was not making sense. but after i putting in 21,22 my sensor was not working at all the range was not printed out.
Audio / Play 2 sounds simultaneously o...
Last post by TommyDDR - Today at 04:44 am

I'm trying to play multiple sounds (at lease 2) with my DFPlayer.
It seems to be impossible, so i try to wire 2 DFPlayers and connect each SPK to my speakers but i don't know if it's very safe and after few tests, it "works" but sounds seems lowered.

There is my wiring in attachment (yes, i know, i love mspaint ^^)
I only need to play files, that's why DFPlayer Tx isn't wired.

I'm an electronic beginner, can you tell me if i'm doing something wrong, and if it is, how can i achieve my goal ?

Thank you !
Project Guidance / Re: CDI tester project
Last post by cattledog - Today at 04:43 am

Some comments on your understanding of what line in the code does what.

I recommend that you consider the cycle to start with the +12v pulse and that it is done with the code at lines 54-61. This + pulse (and the - pulse as well) are taken back to 0v with the code at line 44. The code triggering the -12v is at lines 62-69.

There are two interrupts which turn the pulses on and off.

Turn Off code, is in the Compare B interrupt which always occurs after 10 degrees of pulse length.

Turn On code, with either +12 or -12, is in the Overflow interrupt, and the time to overflow, or overall cycle length, is set by the rpm.

You could consider the alternating pulses as a switch case, or state machine, situation where the two alternating cases are 1)give a positive pulse and wait at 0v for the bar length time and 2)give a negative pulse and wait at 0v for the remainder of the cycle time.

sorry is  const int not #define .
Yeah, that would make a lot more sense.  Glad you go it figured out. 
General Electronics / Re: Help pcb design
Last post by TomGeorge - Today at 04:39 am
J7 and J8 gnd pins not connected to gnd.
C3 missing?

Tom... :)
Project Guidance / Re: ENC8266.201
Last post by dave-in-nj - Today at 04:38 am

i'm working on Esp-201 module to be programmed through PL2303 (USB to serial module).
looking for Esp8266.01 and i couldn't find it
in between lets say i found library file for Esp8266 does it have any differences with Esp8266.201 or no?
if that's different plz send the right library.
it is helpful for us that you load something like the Blink example and verify that it works.
and if that does, then we can help figure what your other problems might be.
if your having issues with your sketch, we suggest you upload your code.
if you have not done that before, please read  HOW TO USE THIS FORUM as item #7 lists how to post code.
you can find that link on any forum, it is a sticky post on every forum.
General Discussion / LCD Confusion - please help
Last post by Dante_Arduino - Today at 04:34 am
Hi all,

I am using aruino uno.
I am using a code i found online which is used to make an LCD display read the temperature which the temperature sensor detects. The LED's display too, how hot or cold it is by using three levels of below X degrees C, above Y degrees C and in between. The piezo beeps if it is at one of these levels (i think above Y).

However, the Problem:
The LCD screen does not display text or the temperature read, rather, it just lights up.

Here is the code and circuit:

Any Help would be really appreciated!!
Ps. i need to get this done today, thank you.

#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int sensorPin = 0;
float tempC;
void setup() {
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(13, OUTPUT);
  pinMode(9, INPUT);
lcd.begin(16, 2);
void loop() {
tempC = get_temperature(sensorPin);
lcd.print("Temperature: ");
lcd.print (tempC, 1); lcd.print(" "); lcd.print("C");

 if (tempC <= 16){
    digitalWrite(8, HIGH);
    digitalWrite(7, LOW);
    digitalWrite(13, LOW);
 else if (tempC > 36){
    digitalWrite(7, LOW);
    digitalWrite(8, LOW);
    digitalWrite(13, HIGH);
    tone(9, 700, 250);
  else {
    digitalWrite(7, HIGH);
    digitalWrite(8, LOW);
    digitalWrite(13, LOW);
float get_temperature(int pin) {
float temperature = analogRead(pin);
float voltage = temperature * 5.0;
voltage = voltage / 1024.0;
return ((voltage - 0.5) * 100);

I have had two times where I could not load to an ESP8266  and once with an ESP32
all  were solved by slowing the upload speed

tools / upload speed

115200 seems to work well.

cannot say that is what you have, but each problem I had showed different error messages.

Code: [Select]
#define SDAPIN = 21;

You ever see a #define with an = or a semicolon?

#define is a direct text replacement.  It's like "find-and-replace" before it goes to the compiler.

So now this line:
Code: [Select]

pinMode(SDAPIN, INPUT); // Sets the SDAPin as an INput


Code: [Select]
pinMode(= 21;, INPUT); // Sets the SDAPin as an INput

Hopefully you can see the problem with that. 
sorry is  const int not #define .
Pages: [1] 2 3 ... 10