Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Me No Dev
@me-no-dev
@mega-hz compile what sketches? have you looked at WiringPi?
if you are referencing my Arduino thing for Pi, that is only for Pi CPUs as it is talking to the CPU registers (and BPi have a different CPU)
mega-hz
@mega-hz
so no chance to add the bpi?
0xPIT
@0xPIT
@me-no-dev is a precise resolution in 100µS increments to switch GPIO reasonable?
Me No Dev
@me-no-dev
@0xPIT 100uS is totally doable
@mega-hz zero chance :)
mega-hz
@mega-hz
ok, thanks... have to buy a rpi
Me No Dev
@me-no-dev
@mega-hz I looked through whatever documentation I could find on the A20, but never actually got into writing anything for it
0xPIT
@0xPIT
@me-no-dev cool thanks, I'll try as per the NMI example in the PWM implementation.
Me No Dev
@me-no-dev
@0xPIT issues arise in much higher frequencies. You will probably be just fine wotjout NMI also
critical is when you restart the timer in your code. Difference between when the ISR fires and when you reset the timer could cause jitter
Raphyyy
@Raphyyy
Hello guys
Just a quick question about the ESP which I can't found the answer : I noticed that even if I don't start any WiFi station connection, WiFi.SSID() return me the last SSID connected to. Where is stocked this information ? In EEPROM ? Or is this espressif sdk way of operate ?
Daleon L
@Allwaysawake
In the eeprom
Upload another username and password to get conncected
Raphyyy
@Raphyyy
Thanks.
According to the fact that EEPROM has a limited write times, shouldn't this be on the user choice ?
Clemens Kirchgatterer
@everslick
WiFi.persistent(false); ?
0xPIT
@0xPIT
@me-no-dev thanks. the NMI timer variant works, but does not really reduce the jitter. I imagine that my resetting the timer by writing into T1L from an GPIO ISR can cause the jitter, even though interrupts are disabled while reloading the timer. What I do is having T1 loop with 100µS and reset it to 100µS upon a GPIO interrupt in order to sync the timer to the signal on the IO. Strangely, this has similar jitter as another approach: Setting single-short timer after every GPIO interrupt.
I guess I'll make a gist with the code.
Me No Dev
@me-no-dev
@0xPIT generally you should try to set T1L in the beginning of the handler. What is the jitter you are getting? Can there be another interrupt causing this?
0xPIT
@0xPIT
@me-no-dev I've tried that. it's likely that there's some other interrupt, can't figure out where and why it's on the same priority like NMI timer1. I've also tried to disable interrupts without success. I'm using your ESPAsyncWebServer, btw.
0xPIT
@0xPIT

I'm trying to create a AC mains dimmer that emulates a hue bridge for Alexa.
Hardware-wise, I have a zero-crossing interrupt at one GPIO that edge-interrupts at very half-wave, i.e. 100Hz in my case. The timer should then switch on the load after some delay which depends on the current bightness level. (0-10ms in e.g. 64 steps)

I've tried two approaches:

1) using NMI timer in single shot mode; upon a zero-crossing interrupt, first I'm setting timer by loading T1L directly, and turning the load off. The timer callback turns on the load after a time that depends on the desired brightness level.

2) using a free-running NMI timer in loop mode, with a resolution of n dimmer-levels (i.e. period time / levels, e.g. 64), and a volatile loop counter that increments every timer tick and is reset upon every zero crossing. Now, in the timer-isr, if the loop counter > desired dimmer level, the load is turned on.

Both approaches work but experience the same ~1-2ms jitter. Using the timer alone seems to work fine in either mode and is accurate, even with the web server active.
I've experimented with loading the timer in various places, tried to disable interrupts in "right" place and using compensation values for the timer to acciount for cpu cycles consumed, but I can't get it to work w/o jitter.

Me No Dev
@me-no-dev
@0xPIT have you tried with WiFi off? maybe the radio is what is interrupting you?
1-2ms is quite the jitter...
I could expect 1-2us, but thousand times that is too much
Michael Miller
@Makuna
@0xPIT There is a interrupt in the WiFi core that can't be disabled and will cause issues. I ran into it two years ago when I was writing my NeoPixel support for Esp8266. The summary of that investigation and work was, I had to use hardware and you can't disable the interrupt or else you will run into resets. So, I don't think it will get better for you.
You can put a small AVR (one of the tiny) that just does the AC management and let the esp8266 do all the high level work.
0xPIT
@0xPIT
thanks for the hint, @Makuna I can't use extra hardware, there's so space left in the enclosure :)
with wifi off it would defy it's purpose, @me-no-dev
Michael Miller
@Makuna
By hardware, I mean either external or internal. I gave an external example. Internally, their is a DMA hardware that I use, so I provide a buffer that it constantly sends the output (which includes the ability to loop the buffer or trigger an interupt) that is pretty accurate and not effected by the WiFi interrupt. You might be able to set it up to control the output you want but it will takes some creative thinking.
Birki
@wbirk
hi! does anyone here use the arduino ide under raspian stretch? i installed everything, but when it comes to compiling, i simply get "fork/exec /home/pi/arduino-1.8.5/hardware/espressif/esp32/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++: no such file or directory" ... which is tue, it is not there :/ yours
wolfi
riataman
@riataman
well, obiusly you are missing the compiler
I wonder if there's a prebuild version for the raspberyr pi
Birki
@wbirk
yep, obviously. i was just wondering as there is no comment fromt the python script that anything went wrong, and it recognizes the architecture ...
Stavros Korokithakis
@skorokithakis
can someone point me to the SD card documentation? I can see the Arduino docs but i can't find the ESP8266 docs
Stavros Korokithakis
@skorokithakis
ah looks like they're exactly the same
Asaf Fisher
@AsafFisher
Hey can anyone help me? bought this new ESP8266 (AMICA sponser) And i flashed into it [nodemcu-master-8-modules-2018-02-16-07-09-01-integer] using nodemcu-flasher. I am able to upload code using the arduino software... but code sample blink code seems to not work. Also, ESPlorer doesnot seems to be able to connect to it? (i think)? It shows "Communication with MCU.." and nothing happens. IF I CLICK THE RST btn then it will respond in a weird way:
"can't autodetect firmware, because proper answer not received (may be unknown firmware).
Please, reset module or continue.
R*€À=3ï"
Stavros Korokithakis
@skorokithakis
@AsafFisher you flashed the lua firmware?
i'm running into a weird problem: i run the ESP8266 off batteries (3.7V) on the 5V rail, it boots up, mounts an SD card, creates a wifi AP and waits for a UDP packet and turns on its LED. In my tests, if it boots with 3.6V, it doesn't work. if it boots with 3.7V, it works fine. i'm thinking it can't mount the SD card so the code fails, but why would it work at 3.7V and not 3.6V? I measure the voltage of the 3V3 pin and it is, indeed, 3.31V
Matej Sychra
@suculent
When the radio gets turned on, it draws more current. Maybe the voltage is not only reason.
Stavros Korokithakis
@skorokithakis
i have it connected to a lab PSU and it gets enough current
it's only when voltage is at 3.6 that it can't start
i suspect it can't mount the SD
Asaf Fisher
@AsafFisher
@skorokithakis @skorokithakis I speciied already that i hlashed into it nodemcu
Holger Lembke
@holgerlembke
moin moin
Jaime Vaz
@jmvaz
HI! It's possible connect one I2C device to Tx/Rx port of the esp8266? I have one SonOff S20 with the TX and RX ports available and I want connect a bosch bme280 temperature sensor. I tried but I cant get it working. I have correct readings from sensor using the same code in one D1mini, but in S20 not.
Me No Dev
@me-no-dev
anyone around Nuremberg next week?
320E81D1-BBC2-4660-B543-D9B649A79267-11560-00000DCE2305FAC2_tmp.PNG
Holger Lembke
@holgerlembke
moin moin
Stavros Korokithakis
@skorokithakis
hey everyone
i want to make a very simple circuit to drive some ws2818 LEDs to display random colors. what's a good chip to use? the ESP8266 is pretty large and i only need very basic functionality