Feti AdarISMAIL TETIK
Published

Moria Door Access System

Mobile phone allows the door to be opened automatically. Multi-block sites provide security and speed at the main entrances.

AdvancedWork in progress15 days696
Moria Door Access System

Things used in this project

Hardware components

ESP-WROOM-02
Espressif ESP-WROOM-02
Fast - powerful - simple
×1
Relay (generic)
×1
Linear Regulator with Adjustable Output
Linear Regulator with Adjustable Output
×1

Software apps and online services

Android Studio
Android Studio
MQTT
MQTT

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free

Story

Read more

Custom parts and enclosures

Moria Reader Component List

Component list csv file

Schematics

Moria Reader Schematics

Moria Reader Schematics and PCB files.Altium Designer pdf export file .

Code

Moria Reader main code

C/C++
Eclipse C code
void app_main(void)
{
	int resetSettingsInx=0;
	delay_ms(100);
	esp_log_level_set("wifi", ESP_LOG_NONE);

	delay_ms(100);
	// initialize NVS
	ESP_ERROR_CHECK(nvs_flash_init());
    esp_rom_spiflash_config_param (0x1540ef, 4*1024*1024, 64*1024, 4096, 256, 0xffff);  
	//--------------
    gpio_setup();
    gpio_set_level(GPIO_ROLE, 0);
    gpio_set_level(GPIO_LED_KIRMIZI, 1);
    gpio_set_level(GPIO_LED_YESIL, 1);
    gpio_set_level(GPIO_BUZZER, 1);

	//--------------
    for( int i=0;i<7;i++ ) {
    	if( gpio_get_level( GPIO_SW1 ) == 1 ) break;
		resetSettingsInx++;
		printf("\n SW1:ON inx:%d\n",resetSettingsInx);
    	gpio_set_level(GPIO_BUZZER, 0);
		delay_ms(300);
    	gpio_set_level(GPIO_BUZZER, 1);
		delay_ms(700);
    }
	//--------------
	// vTaskDelay(5000 / portTICK_PERIOD_MS);
	delay_ms(50);
	//--------------
	// esp_base_mac_addr_set();
	tcpip_adapter_init();
	wifi_event_group = xEventGroupCreate();
	ESP_ERROR_CHECK(esp_event_loop_init(event_handler, NULL));
	// vTaskDelay(2000 / portTICK_PERIOD_MS);
	delay_ms(50);
	mf_lastcard_id[0]=0;mf_lastcard_id[1]=0;mf_lastcard_id[2]=0;mf_lastcard_id[3]=0;
	esp_efuse_mac_get_default(mac_addr);
	esp_efuse_read_mac(mac_addr2);
	delay_ms(100);
    readSettingsFromFlash();

Credits

Feti Adar

Feti Adar

3 projects • 3 followers
ISMAIL TETIK

ISMAIL TETIK

1 project • 1 follower

Comments