Skip to content

Commit d8881c9

Browse files
committed
Initial commit 🚀
0 parents  commit d8881c9

19 files changed

+13027
-0
lines changed

.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
2+
3+
# dependencies
4+
node_modules/
5+
6+
# Expo
7+
.expo/
8+
dist/
9+
web-build/
10+
expo-env.d.ts
11+
12+
# Native
13+
*.orig.*
14+
*.jks
15+
*.p8
16+
*.p12
17+
*.key
18+
*.mobileprovision
19+
20+
# Metro
21+
.metro-health-check*
22+
23+
# debug
24+
npm-debug.*
25+
yarn-debug.*
26+
yarn-error.*
27+
28+
# macOS
29+
.DS_Store
30+
*.pem
31+
32+
# local env files
33+
.env*.local
34+
35+
# typescript
36+
*.tsbuildinfo

App.tsx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import React, { useEffect } from 'react';
2+
import { StyleSheet } from 'react-native';
3+
import HomeScreen from './src/screens/HomeScreen';
4+
import * as Notifications from 'expo-notifications';
5+
6+
// Configure notification handler
7+
Notifications.setNotificationHandler({
8+
handleNotification: async () => ({
9+
shouldShowAlert: true,
10+
shouldPlaySound: true,
11+
shouldSetBadge: false,
12+
}),
13+
});
14+
15+
export default function App() {
16+
// App initialization
17+
useEffect(() => {
18+
// Configure notification settings on app startup
19+
configureNotifications();
20+
}, []);
21+
22+
// Configure notifications settings
23+
const configureNotifications = async () => {
24+
// Request permissions
25+
await Notifications.requestPermissionsAsync();
26+
};
27+
28+
return (
29+
<HomeScreen />
30+
);
31+
}
32+
33+
const styles = StyleSheet.create({
34+
container: {
35+
flex: 1,
36+
backgroundColor: '#fff',
37+
},
38+
});

README.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# EMF Radiation Detector App
2+
3+
A robust React Native Expo application that detects and monitors electromagnetic field (EMF) radiation in your environment, providing real-time measurements and exposure tracking.
4+
5+
## Features
6+
7+
- **Real-time EMF Detection**: Uses your device's magnetometer to detect electromagnetic fields
8+
- **Visual Gauge**: Shows current EMF levels with an easy-to-read meter
9+
- **Exposure Tracking**: Monitors how long you've been exposed to various radiation levels
10+
- **Exposure Alerts**: Notifies you when you've been exposed to high EMF levels for too long
11+
- **Detailed Information**: Provides safety information about EMF radiation levels
12+
13+
## Requirements
14+
15+
- A device with a built-in magnetometer sensor
16+
- iOS 13.0+ or Android 6.0+
17+
- Expo Go app (for development testing)
18+
19+
## Installation
20+
21+
1. Clone this repository:
22+
```bash
23+
git clone https://github.com/yourusername/emf-radiation-detector-app.git
24+
cd emf-radiation-detector-app
25+
```
26+
27+
2. Install dependencies:
28+
```bash
29+
npm install
30+
```
31+
32+
3. Start the development server:
33+
```bash
34+
npx expo start
35+
```
36+
37+
## Usage
38+
39+
1. Launch the app on your device.
40+
2. Press the "Start Scanning" button to begin detecting EMF radiation.
41+
3. Move your device around to detect EMF sources in your environment.
42+
4. The meter will show the current radiation level and categorize it as:
43+
- **SAFE** (Green): Safe for long-term exposure
44+
- **MODERATE** (Yellow): Safe for limited exposure
45+
- **HIGH** (Orange): Limited exposure recommended
46+
- **VERY HIGH** (Orange-Red): Minimal exposure recommended
47+
- **EXTREME** (Red): Avoid exposure
48+
49+
5. The exposure tracking section will monitor how long you've been exposed to the current EMF level and warn you if you exceed recommended exposure times.
50+
51+
## Technical Details
52+
53+
### EMF Detection
54+
55+
The app uses the device's magnetometer sensor to detect magnetic fields in the environment. The electromagnetic field magnitude is calculated from the 3-axis (X, Y, Z) magnetometer readings using the formula:
56+
57+
```
58+
magnitude = sqrt(x² + y² + z²)
59+
```
60+
61+
Measurements are provided in microtesla (μT), which is the standard unit for magnetic field strength.
62+
63+
### Exposure Guidelines
64+
65+
The app uses generally accepted guidelines for EMF exposure:
66+
67+
- **Safe**: Below 0.3 μT (generally considered safe for extended periods)
68+
- **Moderate**: 0.3-1.0 μT (generally considered safe for typical daily exposure)
69+
- **High**: 1.0-6.0 μT (limit extended exposure)
70+
- **Very High**: 6.0-10.0 μT (minimize exposure time)
71+
- **Extreme**: Above 10.0 μT (avoid prolonged exposure)
72+
73+
These values are based on common EMF safety recommendations but may vary depending on regulatory bodies and contexts.
74+
75+
## Limitations
76+
77+
- This app can only detect magnetic fields, which are just one component of electromagnetic radiation.
78+
- Consumer device magnetometers may not be as accurate as professional EMF meters.
79+
- The app cannot detect non-magnetic radiation such as radio waves or ionizing radiation.
80+
- Readings may be affected by the device's own electromagnetic components.
81+
82+
## Tech Stack
83+
84+
- React Native
85+
- TypeScript
86+
- Expo
87+
- expo-sensors (for magnetometer access)
88+
- react-native-reanimated (for smooth animations)
89+
- expo-notifications (for exposure alerts)
90+
91+
## License
92+
93+
MIT
94+
95+
## Disclaimer
96+
97+
This app is intended for educational and informational purposes only. It should not be used as a professional EMF measurement tool for safety-critical applications. While the app provides approximate readings of magnetic field strength, these should not be considered as definitive measurements for health and safety purposes.

app.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"expo": {
3+
"name": "EMF Radiation Detector",
4+
"slug": "emf-radiation-detector-app",
5+
"version": "1.0.0",
6+
"orientation": "portrait",
7+
"icon": "./assets/icon.png",
8+
"userInterfaceStyle": "light",
9+
"newArchEnabled": true,
10+
"splash": {
11+
"image": "./assets/splash.png",
12+
"resizeMode": "contain",
13+
"backgroundColor": "#ffffff"
14+
},
15+
"assetBundlePatterns": [
16+
"**/*"
17+
],
18+
"ios": {
19+
"supportsTablet": true,
20+
"infoPlist": {
21+
"NSMagnetometerUsageDescription": "This app uses the magnetometer to detect EMF radiation levels in your environment."
22+
}
23+
},
24+
"android": {
25+
"adaptiveIcon": {
26+
"foregroundImage": "./assets/adaptive-icon.png",
27+
"backgroundColor": "#ffffff"
28+
},
29+
"permissions": [
30+
"android.permission.VIBRATE"
31+
]
32+
},
33+
"web": {
34+
"favicon": "./assets/favicon.png"
35+
},
36+
"plugins": [
37+
[
38+
"expo-sensors",
39+
{
40+
"magnetometer": true
41+
}
42+
],
43+
[
44+
"expo-notifications",
45+
{
46+
"icon": "./assets/notification-icon.png",
47+
"color": "#ffffff"
48+
}
49+
]
50+
],
51+
"description": "An app to detect and monitor EMF radiation in your environment."
52+
}
53+
}

assets/adaptive-icon.png

17.1 KB
Loading

assets/favicon.png

1.43 KB
Loading

assets/icon.png

21.9 KB
Loading

assets/splash-icon.png

17.1 KB
Loading

index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { registerRootComponent } from 'expo';
2+
3+
import App from './App';
4+
5+
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
6+
// It also ensures that whether you load the app in Expo Go or in a native build,
7+
// the environment is set up appropriately
8+
registerRootComponent(App);

0 commit comments

Comments
 (0)