This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Date; | |
import java.util.Timer; | |
import java.util.TimerTask; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Timer Zamanlayici = new Timer(); | |
Zamanlayici.schedule( new TimerTask() { | |
public void run() { | |
Date Tarih = new Date(); | |
int Saat = Tarih.getHours(); | |
int Dakika = Tarih.getMinutes(); | |
int Saniye = Tarih.getSeconds(); | |
ZamanDegeri.setText(""+Saat+":"+Dakika+":"+Saniye); | |
} | |
}, 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Form açıldığında seri bağlantıyı kuracaktır | |
private void formWindowOpened(java.awt.event.WindowEvent evt) { | |
try { | |
seri.openPort(); // Portu Aç | |
} catch (SerialPortException ex) { | |
Logger.getLogger(AnaEkran.class.getName()).log(Level.SEVERE, null, ex); | |
} | |
try { | |
seri.setParams(9600, 8, 1,0); // 9600 Baud, 8 bit veri, 1 bit stop biti, Parity biti (*********) | |
} catch (SerialPortException ex) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int led = 13; //Led pin tanımlanıyor. En kullanılabilir led piniymiş GND ye yakın olmasından galiba :D | |
int gelen; | |
void setup() { | |
pinMode(led, OUTPUT); | |
Serial.begin(9600); // 9600 Baud ile haberleşmeye başla | |
} | |
void loop() { | |
if(Serial.available()>0){ // Haberleşme kullanılabilir durumda ise | |
gelen=Serial.read(); // Java kodundan geleni oku | |
if(gelen==1) digitalWrite(led, HIGH); // 1 ise yak |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void Sayi1MouseClicked(java.awt.event.MouseEvent evt) { | |
Sayi1.setText(null); | |
} | |
private void Sayi2MouseClicked(java.awt.event.MouseEvent evt) { | |
Sayi2.setText(null); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { | |
SonucTXT.setText("Sonuç : "); | |
//JTextField den gelen string veri tipi Integer türüne çevriliyor. | |
int Sayi1Int = Integer.parseInt(Sayi1.getText()); | |
int Sayi2Int = Integer.parseInt(Sayi2.getText()); | |
if (Sayi1Int > Sayi2Int) { | |
SonucTXT.setText(SonucTXT.getText()+"\nSayi1, Sayi2'den buyuktur"); | |
} else if (Sayi1Int < Sayi2Int) { | |
SonucTXT.setText(SonucTXT.getText()+"\nSayi2, Sayi1'den buyuktur"); | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.haydut.serviceclick; | |
//yakutozcan.blogspot.com | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.os.Bundle; | |
public class MainActivity extends Activity | |
{ | |
@Override | |
public void onCreate(Bundle savedInstanceState) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.haydut.serviceclick; | |
import android.annotation.SuppressLint; | |
import android.app.Service; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.Canvas; | |
import android.graphics.Color; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example.haydut.serviceclick" > | |
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> | |
<uses-permission android:name="android.permission.WRITE_SETTINGS"/> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" | |
android:theme="@style/AppTheme" > |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
#define SERVER_PORT 1907 | |
const char* ssid = "haydut";//kablosuz ağ adı | |
const char* password = "wifi_sifre"; | |
WiFiServer server(SERVER_PORT); | |
void setup() | |
{ | |
pinMode(LED_BUILTIN, OUTPUT); | |
digitalWrite(LED_BUILTIN, LOW); | |
delay(500); |
OlderNewer