Sometime ago, I developed the code for interactions with the humidity sensor DHT11. Also, I had used the same code in one of my projects and I was not particularly happy with reliability of this sensor. That’s why I decided to try DHT22 in case if I would use it in some future project.
Arch linux: turning off the power management of the wifi card
There is a command iwconfig
Why to turn it off? Since with this mode on, my laptop (thinkpad t450s) was limiting the speed of upload/download (really bad for ssh connections)
to disable it: sudo iwconfig wlp3s0 power off
If not needed it is better to return it back to on.
Using bitbucket with git CLI
To connect existing bitbucket repository the easiest solution is to use SSH as appeared.
Firstly, generate on your linux machine the ssh keys (public and private), use for this keygen-ssh command.
There is a nice explanation of this on the atlassian website, but it was not clear enough for me what I should do next.
As appeared it is pretty simple – from the main webpage go to the personal settings menu and add your public key from there.
Now just either clone it using ssh, either change the type from https to ssh and it all works, no need to enter password.
Auto enabling/disabling of the amplifier
A situation in place was the next – my half done amplifier was working already 3 years just proving the statement “there last longing device is a temporary one”. It was kind of fine – but it consumes an energy. In a fact a solid chunk of the energy – it is class A amplifier. At some point in time I started to think – why to not switch on/off the amplifier in dependence on the signal presence.
Pic Lab, PIC18, Experiment #1, UART in PIC18
This was a time to switch to XC8 compiler, it was not hard at all, but appeared that using of UART in PIC18 series has some peculiarities.
At the moment of this article the XC8 compiler had libraries for work with a periphery in the folder /includes/plib. Now they got rid of it and experimenting with a different approach. Anyway the legacy support looks like quite a strong side for microchip. Well I used then usart.h library which now I regret I did.
Out tasks are:
- To write a single symbol
- To write a string
- To read 1 symbol = 1 byte
- To read a couple of bytes
I will be working with PIC18F14K50.
Continue readingPRI: first experience
At the moment of time I had a raspberry Pi arrived from China and really wanted to put my hands on it.
Initially I installed the Raspbian linux on it, but ironically enough I struggled with Chinese memory card a lot and all resolved when I finally bought the well-known in the store.
So what I wanted to do: my adsl modem which I had got for free had some freezes which fixed after the reboot. With time it evolved to each day couple reboots routine.
Solution in mind: to ping some known website one time per n minutes, and, if it is not – make a reboot.
That fact that my PRi stands next to the modem was also in favor of the solution.
Continue readingVerilog-A: A comparator
Creating of a comparator model is described below.
What we need from a comparator usually?
- The high level value
- Slew Rate
- Hysteresis
First order passive circuits (RC and LC)
First order networks are passive networks which includes a single element capable to store the energy (C or L). Let me try to derive the equations which will help us to understand the I/V characteristics with time.
A differential amplifier basics
Humidity control for the bathroom
The situation: there are two bathrooms, which have fans controlled manually.
The goal:
- To switch on a bathroom fan when the certain humidity level is reached;
- To switch on both fans is somebody is using the toilet;
Let’s go.
Continue reading