Example of enumeration c in microcontroller programming

Enumeration allows defining a user data types in C language. For this purpose, a #define pre-processor is used, which allows for describing a set of constants. They allow reading and understanding program code much easier as you may define human readable types. For instance, using pre-processor we can define a simple numbers to be as follows: Define is a powerful tool for doing many different definitions in pre-processing stage of source code, but in C language, there is an alternative way of defining a user data types –  enumerating using keyword enum: By default, enumeration assigns values from zero and up. You can use enumeration of new types as in following example: Also, you can use an enum  to assign special characters to meaningful words like this: enum escapes { BELL = ‘\a’, BACKSPACE = ‘\b’, HTAB = ‘\t’,RETURN = ‘\r’, NEWLINE = ‘\n’, VTAB = ‘\v’ };or enum boolean { FALSE = 0, TRUE }; An advantage of enum over #define is that it has scope, which means that the variable (just like any other) is only visible within the block it was declared. Example:

Continue reading

Handy portable electric drill for hobby projects

Lots of hobby projects involve drilling, screwing, and repairing. In many cases, a power drill is a secondhand and rescue. If you are not a professional, then investing in expensive tools may not be a priority. But with the low price, you would want to cover the most basic functionality and reliability. Take a look at the LOM YUM Electric drill, which has all the necessary features in small size and ergonomic shape. The drill is really compact, having rechargeable 16.8V (4x1300mAh Li-Ion) battery pack in its handle. In the feature list, you will find all you need. Durability and reliability are ensured by metal gear and overload protection. It is IPX7 waterproof, so you can use it in harsh conditions. LED light pointed to the drilling area ensures that you always hit the right spot, even in dim environments. The speed control is stepless and can provide up to 18NM of torque.

Continue reading

The Five Main Causes of Data Loss

Data loss is a crisis for most businesses, as all of their essential records, invoices and pieces of customer information become inaccessible. The result? Often substantial financial losses and, in the case of many businesses, a complete business failure. But what exactly causes this data to be lost forever? And, perhaps more importantly, how can these causes be prevented? Below you’ll find the five most common reasons, as well as some helpful tips on stopping them from happening in the first place… It is essential to mention this first, though: however hard you prepare and however many procedures you put in place, it is not always possible to prevent data loss from occurring. This is why all companies should have a contingency plan, which includes some provision for disaster recovery. Losing data will never be a pleasant experience, but with a plan in place, the impact can at least be minimized.

Continue reading

Your Life on a Hard Drive

Imagine what would happen if your hard drive failed. It’s a possibility that most people don’t ever think can happen to them. For the average non-computer geek, their electronic device is infallible. While technological advancements would lead you to believe this, it’s simply not true. The good news is that many companies specialize in data recovery services for most any make of computer on the market. There are things you can do to protect your work and personal items stored on your computer. First, you should always back up your computer and keep the copy disk safe. Unless you’re a business, you probably rarely ever back it up, if at all. This is a huge mistake. Since people practically live on computers, the probability of priceless videos and photos found is given. More than likely, you also keep your bills and other private documents too. In the event of a computer crash, you might lose everything. 

Continue reading

5 Things You Didn’t Know About a Mobile Signal Booster

When you can’t talk on the phone without being interrupted inside your house, when you have to run outside the office to get a Skype message, it’s still not a dead end. People use mobile signal boosters to combat this kind of signal trouble. However, all they know about this equipment is that in most cases, it can increase bars but not more. As a result, the notion of a signal booster gets overgrown with prejudices. We decided to make top 5 things you have hardly ever heard about a mobile signal booster so that you can check what you really know about this kind of equipment.  As an example, we use Hiboost mobile signal repeater produced by Huaptec. GSM Boosters won’t work if there’s no signal outside. We bet you were always sure that a mobile signal booster would improve a signal anyway, and how well it would do it depends on the booster’s quality. You’re partly right, but that is not the whole story. If you can’t pick up the signal outside your house at all, it’s a strong possibility that you won’t be able to improve cellular signal. It’s connected with the booster working principle. In fact,…

Continue reading

Replace your TV with UhAPPy U20 LCD Projector

We usually try to expand your existing TV functionality with bright TV boxes that are fun, of course, but on the other hand, you are still limited to the TV size and location where you will have fun. Sometimes you may want to watch movies in a different room or even take out to some unusual place. In this case, you may want to consider a projector, which gives mobility, large screen, and tons of features. We are talking about intelligent projector, which doesn’t need any host device to send video stream. The projector itself runs Android, which is able to produce content on your wall by itself.

Continue reading

Beelink MiniMX III TV Box with quad core 64-bit Amlogic S905

There are many TV boxes to choose and it may seem that the more expensive are better. This is not always a truth. Sometimes cheaper ones can give all you may need. This time lets take a look at Beelink MiniMX III TV Box, which uses the latest Android 5.1 operating system running on 64-bit quad-core Amlogic S905 processor. Beelink MiniMX III TV Box is capable of running any Android app on your TV flawlessly since it features a powerful processor, 2GB DDR3 of RAM. It already comes with 16GB of eMMC ROM, which can be extended with 32GB flash storage. It is rich in connectivity options like Bluetooth 4.0, 1GB Ethernet, WiFi, HDMI 2.0 supporting 4K video output, 2xUSB 2.0, and IR for remote.

Continue reading

Linear regression with multiple features

linear regression cost function

Single feature linear regression is simple. All you need is to find a function that fits training data best. It is also easy to plot data and learning curves. But in reality, regression analysis is based on multiple features. So in most cases, we cannot imagine the multidimensional space where data could be plotted. We need to rely on the methods we use. You must feel comfortable with linear algebra, where matrices and vectors are used. If previously we had one feature (temperature), now we need to introduce more of them. So we need to expand hypothesis to accept more features. From now and later on, instead of output y, we are going to use h(x) notation: As you can see, with more variables (features), we also end up with more parameters θ that has to be learned. Before we move let’s find relevant data that we could use for building machine learning algorithm. The data set Again we are going to use data set college cengage. This time we select health data set with several variables. The data (X1, X2, X3, X4, X5) are by city. X1 = death rate per 1000 residents X2 = doctor availability per 100,000…

Continue reading

High performance Xiaomi Mi WiFi router 3

Xiaomi Mi WiFi router 3

There are very few houses that still use LAN connection for most network connections. It is impractical to use wires for several network devices like laptops, printers, TVs, tablets, and others. In smartphones and tablets, there aren’t other options than WiFi. The more devices you add to the network list, the better router you should aim for. Probably some of you had a situation when the most straightforward router couldn’t reliably handle several devices connected to the internet simultaneously. The only option was to upgrade to better, which naturally tends to be more expensive. The good news is that you don’t have to pay more to get a great router to handle the loads and deliver high speed to all your connected devices. Check out the newest Xiaomi Mi WiFi router 3, which comes with four high-gain antennas delivering better coverage with more robust signal and better sensitivity. The router supports the latest 802.11ac WiFi standard, which, by using 2.4GHz and 5GHz bands, can deliver up to 1167Mbps in total.

Continue reading