WordPress NextGEN Gallery doesn’t work in some themes – workaroud


  • visual editor in backend doesn’t work;
  • NextGen option doesn’t show up;
  • everything works ater switching to some default theme like “tweenty-eleven”;
  • in html source code of the webpage you can see wrong links to CSS and JS files with duplicated domain name;

Versions: WordPress 4.7.3; NextGen: 2.2.1
Comment the line number about 191 in file “wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/mvc/package.module.mvc.php”:

$retval = '/' . $retval;

Proper solution:

Theme author should properly set

current_theme_supports('soil-relative-urls') || current_theme_supports('root-relative-urls')



Touch sensor on AVR, done without Qtouch library


Finally I have done force AVR’s to read touch buttons. Atmel QTouch library was interesting, but it was too hard form me, and it’s so big. I have rode piece of teory, have found a few examples and done. First effect is this module. How does it work in practice:

How does it work in theory:
The plates touch sensors act as capacitors, loaded by a resistor. The microprocessor loads the RC circuit, measuring the time. Since R is a constant, the charging time is dependent on the capacity. Capacitance changes when attach a finger he becomes the dielectric. For the system to work, you must take care of several elements:
Capacity of such a “capacitor” is very small. To extend the charging time, used high-value resistors (I used the absence of other 10M, better would be about 2-5M ohms).
One needs one pin sensor for reading, and one for loading, except that the latter may simultaneously support multiple sensors.
Times are very small; Why does not use the delay; same rotation measurement loop is long enough.
Changes capacity are also small, so it is important to make this change after applying finger was as large as possible. Therefore, the plates have a surface in a grid, to reduce their own capacity. Contrary to intuition, the larger the field of sensors, this is not necessarily better.
In such systems, it is important to use as the shortest path to reduce harmful capacity.
It is also around the pouring weight, which will shield the interference and provide a second electrode of the capacitor.
As is apparent from the above description, the measurement does not rely on the detection capacity of the human body relative to the ground, or anything like that. Human finger is dielectric of the capacitor in the electric field formed by the field of the sensor field and the nearby ground.


Tiny13_touch schematic




Mini sensor online board

Zipped Arduino sketch: Download sketch

Required library (with changes): EtherCard


  • Ethernet module to ICSP on Arduino (MOSI – SI, MISO – SO, SCK – SCK, GND-GND), pin CS to pin 8, VCC to 3,3V
  • DHT11 output to pin 12
  • MQ7 analog output to pin A0
  • Photoresistor between VCC and pin A1, whichis pulled down to ground by 1KΩ resistor
  • Ethernet module connnected to router

Comparision Atmega8 Atmega8A Atmega88 Atmega88PA

Do not buy dinosaurs. Data that is hard to find in this form.

Atmega8 Atmega8A Atmega88 Atmega88PA
4,5-5,5V 2,7-5,5V 2,7-5,5V 1,8-5,5V
0-16MHz 0-16MHz 0-10MHz; 0-20MHz@4,5-5,5V 0-20MHz
5 sleep modes 5 sleep modes 5 sleep modes 6 sleep modes
Temperature sensor
Active: 3,6mA Active: 3,6mA Active: 250uA@1MHz Active: 0,2mA(200uA)
Idle: 1,0mA Idle: 1,0mA
PowerDown: 0,5uA PowerDown: 0,5uA PowerDown: 0,1uA PowerDown: 0,1uA
Qtouch support Qtouch support
UART in SPI mode UART in SPI mode
Vref 2,56V 2,56V 1,1V 1,1V
3,44zł TQFP32 3,98zł TQFP32 6,52zł TQFP32 6,00zł TQFP32

Please help me in expanding the table.