cmd replacement: cmder
Sometimes you have to call some batch-files with spoecific windows-tools, so a bash is not helpful on Win.
A colleague recommended cmdr, which is quite nice and fine.
Suits my needs 🙂
ESP32: integrated the YL-69 for moisture-metering, also fried my first BME280
Acquired a Bosch BME280 for improved humidity, air pressure and temperature-measurement (DHT22 can’t read barometric pressure) and tried to attach it via I2C.
Let’s keep it short: the sensor got very hot after several tries to find the correct wiring. Even using the i2c-scanner testprogram did not yield any results. But I learned how to use the breadboard more effectively. The burnt IC will be sold as ‘Lehrgeld’ 😉 (Oh, the days when I fried my AMD Duron, because I thought that a CPU won’t heat up so fast at boot. Boy was I wrong.)
Integrated then at least via analog reading the YL-69 moisture sensor. Worked well and on first try. Guess I just need to read much, much .. more about I2C, wiring and the sensors.
Another lesson learned: if you want to see really badly structured, basic coding: check tutorials for microcontrollers :/ (especially mine ;))
———
Code is committed and pushed to github.
Output is something like:
1 2 3 |
Humidity (DHT22): 72.90 % Temperature (DHT22): 24.10 °C Temperature (internal): 31.11 °C Moisture (YL-69): 27% |
SmartGit can process warnings from commit-hooks!
Another thing I was not aware of: SmartGit can present warnings reported from (pre-)commit-hooks in an alerting way.
Just add echo “warning:” as prefix to your message and it will result in a warning signpost and a modal dialog after commit.
I’ve filed a change-request to make this parsing of the messages case-insensitive.
Move some feature-implementation with Git-help from one branch to another without previous “merges”
We ran at work into the quite tricky problem to move the “pure” implementation of a feature to some other branch (a quickfix-release) without adding those features/bugfixes from the current master-branch. The feature branch was created some while ago and meanwhile updated from time to time with origin/master.
Discussed options were:
* manually copy the changes (since it was one directory and some minor adjustments in other CMakeLists.txts and some calls) –> much work, very error prone in terms of “Oh, I missed something”
* move to HEAD@target-branch and cherry-pick one-by-one all feature-commits (without merge-commits) –> lots of work, because 15+ commits
* some Git-way –> preferred by me, but I neve did something similar before – so: totally unknown
I chose the third option and tinkered in parallel while someone else tried the other path.
0. created “fake-feature-branch” on HEAD of the feature-branch
1. merged current state master-branch to it
2. created a diff as patch-file between HEAD@master and HEAD@”fake-feature-branch” by:
git diff fromHash toHash --binary > ../binary.patch
(–binary is important; else added ressources will be missing)
4. switch to HEAD@targetBranch
5. apply the patch (and suppress whitespace-errors) by:
git apply --whitespace=fix ../binary.patch
6. eventually fix conflicts if necessary
Yay, two commands to save the day! Around 170 files were affected, so manually doing the application of the changes was out of scope for me. There had to be a feasible Git-solution.
ESP32 and DHT22: temperature and humdity
To give my (non-existant) skills for microcontrollers and reading out sensor-values a kick-start, I decided to connect today an DHT11 to the ESP32.
So, at first I realized I have no clue how a breadboard works, then that I need a calculator to determine the resistors properly, then “how to determine the correct pin-numbering”, then … it did not work, no matter what I tried. The C++-code was the least issue. Several sources provide examples, also with webserver (looks like everyone ~stole~ got inspired from each other ..), but the read-out always failed.
Luckily I had two (a bit more ‘expensive) DHT22 at hand and it worked like a charm!
Lessons learned: 0. accept that you know nothing 1. reading and experimenting is fun 2. seeing finally a presentable result is great <3
Result:
* code
* output:
1 2 |
Humidity: 71.20 % Temperature: 24.40 °C Temperature (internal): 31.67 C |