These are chat archives for esp8266/Arduino

10th
Jun 2015
Michael Miller
@Makuna
Jun 10 2015 06:42
How public is the staging json file?
@igrr How public is the staging json file?
Ivan Grokhotkov
@igrr
Jun 10 2015 06:43
I think I linked to it in one of the issues so it should be pretty public
Michael Miller
@Makuna
Jun 10 2015 06:52
When are we going to get an update to staging? To the normal release?
Russ Mathis
@RussMathis
Jun 10 2015 18:54
@Makuna, have not had chance to try yet. Will soon, have different difficulty first...:(
@Makuna, just got in a couple DS3231 RTC modules and can't get the Rtc library to work? keep getting: RTC lost confidence in the DateTime!
85/165/2009 37:165:, have tried using different pins to (12,13),
is something broke?
Me No Dev
@me-no-dev
Jun 10 2015 19:01
what RTC lib is this?
is if't written for DS1307, then they are not compatible
Russ Mathis
@RussMathis
Jun 10 2015 19:02
@me-no-dev, I'm using: https://github.com/Makuna/Rtc
I'm using the Simple example...
Me No Dev
@me-no-dev
Jun 10 2015 19:04
no clue then. But can say that I have the same RTC here and it's working fine with my lib, so it's not the I2C (i'm using the default pins 4,5)
Russ Mathis
@RussMathis
Jun 10 2015 19:04
I've tested the module on an UNO and it works ok...
Me No Dev
@me-no-dev
Jun 10 2015 19:05
another reason could be faulty power
that resets the RTC chipt
UNO is on 5 volts
Russ Mathis
@RussMathis
Jun 10 2015 19:06
I'm using PC power supply 3V3, maybe has to be pins 4,5?
Me No Dev
@me-no-dev
Jun 10 2015 19:06
do not think that the pins are the issue
does the i2c scanner detect the RTC fine?
Russ Mathis
@RussMathis
Jun 10 2015 19:06
Maybe modules requires 5V?
Me No Dev
@me-no-dev
Jun 10 2015 19:07
mine works fine on 3.3, but you can try to power the module with 5V
leave data lines at 3.3
Russ Mathis
@RussMathis
Jun 10 2015 19:07
I'm not familar with i2c scanner???
Me No Dev
@me-no-dev
Jun 10 2015 19:07
a sketch example
Russ Mathis
@RussMathis
Jun 10 2015 19:07
First time working with i2c:(
Ok, I check it out too... Thx!
Russ Mathis
@RussMathis
Jun 10 2015 19:14
5V power on DS3231 made no difference, checking out the i2c scanner..
Russ Mathis
@RussMathis
Jun 10 2015 19:32
@me-no-dev, good call...:) my bad---Bad solder!, Works greate but still want to check out the i2c scanner. Thx!
@me-no-dev , by the way can you get millis or micros from the DS3231?
Me No Dev
@me-no-dev
Jun 10 2015 19:33
no
seconds only
Russ Mathis
@RussMathis
Jun 10 2015 19:33
k, thx!
chad cormier roussel
@chadouming
Jun 10 2015 19:59
hmm, analogWrite on atTiny85 is precise
more than I actually expected
Me No Dev
@me-no-dev
Jun 10 2015 20:00
it's as acurate as it can usually get
it's a real hardware PWM
not like ours..
chad cormier roussel
@chadouming
Jun 10 2015 20:02
with this code :smile:
//for ESCs
analogWriteFreq(50);//some can go to 400
analogWriteRange(20000);//this is microseconds per cycle
analogWrite(pin, 1500);
it will be from 0 - 20000 ?
Me No Dev
@me-no-dev
Jun 10 2015 20:03
yes
but this is too slow for actual analog device
chad cormier roussel
@chadouming
Jun 10 2015 20:03
cool
Me No Dev
@me-no-dev
Jun 10 2015 20:03
it's this way so it outputs servo signals
which are between 700 and 2100 useconds
every 20ms
which is a period of 50 Hz
chad cormier roussel
@chadouming
Jun 10 2015 20:09
i suppose 0 -20000 is for software compatibility ?
my real question is, the esc change the voltage to the motor according to the voltage (0-5v) to the pwm pin, right ?
or is the speed of the PWM really important ?
Me No Dev
@me-no-dev
Jun 10 2015 20:47
ok, there is something you need to understand
ESCs are controlled by Servo pulses
which is a type of PWM
not the type for LEDs and brushed motors where your duty goes from 0 to 100%
for ESCs and Servos the length of the pulse is what matters
standart range is between 700 and 2100 useconds
and for most servos, this puls ecan not come more often than every 20 miliseconds
some ESC on other hand can handle that pulse to come more often than that
but the length of the pulse is still the same
the latest craze being to send 8 times shorter pulses on each loop, rather than regular puls every X milliseconds, but length still matters
Me No Dev
@me-no-dev
Jun 10 2015 20:52
therefore for 50Hz send rate (20 ms) there are 20000 us and I sed those as freq and range
writing the pulse length as analogWrite argument gives exactly the needed puses to drive the ESCs/Servos
for 200Hz ESC refresh rate, you would set the freq to 200 and the range to 5000
then write the same values
chad cormier roussel
@chadouming
Jun 10 2015 20:59
y u no start with that
Me No Dev
@me-no-dev
Jun 10 2015 21:02
cuz i thought you knew it already
chad cormier roussel
@chadouming
Jun 10 2015 21:04
if i knew, i wouldn't have asked why the servos all the time !! xD
Russ Mathis
@RussMathis
Jun 10 2015 21:14
Trying to call ESP.reset() cause fatal errors?
unsigned long test[10];
void loop()
{
for (int i = 0; i < 10; i++)
{
test[i] = micros();
yield();
}
for (int i = 0; i < 10; i++)
{
Serial.println(test[i]);
yield();
}
delay(1000);
ESP.reset();
}
chad cormier roussel
@chadouming
Jun 10 2015 21:15
well, does it reset the chip ?
Russ Mathis
@RussMathis
Jun 10 2015 21:16
Hard to tell to many errors printed on the screen at each reset.
Is there another way to start micros back to 0
Maybe restart(), what's the difference between reset and restart?
chad cormier roussel
@chadouming
Jun 10 2015 22:35
restart call a system api while reset seems to point directly to an sdk method
Michael Miller
@Makuna
Jun 10 2015 23:30
@RussMathis @me-no-dev Glad you got the RTC libs to work. My RTC libraries expose every feature on the RTC chips I support. Even the weird alarms and the weird EPROM storage.