Other articles

  1. PIC 16F688 ADC to RS232.

    Introduction

    This little program reads the ADC value from AN7, and transmits the value to the TX pin.

    All the Uart - code is in the uart_header and uart_source files.

    The program

    // INCLUDE LIBRARIES
    #include <xc.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include "uart_header.h"
    
    // CONFIGURATION BITS
    #pragma config FOSC …
    read more
  2. PIC16F690 - 7 seg Voltmeter

    Introduction

    This is the circuit for this program.

    Schematic


    Big image

    Part list

    Reference Value Library Library Ref
    U2 PIC16F690-ISO MCU_Microchip_PIC16 PIC16F690-ISO
    U5 HDSP-7503 Display_Character HDSP-7503
    U4 HDSP-7503 Display_Character HDSP-7503
    U3 HDSP-7503 Display_Character HDSP-7503
    Q3 BC547 Transistor_BJT BC547
    Q2 BC547 Transistor_BJT BC547
    Q1 BC547 Transistor_BJT BC547
    R6 120R Device R …
    read more
  3. Python - How to make a voltmeter

    Python based 0 - 55v DVM

    Introduction

    You can not have enough Digital Voltage Multimeters, or some other device that measures voltage. Also, I needed an extra voltage measuring device on my boat. This little project teaches you how to make a PIC16F688 read voltage, convert it to an AD value …

    read more
  4. PIC 16F690 7 seg voltmeter

    Introduction

    This little program reads analog voltage on AN2, and converts it into an ADC value, and then claculates the volt. The volt is displayed on a 3 digit 7 seg.

    Check out this article for the schematic.

    #include <xc.h>
    
    // CONFIG
    #pragma config FOSC = XT        // Oscillator Selection bits (HS …
    read more
  5. PIC 16F690 7 seg display

    Introduction

    In this note I make a program that counts decimal number from 00.0 to 99.99. Eventually, this program will be the base program to both a voltmeter and a thermometer. That's actually the same thing. Calculating the voltage is a tiny bit different.

    The program

    #include <xc …
    read more
  6. MySQL things to remember

    Things I need to remember

    To get remote access to a database and table, log in to mysql with:

    mysql -u root -p
    

    Then, change the privileges:

    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'secret_password' WITH GRANT OPTION;
    FLUSH PRIVILEGES;
    exit;
    

    After that we need to edit the /etc …

    read more
  7. Python - How to make a QR code image with Python

    This script use Tkinter, Image and pyqrcode to make an image of the text entered in the text field.

    from Tkinter import *
    import Image
    import pyqrcode
    
    ''' Functions '''
    def makeQRCode():
        qr_data = txt_Input.get()
        url = pyqrcode.create(qr_data)
        url.png('url.png', scale = 8)
        img = Image.open('url.png')
        img.show()
    
        print …
    read more
  8. PIC 16F688 ADC average.

    Introduction

    This little program reads the ADC value of AN7 5 times, stores it in an array, and calculates the average. This perticular examples uses an LM34. This is converted to Celsius.

    All the Uart - code is in the uart_header and uart_source files.

    The output

    Output

    The program

    // INCLUDE LIBRARIES
    #include …
    read more
  9. PIC 16F688 1 sec interrupt demo.

    The 1-sec

    This is a small demo on how to use interrupt to flash a led at a 1 sec rate.

    PIC16F688 have one 8-bit timer. This means that the max value TMR0 can have is 256, then it rolls over to 0, creating an interrupt.

    To generate a one …

    read more
  10. PIC 16F688 LM34 to PC.

    Introduction

    This little program reads ADC from AN7, converts and converts it to Celsius. There's a LM34 connected to AN7. TX is connected to a USB-RS232 converter.

    All the Uart - code is in the uart_header and uart_source files.

    The output

    Output

    The program

    // INCLUDE LIBRARIES
    #include <xc.h>
    #include <stdio.h …
    read more
  11. PIC 16F628A GSM Demo.

    PIC and SIM900A

    This program demonstrates how to use the SIM900A to connect and disconnect to the cell network with GPRS. The uart code are in libraries.

    Main program

    // INCLUDES
    #include <stdio.h>
    #include <stdlib.h>
    #include <xc.h>
    #include <string.h>
    #include "uart_init_header.h"
    
    // CONFIG
    #pragma config FOSC = HS …
    read more
  12. PIC 16F628A UART demo.

    This is a demo of how to use libraries when programming PICs.

    Main program

    // INCLUDES
    #include <stdio.h>
    #include <stdlib.h>
    #include <xc.h>
    #include <stdbool.h>
    #include <string.h>
    #include "uart_init_header.h"
    
    // CONFIG
    #pragma config FOSC = HS        // Oscillator Selection bits (HS oscillator: High-speed crystal/resonator on RA6/OSC2/CLKOUT …
    read more
  13. PIC 16F688 ADC demo.

    PIC 16F688 ADC

    This is a little ADC demo, based on the PIC 16F688. I'm using 8-bit analog converter, that's 255, not the 1023 a 10-bit has.

    // INCLUDE LIBRARIES
    #include <xc.h>
    #include <stdio.h>
    #include <stdlib.h>
    
    // CONFIGURATION BITS
    #pragma config FOSC = HS        // Oscillator Selection bits (INTOSCIO oscillator: I …
    read more
  14. aircrack-ng

    This is for educational use only

    To stop any Wi Fi connections

    airmon-ng check kill

    To show your interface

    airmon-ng

    To start the wifi interface in monitor mode

    airmon-ng start wlan0

    To show the current clients on the network

    airodump-ng wlan0mon

    To show the beacons and the clients that are …

    read more
  15. How to make a clock in Python

    This little script shows the time in a window.

    '''Import libraries'''
    from Tkinter import *
    import time
    
    '''Define a function'''
    def tick():
        '''Assign current time to time_string'''
        time_string = time.strftime("%H:%M:%S")
    
        '''Update the clock labels text'''
        clock.config(text=time_string)
    
        '''After 200ms run tick'''
        clock.after(200, tick)
    
    '''Make …
    read more
  16. Python - How to load a file and convert it base64

    This python script creates a window with four buttons, two labels and a text widget. The code is fairly good commented and speaks for itself. The coded file will be written as a text file.

    import Tkinter, Tkconstants, tkFileDialog
    from Tkinter import *
    import tkMessageBox
    import base64
    import webbrowser
    
    def exit …
    read more
  17. Raspberry Pi,2 x 16 LCD and web scraping

    This program log on to a website, and get som information.

    The import block:

    1
    2
    3
    4
    5
    6
    #!/usr/bin/python
    import time
    from time import gmtime, strftime
    import socket
    import Adafruit_CharLCD as LCD
    import requests
    

    Assignment:

    time_counter = 0
    
    lcd_rs  = 25
    lcd_en  = 24
    lcd_d4  = 23
    lcd_d5  = 17
    lcd_d6 …
    read more
  18. How to list all images in a folder, sorted

    PHP script

    This PHP script lists all images in a folder, in descending order. The files are shown as images.

    <?php
    array_multisort(array_map('filemtime', ($files = glob("*.jpg"))), SORT_DESC, $files);
    foreach($files as $filename)
    {
        echo "<a href='http://nerdegutta.org/".substr($filename, 0, -4).".jpg'><img src='http://nerdegutta.org/".substr …
    read more
  19. PIC 16F628A 16 x 4 LCD

    In this article I'm using a PIC 16F628a to demonstrate one way of using a 4 line LCD.

    The hardware

    The following schematic is put on a breadboard: Schematic layout

    Click here for a bigger view.

    BOM - Bill of material

    This is what you need.

    Partlist
    
    Exported from PIC16F628A-16x4-lcd-demo.sch at 08 …
    read more
  20. PIC 16F628A Engine Timer

    Work in progress

    PIC 16F628A Engine Timer

    The idea behind this circuit is that I have no idea of how many hours my Volvo Penta is running during a season. With this circuit, I can monitor the hours, and change the motor oil according to the timer.

    The program write …

    read more

Page 1 / 1

blogroll

social