Skip to main content

Posts

Featured post

Can D13 pin of Arduino Uno and nano be use as input pin?

D13 pin can be use as  digital output pin. D13 pin can be use as i nput pin  together with  external pull-up  and  pull-down resistor . It is not recommand to use the  D13 internal pull-up  resistor because instead of the regular 5V, the voltage will be hanging around 1.7V. Most of Arduino newbies have their first code to blink the LED with D13 pin as an output pin. This really give us big confident to know the code can be successfully executed on the microcontroller. However, due to the build-in D13 pin on different Arduino board has slightly different circuit design,  is there any limitation to use the D13 GPIO pin as input pin ? Let’s find out more! Experiment condition I investigate both the value of D13 digital input and LED light status with the following code with  Arduino Uno Rev3 . and  Arduino nano 3.0.  void setup() { pinMode(13, INPUT); Serial.begin(9600); } void loop() ...
Recent posts

Talking about ATMega328 packages

Package of ATMega328P chip ATmega328/ATmega328P chip become popular together with Arduino. This chip comes with different packages. Today we are going to intrude a little bit more on the package of the chip. As the one being founding on Arduino Uno, the first one most people may encounter is the  DIP package . Also , if you play around with Arduino nano and Arduino pro mini, you might see the  QFT package  being mounted on the board . Besides the DIP and QFP package, there are actually also  QFN/MLF package . Difference between DIP/QFP/QFN chip Depend on the purpose and the target circuit board size, we can choose different package for our future project. But what are the difference between these packages? The major difference between package is the size and pin arrangement. Dual in-line package(DIP, DIL) As the one being found on the Arduino Uno board, the DIP package shaped like a    “cockroach”  with two parallel rows(legs) of electrical connecting ...

How to digitize old documents

Why digitize document I am the a person enjoying joining lots of workshop, conference and seminar. After years, I started to realized my place has stacked with lots of  hangouts and documents. I always think it may be useful if I can access these documents some day in the future. I think I will find some free time to read it again. But, to be honest,  I NEVER did. Recently, I try to find some solutions to digitize these documents in order to gradually get rid of them and reorganize them by the way of making them PDF files. When I need them   “some day”,  I can just put the scanned documents in my iPad and read them again. Now, I am really happy that my place is getting cleaner again! If you are also struggling with the same situation or look for a way to digitize documents, my experience may help you in certain way. Anyway, I will first discuss the simplest and most affordable way I found, and some alternative method in the future. Step by step scan your documents Th...

Setting up CUDA 10.0 for mxnet on Google Colaboratory

Preface Recently, I was trying to train model on Google Colaboratory with mxnet. However, I found the CUDA version pre-installed on the Colab. is 10.2. Till now, mxnet only support to CUDA 10.1 Therefore, I started to think about if it is possible to setup the environment that mxnet has support. Till now CUDA 10.1 doesn’t work for me. But I do successfully installed CUDA 10.0. Also tried to trained a LeNet on Colaboratory. Since I am a mac user, NVIDIA GPU is always what we are jealous and envy. Until I found Google Colaboratory…. I’d like to share my journey with you, if you also encounter some problem on setting up environment. Google Colaboratory provide free access to the NVIDIA Tesla K80 GPU (24GB RAM, 4992 CUDA core) . It is a great gift for most of people who is eager to learn deep learning but doesn’t have good hardware systems to train deeper models. NVIDIA Tesla K80 GPU I assume that you already have background knowledge of Python and familiar with tools like jup...

[LAMP] How to install Apache on windows system

Apache is a popular platform to establish website on your local machine. In this tutorial, we are going to demonstrate how to setup Apache 2.4 on Windows 7 system. First, Go to the Apache Lounge website Download both: 1. the latest C++ Redistributable Visual Studio 2017 and 2. Apache *.zip files for your operation system (For me is Win64 version) Unzip the file after downloaded and put the Apache24 folder to the location of C:\ Run the CMD.ext as Administrator and change the direction to the folder of C:\Apache24\bin Type in httpd.exe -k install Go to the folder of C**:\Apache24\bin** and double click on ApacheMonitor.exe You can see the Apache 2.4 server with green light if the server has been started properly. Type in localhost in your browser address. If the Apache works properly. You can see a web page displayed in your browser. This is the first step to start up your own website with Apache! Uninstall Type in these code with the administration mode of CMD.exe under t...

[pi] Headless pi connection with VNC on Mac system

Sometimes we have to access our pi with limited resources like lacking of monitor or keyboard. The Headless mode is useful to connect to your pi with another computer or your laptop without additional screen! Now let’s get started to give it a try! Setting Raspberry pi board Connection to pi connect to raspberry pi board with ssh pi@rapberrypi.local and input your password(Default password has been setted to raspberry ) Configue the VNC Input sudo raspi-config Navigate to Advance Option Select [P3 VNC] and click [OK] After setting up of the VNC, reboot the pi sudo reboot On Mac Downlaod VNC viewer from: https://www.realvnc.com/en/download/viewer/ After installed the VNC viewer, Input the IP address of raspberry pi and click Continue . Now we have successfully connect to our pi with VNC! Improve the resolution We have justed connected to the pi with VNC. However, the screen is quite small and the resolution wasn’t really good. How can ...

Make an real-time IoT temperature sensor with thingSpeak and ESP8266

#include <ESP8266WiFi.h> #include <DHT.h> //////////////////////////////////////////////////////////////////////////////////////////////////////////// #define DHTPIN 2 // what pin we’re connected to String apiKey = "yourAPIKey"; //API key from ThingSpeak channel const char* ssid = "WifiSSID"; //SSID of your wifi const char* password = "password123"; //password of your wifi int duration=5;//delay between each data measure and uploading //////////////////////////////////////////////////////////////////////////////////////////////////////////// const char* server = "api.thingspeak.com"; DHT dht(DHTPIN, DHT11, 15);// Start DHT sensor WiFiClient client; //Start clinet void setup() {   Serial.begin(115200);   dht.begin();   WiFi.begin(ssid, password);   Serial.println();   Serial.println();   Serial.print("Connecting to ");   Serial.println(ssid);   WiFi.begin(ssid, password);   while (WiFi.status() !...

Connect Arduino Wemos D1 ESP8266 to Internet/Wi-Fi Router

Connect ESP8266 to Wi-Fi Router Upload these code to your Arduino WeMos D1 ESP8266 W-Fi board. #include <ESP8266WiFi.h> //SSID of your network char ssid[] = " myRouter"; //SSID of your Wi-Fi router char pass[] = " myPassWord"; //Password of your Wi-Fi router void setup() {   Serial.begin(115200);   delay(10);   // Connect to Wi-Fi network   Serial.println();   Serial.println();   Serial.print("Connecting to...");   Serial.println(ssid);   WiFi.begin(ssid, pass);   while ( WiFi.status() != WL_CONNECTED) {     delay(500);     Serial.print(".");   }   Serial.println("");   Serial.println("Wi-Fi connected successfully"); } void loop ( ) {} Using ESP8266 to connect to Wi-Fi need to use the function of: WiFi.begin(ssid, pass); // connect to target Wi-Fi SSID is the name of the Wi-Fi you want to connect to.  while ( ...