Skip to main content

Messages

This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - tino

2
Tutorials / Re: ESP8266 - AT Firmware - 3.0.1
Code: [Select]
 esptool.py erase_flash

Code: [Select]
https://github.com/espressif/ESP8266_NONOS_SDK/archive/v3.0.1.tar.gz

Code: [Select]
 esptool.py -p /dev/tty.usbserial-A603AYEQ --chip esp8266 write_flash --flash_size 2MB-c1 0x00000 boot_v1.2.bin 0x01000 at/1024+1024/user1.2048.new.5.bin 0x1fc000 esp_init_data_default_v05.bin 0xfe000 blank.bin 0x1fb000 blank.bin 0x1fe000 blank.bin
3
Tutorials / ESP8266 - AT Firmware
Connect the ESP8266-12E as follows;

  • GPIO15 - GND
  • GPIO02 - VCC
  • GPIO00- GND
  • RESET - GND ( Temporarily )
  • TX - RX
  • RX - TX

  • Install esptool.py

Code: [Select]
 pip install esptool 

  • Download SDK 2.2.1


Code: [Select]
https://github.com/espressif/ESP8266_NONOS_SDK/archive/v2.2.1.zip

  • Extract files and go to bin/
  • Run the following command and reset the chip


Code: [Select]
esptool.py --port /dev/tty.usbserial-A603AYEQ --baud 115200 write_flash --flash_mode dio 0x00000 boot_v1.2.bin 0x01000 at/512+512/user1.1024.new.2.bin 0x7B000 blank.bin 0x3FC000 esp_init_data_default_v05.bin 0x7E000 blank.bin
13
PostgreSQL / Re: MISC Queries
Show running queries (9.2)

Code: [Select]
SELECT pid, age(query_start, clock_timestamp()), usename, query 
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;

kill running query
Code: [Select]
SELECT pg_cancel_backend(procpid);

Kill idle query
Code: [Select]
SELECT pg_terminate_backend(procpid);
14
PostgreSQL / MISC Queries
Compare two rows

Code: [Select]
SELECT T1.log_dt, T2.log_dt, EXTRACT(EPOCH FROM (T2.log_dt - T1.log_dt))
FROM power_data AS T1
INNER JOIN power_data  AS T2
USING ( node )
WHERE T1.log_dt > '2017-05-05 22:10:00'
AND T2.log_dt > '2017-05-05 22:10:00'
ORDER BY T1.id, T2.id
LIMIT 2