Search found 51 matches

by RajaRamesh
Tue Jun 25, 2019 7:37 am
Forum: ESP8266 boards
Topic: How to switch on a electric bulb with ESP8266 board?
Replies: 50
Views: 30996

Re: How to switch on a electric bulb with ESP8266 board?

You can control that by the initial value of i 0 or 1. If you want the behaviour to change in certain times, you need to know the real time. But you were at that question before. Hi Robert, yes, i am aware of real time which we need to synchronize with ntptime and for this we need internet. But, i ...
by RajaRamesh
Mon Jun 24, 2019 10:38 am
Forum: ESP8266 boards
Topic: How to switch on a electric bulb with ESP8266 board?
Replies: 50
Views: 30996

Re: How to switch on a electric bulb with ESP8266 board?

You can control that by the initial value of i 0 or 1. If you want the behaviour to change in certain times, you need to know the real time. But you were at that question before. Hi Robert, yes, i am aware of real time which we need to synchronize with ntptime and for this we need internet. But, i ...
by RajaRamesh
Mon Jun 24, 2019 10:10 am
Forum: ESP8266 boards
Topic: How to switch on a electric bulb with ESP8266 board?
Replies: 50
Views: 30996

Re: How to switch on a electric bulb with ESP8266 board?

You must reset i=0 if level raises again to 10 and more.e.g. Hi Robert, i have a doubt. Logic is working when level<10 and power is on. But what if power off and power is back in midnight. how to handle logic not work in midnight for few censorious? typo mistake. now i have changed scenarios from c...
by RajaRamesh
Sun Jun 23, 2019 7:50 am
Forum: ESP8266 boards
Topic: How to switch on a electric bulb with ESP8266 board?
Replies: 50
Views: 30996

Re: How to switch on a electric bulb with ESP8266 board?

Roberthh wrote:
Sat Jun 22, 2019 7:58 pm
You must reset i=0 if level raises again to 10 and more.e.g.
Hi Robert, i have a doubt. Logic is working when level<10 and power is on. But what if power off and power is back in midnight. how to handle logic not work in midnight for few censorious?
by RajaRamesh
Sun Jun 23, 2019 6:48 am
Forum: ESP8266 boards
Topic: How to switch on a electric bulb with ESP8266 board?
Replies: 50
Views: 30996

Re: How to switch on a electric bulb with ESP8266 board?

Roberthh wrote:
Sat Jun 22, 2019 7:58 pm
You must reset i=0 if level raises again to 10 and more.e.g.

Code: Select all

    if level >= 10:
       i = 0
    time.sleep(1)
Thank you Robert. Now logic is working fine.
by RajaRamesh
Sat Jun 22, 2019 7:42 pm
Forum: ESP8266 boards
Topic: How to switch on a electric bulb with ESP8266 board?
Replies: 50
Views: 30996

Re: How to switch on a electric bulb with ESP8266 board?

Hi , i am trying to blink inbuilt led only once if the level value is less than 10. with below code i am able to blink once.but when the level value increases more than 10 and reduces less then 10 led is not blinking. can someone help me how to achieve this ? Note:- if i include i=0 inside while loo...
by RajaRamesh
Tue Jun 18, 2019 11:17 am
Forum: ESP8266 boards
Topic: How to switch on a electric bulb with ESP8266 board?
Replies: 50
Views: 30996

Re: How to switch on a electric bulb with ESP8266 board?

pythoncoder wrote:
Tue Jun 18, 2019 9:49 am
The Wiki http://wiki.micropython.org/Home has links to drivers for a variety of devices. You can also search this forum.
Thank you python coder. i will check and get back to you if i have any question.
by RajaRamesh
Tue Jun 18, 2019 9:11 am
Forum: ESP8266 boards
Topic: How to switch on a electric bulb with ESP8266 board?
Replies: 50
Views: 30996

Re: How to switch on a electric bulb with ESP8266 board?

There are many ways to do it, depending on the electronic interface of the device. MicroPython supports various interfaces: UARTs, I2C, SPI, CAN or simply changing Pin inputs. There are also drivers for various devices, some official, some contributed by users. UARTs are somewhat problematic on ESP...
by RajaRamesh
Mon Jun 17, 2019 1:20 pm
Forum: ESP8266 boards
Topic: How to switch on a electric bulb with ESP8266 board?
Replies: 50
Views: 30996

Re: How to switch on a electric bulb with ESP8266 board?

pythoncoder wrote:
Mon Jun 17, 2019 8:07 am
I'm not sure what you're asking. That code would work on an ESP8266.
Hi pythoncoder, below screenshot may give an idea what i am trying to say. is it possible to pass a value from external device at runtime to ESP8266 ?
image.png
image.png (222.98 KiB) Viewed 5326 times
by RajaRamesh
Mon Jun 17, 2019 7:41 am
Forum: ESP8266 boards
Topic: How to switch on a electric bulb with ESP8266 board?
Replies: 50
Views: 30996

Re: How to switch on a electric bulb with ESP8266 board?

@RajaRamesh The ntptime module is merely used to initialise the RTC. If you have an internet connection it's the obvious way to do it, but you can set it by any means you wish. Note that the RTC on the ESP8266 is not very accurate and it may need setting at regular intervals. Ok...pythoncoder. is i...