Skip to content

Margus Roo –

If you're inventing and pioneering, you have to be willing to be misunderstood for long periods of time

  • Cloudbreak Autoscale fix
  • Endast

Category: Elektroonika

Build gpio command for Raspberry PI

Posted on May 27, 2015 by margusja

git clone git://git.drogon.net/wiringPi
cd wiringPi
./build

Posted in Elektroonika

Just nice gpio raspberry pi2 output

Posted on May 20, 2015 by margusja

Screenshot 2015-05-20 12.25.01

Posted in Elektroonika

Voltage divider formula

Posted on May 20, 2015 by margusja

Screenshot 2015-05-20 11.27.02

Posted in Elektroonika

Display your home temperature in cool way

Posted on May 8, 2015 by margusja

One way is to read your home temperature sensor values from console but lets be honest it is boring 🙂

I am sure the way I resolved it is much more coolest way

2015-05-08 12.42.07

Posted in Elektroonika

I started to build my own digital clock using DS1302RTC

Posted on February 13, 2015 by margusja

I have long time considered how to build digital watch. Now I am ready for this. I did not wanted to do it without real time clock (DS1302). So ordered some from china and now I got them

I put together first prototype and it works nice

 

So RTC gives me time

2015-02-12 22.53.55

 

DS1302RTC is connected to Arduino. Later I will design my own board and going to use Atmega328PU. Battary keeps time even external power is down.

 

2015-02-12 22.54.112015-02-12 23.00.02

 

At the moment this is my fancy user interface. Later I will use LCD or OLED

 

2015-02-12 22.54.18

 

Posted in Elektroonika

Now I can measure battery level

Posted on February 12, 2015 by margusja

This is handy option. Now I can calculate exactly how long my outdoor sensors last

First sensor can send his battery level data

Screenshot 2015-02-12 22.55.42

Posted in Elektroonika

Arduino-Uno and TFT 2.4”

Posted on February 4, 2015 - February 4, 2015 by margusja

Bought new toy  2.4 Inch TFT LCD Shield Touch Board Display Module For Arduino UNO

It took about an hour to find right libs

Using ILI9325 driver

https://github.com/samuraijap/TFTLCD-Library

https://github.com/adafruit/Adafruit-GFX-Library

and to get first picture but here it is

2015-02-04 22.38.08

Posted in Elektroonika

Driving 220V 10A relay with Atmega328p

Posted on September 13, 2014 by margusja

Posted in Elektroonika

Wireless temperature measure system

Posted on August 8, 2014 - August 8, 2014 by margusja

The main components are atmega328p micro cpu, RFM12b radio modules and DS18S20 for temperature measurement.

Temperature sender unit

2014-08-08 13.48.01

Sender code – github

Senders can power up using USB power converters or pattery pack.
Display unit gets power from any USB.

 

Display unit owns LCD plug (MCP23008) between atmega328p and LDC.

2014-08-08 13.47.00 2014-08-08 13.46.51

2014-08-08 13.47.29

Now I thought it might by cool to collect all sensors data.

So I build network module who collects the same data that display module gets but sends it to my zabbix server.

Network module is built using ENC28J60

2014-08-08 14.07.28 2014-08-08 14.07.17

So now I can see cool graphs

Screen Shot 2014-08-08 at 14.11.39

Posted in Elektroonika

Apache-kafka and Atmel 328p + enc28j60

Posted on May 14, 2014 by margusja

I put together a simple hardware

atmega328p – executes programm

enc28j60 – ethernet

programmed it using C code:

…

// Demo using DHCP and DNS to perform a web client request.
// 2011-06-08 <jc@wippler.nl> http://opensource.org/licenses/mit-license.php

#include <EtherCard.h>

// ethernet interface mac address, must be unique on the LAN
static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };

byte Ethernet::buffer[700];
static uint32_t timer;
Stash stash;

char website[] PROGMEM = “vm37.dbweb.ee”;
#define PATH “”
#define VARIABLE “test”

// called when the client request is complete
static void my_callback (byte status, word off, word len) {
Serial.println(“>>>”);
Ethernet::buffer[off+300] = 0;
Serial.print((const char*) Ethernet::buffer + off);
Serial.println(“…”);
}

void setup () {
Serial.begin(57600);
Serial.println(“\n[webClient]”);

if (ether.begin(sizeof Ethernet::buffer, mymac) == 0)
Serial.println( “Failed to access Ethernet controller”);
if (!ether.dhcpSetup())
Serial.println(“DHCP failed”);
ether.hisport = 8080;
ether.printIp(“IP: “, ether.myip);
ether.printIp(“GW: “, ether.gwip);
ether.printIp(“DNS: “, ether.dnsip);

if (!ether.dnsLookup(website))
Serial.println(“DNS failed”);

ether.printIp(“SRV: “, ether.hisip);
}

void loop () {
ether.packetLoop(ether.packetReceive());

if (millis() > timer) {
timer = millis() + 10000;

byte sd = stash.create();
stash.print(“{\”messages\”: [{\”value\”:{\”key\”:\”Margusja\”}}]}”);
stash.print(VARIABLE);
stash.print(“&action=Submit”);
stash.save();

// generate the header with payload – note that the stash size is used,
// and that a “stash descriptor” is passed in as argument using “$H”
Stash::prepare(PSTR(“POST /topics/kafkademo1 HTTP/1.1” “\r\n”
“Host: vm37.dbweb.ee:8080” “\r\n”
//”User-Agent: margusja” “\r\n”
“Accept: */*” “\r\n”
“Content-Type: application/json” “\r\n”
“Content-Length: $D” “\r\n”
“\r\n”
“$H”),
website, PSTR(PATH), website, stash.size(), sd);

// send the packet – this also releases all stash buffers once done
ether.tcpSend();
}
}

…

Uploaded code to MC and powered it up.

2014-05-14 21.46.00

 

 

And after it got data from DHCP I saw nice picture – it sends data into my kafka queue

Screen Shot 2014-05-14 at 21.45.11

Posted in Apache, Elektroonika

Posts navigation

Older posts
Newer posts

The Master

Categories

  • Apache
  • Apple
  • Assembler
  • Audi
  • BigData
  • BMW
  • C
  • Elektroonika
  • Fun
  • Hadoop
  • help
  • Infotehnoloogia koolis
  • IOT
  • IT
  • IT eetilised
  • Java
  • Langevarjundus
  • Lapsed
  • lastekodu
  • Linux
  • M-401
  • Mac
  • Machine Learning
  • Matemaatika
  • Math
  • MSP430
  • Muusika
  • neo4j
  • openCL
  • Ă•petaja identiteet ja tegevusvõimekus
  • oracle
  • PHP
  • PostgreSql
  • ProM
  • R
  • Turvalisus
  • Varia
  • Windows
Proudly powered by WordPress | Theme: micro, developed by DevriX.