DASH Cams Needed

TLDR = Dash Cams if promoted in our country would result in a drastic change in the habits of people on a macro level.

DASH CAM = A camera installed inside a car in the front portion (usually behind the rear-view mirror) which makes video of what happens in front of the car.

DASH CAM - from AliExpress
DASH CAM – from AliExpress

Not so expensive when compared compared to the price of a car or by the list of features they come with or by the possible benefit they can provide.

Some features of a basic 15-25 USD Dash Cam from AliExpress

  • upto 1080p HD video recording
  • SD Card upto 32GB
  • Loop recording, if card is full, oldest video gets over-written
  • Motion detector (only record video when something moves)
  • G-Sensor (basic Accelerometer which starts recording if someone moves the car, something hits the car)
  • Night Vision (IR LEDs)
  • 2.7 inch Display
  • Audio Recording (inside and around car)
  • Analog Video out / HDMI out / USB Connectivity
  • Built-in battery and charging (works even when car is not running)

Link to a simple AliExpress Search: http://goo.gl/kB4lWi


So,keeping in view the rampant corruption of police on the roads, the constant disobeying of the Law by every other person, accidents, terror incidents (Mobile/Car/Bike Snatching, Target Killing, Bombs and such) natural calamities and more – if 1 in every 5 or 10 cars would install a DASH CAM – there would be so many more eyes on the roads all the time and everywhere – talking about the whole of the country, not just Pakistan.


Insurance companies could make it mandatory or give discount to car owners having a CAM.
Companies having fleets of cars will have video RECORD of where their vehicles have been – might help them in some cases
—- you can most possibly think of more ways this might happen)
– a Startup brings in a lot of DASH CAMs and starts selling or just works on creating awareness and maybe makes a mobile app or a portal or a software which allows easy video selection/cutting/editing/uploading.


People buy and install DASH Cams in their cars, and keep going with their lives, but everyone experiences something which shakes them and at that moment, maybe video proof of the event might help someone or just knowing that the roads are being recorded – there might be less corruption, people might follow Traffic Laws more, Terror incidents may decrease.

Not everyone will buy one, not everyone will bother to download video of some event from the CAM and upload it online (we still have youtube blocked), not everyone will see it as a good idea, but sharing such videos on Social Media will allow people to point fingers, ask questions, demand justice and this just might start to change the overall picture.

Now, I dont know much about the Pakistani market, hell I dont even own a car, but I have not seen one person using a DASH Cam so far, and anyone and everyone I have asked recently (except for the group post) – majority does not know what it is. This is also possibly not the first post about DASH Cams needed in Pakistan, but think about it…


Some DASH CAM related Links

P.S. I dont know why i wrote this, there is so many other things to do, work and stuff, but this has been bothering me for a few months now… needed to let it out.

Arduino an Explanation – AVR @ Heart

I have been asked again and again by my friends and students to use Arduino or not and some people who are using AVR asked me if Arduino is better and some who were using Arduino asked the same about AVR. Well, here it goes, [this is all that I know, haven’t researched or confirm any of this while writing it – this became a bit longer than I had initially thought].

To understand what is Arduino, lets see how AVR works. To use AVR, usually the following is done in order.

  • Install ATMEL Studio on your PC if you dont have it.
  • Make a new project, select the AVR you like.
  • Write the CODE in the source file, standard C/C++ code works. If you want to use something special like LCDs or UART or something, proper Libraries make work easier otherwise that too can be one by using C code and referring to the datasheet.
  • Build/Compile/Make whatever, get the HEX file (look in the DEBUG folder).
  • Upload/Burn/Flash that Hex File to the AVR using a Programmer (a separate Hardware device – USBasp is the BEST).
  • Once the AVR is programmed with the HEX file, it needs to be on a circuit with power supply, reset circuitry, oscillator and any other component etc required by your project. Usually it is a Development Board, or an AVR on a breadboard or maybe a project PCB which has everything on it including a programming port (ICSP/ISP Connector).
  • It should WORK!

Hoping that you did everything above correctly from writing proper code to having the right controller IC to a working programmer and a working/tested circuit with your AVR IC in it and you should see your code working.

Usually mistakes happen in making that AVR circuit or the programmer doesn’t work or the connections from the programmer to the AVR are loose/broken, resulting in frustration and waste of time, usually new comers at this point think of leaving the AVR world and moving on.

This is where ARDUINO comes, Arduino is basically a prefabricated PCB aka circuit board with

  • an AVR Micro-controller (ATMega8/328/2560 etc) on it +
  • Power Supply circuitry +
  • Programmer Support (allows programming) +
  • Pins provided in easy to use connectors and numbered from 0 to 13 and A0 to A5 (talking about Uno here)
  • an easy to use Software ARDUINO IDE
  • easy to use code/language – basically it is just C/C++ functions, more about Arduino language here
  • One button/click program UPLOAD/test

So an Arduino looks very easy for any beginner to use, but KNOW that it has the same AVR micro-controller and the IDE supports C/C++ completely and you can still use any and all AVR registers directly, but that might break some of the Arduino functions.

So anyone using AVRs, I would suggest STICK with it and learn it properly unless you are stuck in a situation where you dont have the time to learn AVR now, then move to Arduino, do your task and then come back to AVR and learn it. [here I mean the ATMega series in general]

Those using Arduinos, it is OKAY to use it at any and all levels including and beyond B.E. anyone who says this is kid stuff does not know that it is the same AVR as any other – it is upto the programmer to write powerful code for it.

As For myself, I use Arduinos to prototype faster, this includes using Arduino hardware and shields and the Arduino IDE/code – however after basic prototyping I move my projects to custom made AVR boards, sometimes with the same arduino code and sometimes I optimize the code properly and either rewrite it completely in Atmel Studio using the standard C/C++ and my own custom libraries or mix my code with the Arduino code.

[LINUXLOG 003]: Going Great – Mint+XP+Win7

With classes started, me teaching with DevC++ and Visual Studio had to install Windows – but did it so in Virtual Machine and apparently I had to install both XP and Win7 just to show the students the same environment as they are using.

Also, finally started to use git from Linux terminal, it is even great than the windows app, though it was easier, but this just feels more better.. typing in everything.

LinuxLog git repo at: https://github.com/zaidpirwani/LinuxLog

For now, maybe the next Linux log entry will come late, unless I do some big changes to my system – atm, am quite happy with my RasBhariPi and my Mint and I hope to keep on it.

NOTE: saw a book, found out it was free, downloaded, maybe I will read through it too.

The Linux Command Line
Second Internet Edition
William E. Shotts, Jr.

[LINUXLOG 002]: The First Crash

I thought only windows would crash so easily, but today when I started my laptop, it never gave me the desktop… some errors about can’t load cinnamon this and that and virtualbox kernel service. but unlike windows which when crash don’t give any avenue for repair, I was able to login from the other terminals.


I used the text-based browser, Lynx to check what the problem was, did some purging of all virtualbox related stuff and reinstalled cinnamon and then voila, I was able to login again.  But I will need to run Windows and Visual Studio and some other software as from tomorrow classes are starting and I need the Microsoft goodness too, even when I don’t want it.

I am logging in all the major steps and as soon as I learn how to GIT from the command line, it will be all up in a repo on, soon.

[LINUXLOG 001]: Initial Hurdles of Linux

So far so good, LMD (Linux Mint Debian) is turning out to be clean and simple, or maybe it is cause am not doing much work as I was on Windows8, but waiting for the regular classes to start, then will need the Windows software I have been using.

Got a MATLAB related task to do, skipping it cause of no MATLAB, but will install octave and use it instead for future work, or MATLAB if I ever get around to install Windows as dual boot or virtual.

I had to use Arduino, AVRDUDE but both gave permission errors, so for the time being, used sudo but should fix it for proper use. As I had to copy some Arduino library files, I needed to find out where Arduino was installed and still I am not clear on how Linux stores files, so used commands locate and whereis, both are search related commands, whereis is I think specifically for searching where a command binary actually is and locate is for commands/folders and files everything (I think). Also, at first I just tried locate Arduino and it gave such a long list that the terminal window didn’t show it all, so used | less to paginate the output (not sure what less is actually, man defines it as opposite of more .. :) very helpful).

  • whereis some_file_name
  • locate avrdude
  • add | less at end of whereis command if result is too long, whereis some_file_name | less


Also need to install F.Lux on Linux (I just can’t look at the white screen now after so many years of using F.Lux on windows, can’t install. Installed RedShift (similar) – have to configure.

Update: Arduino is working now, maybe just needed restarting… though GUI glitches still there (selected items in sub-menus have invisible text) – AVRDUDE to test later.

%d bloggers like this: