Welcome to Tire Pressure Calculator!

First time here? Perfect!

In just 2 minutes, you'll be calculating tire pressure like a safety expert!

No automotive experience needed!

πŸš— Tire Pressure Calculator

Calculate and convert tire pressure between PSI, Bar, kPa, and other units. Find optimal pressure for your vehicle type and ensure safe driving.

πŸ€” What Is Tire Pressure?

Think of a balloon - that's tire pressure!

Your tires need the right amount of air pressure to grip the road safely and last longer.

Proper tire pressure saves fuel, prevents accidents, and extends tire life!

πŸš—
Vehicle Safety
Proper pressure prevents blowouts and improves braking distance
β›½
Fuel Economy
Correct pressure can improve gas mileage by up to 3%
πŸ”§
Tire Longevity
Proper inflation extends tire life by preventing irregular wear
πŸ›£οΈ
Road Grip
Optimal pressure maximizes contact patch for better traction
🏁
Racing Performance
Fine-tuned pressure improves lap times and handling
🚚
Commercial Vehicles
Heavy loads require precise pressure calculations for safety
🎯 Choose Your Learning Mode

Choose Your Experience Level

Start with Beginner for simple pressure conversion!

🟒
Beginner
Simple conversions - perfect to start!
🟑
Intermediate
Vehicle-specific recommendations
πŸ”΄
Expert
Advanced calculations and adjustments!

πŸš€ Quick Conversion

Enter the pressure value you want to convert
Select the unit you're converting from

πŸš— Vehicle Information

Choose your vehicle type for recommendations
e.g., 225/60R16 (found on tire sidewall)
πŸš— Your tire pressure results will appear here

πŸš— Try Sample Vehicles

πŸš™ Compact Car
Honda Civic
Recommended: 32 PSI
πŸš— Mid-Size Sedan
Toyota Camry
Recommended: 35 PSI
🚐 SUV
Ford Explorer
Recommended: 38 PSI
🚚 Pickup Truck
Chevrolet Silverado
Recommended: 40 PSI
🏍️ Motorcycle
Yamaha R6
Front: 36 PSI, Rear: 42 PSI
🚴 Road Bike
Racing Bike
Recommended: 80-120 PSI
${safetyMessage}
Recommended Range: ${recommendations.min} - ${recommendations.max} PSI
Optimal: ${recommendedPSI.toFixed(1)} PSI ${OnboardingManager.currentDifficulty !== 'beginner' ? `
Adjusted for your driving conditions` : ''}
`; } // Copy results to clipboard function copyResults() { const pressureValue = parseFloat(document.getElementById('pressureInput').value); const fromUnit = document.getElementById('fromUnit').value; const vehicleType = document.getElementById('vehicleType').value; const conversions = {}; for (const unit in PRESSURE_CONVERSIONS.psi) { conversions[unit] = pressureValue * PRESSURE_CONVERSIONS[fromUnit][unit]; } const copyText = `Tire Pressure Conversion Results: PSI: ${conversions.psi.toFixed(1)} Bar: ${conversions.bar.toFixed(2)} kPa: ${conversions.kpa.toFixed(0)} ATM: ${conversions.atm.toFixed(2)} Vehicle: ${vehicleType} Generated by WIA Pin Code Tire Pressure Calculator`; copyToClipboard(copyText); } // Sample usage function function useSample(sampleId) { const samples = { 'compact': { pressure: 32, unit: 'psi', vehicle: 'passenger' }, 'sedan': { pressure: 35, unit: 'psi', vehicle: 'passenger' }, 'suv': { pressure: 38, unit: 'psi', vehicle: 'suv' }, 'truck': { pressure: 40, unit: 'psi', vehicle: 'truck' }, 'motorcycle': { pressure: 36, unit: 'psi', vehicle: 'motorcycle' }, 'bicycle': { pressure: 100, unit: 'psi', vehicle: 'bicycle' } }; const sample = samples[sampleId]; if (sample) { document.getElementById('pressureInput').value = sample.pressure; document.getElementById('fromUnit').value = sample.unit; document.getElementById('vehicleType').value = sample.vehicle; // Smooth scroll to calculate button document.getElementById('calculateBtn').scrollIntoView({ behavior: 'smooth', block: 'center' }); // Highlight button const btn = document.getElementById('calculateBtn'); btn.style.animation = 'pulse 0.5s ease-in-out'; setTimeout(() => btn.style.animation = '', 500); OnboardingManager.unlockAchievement('sample_user', 'πŸš— Vehicle Explorer', 'Tried a sample vehicle!'); } } // Difficulty setter function setDifficulty(level) { OnboardingManager.setDifficulty(level); } // Onboarding functions function startTutorial() { OnboardingManager.startTutorial(); } function skipOnboarding() { document.getElementById('onboardingOverlay').classList.remove('show'); localStorage.setItem('tire_pressure_visited', 'true'); } // ========== UTILITY FUNCTIONS ========== // Copy to clipboard function copyToClipboard(text) { navigator.clipboard.writeText(text).then(() => { showNotification('Results copied to clipboard!', 'success'); OnboardingManager.unlockAchievement('copier', 'πŸ“‹ Copy Master', 'Copied results to clipboard!'); }).catch(() => { // Fallback for older browsers const textArea = document.createElement('textarea'); textArea.value = text; document.body.appendChild(textArea); textArea.select(); document.execCommand('copy'); document.body.removeChild(textArea); showNotification('Results copied to clipboard!', 'success'); }); } // Show error function showError(elementId, message) { const errorElement = document.getElementById(elementId); if (errorElement) { errorElement.textContent = message; } } // Clear errors function clearErrors() { document.querySelectorAll('.error').forEach(el => el.textContent = ''); } // Show notification toast function showNotification(message, type = 'success', description = '') { const toast = document.createElement('div'); toast.className = `toast ${type}`; if (description) { toast.innerHTML = `
${message}
${description}
`; } else { toast.textContent = message; } document.body.appendChild(toast); setTimeout(() => { toast.remove(); }, 4000); } // Show OTA section (dynamic) function showOTA() { const otaContainer = document.getElementById('otaContainer'); if (otaContainer && (otaContainer.style.display === 'none' || !otaContainer.style.display)) { otaContainer.style.display = 'block'; // Attention-grabbing pulse effect setTimeout(() => { const otaHeader = document.querySelector('.ota-header h3'); if (otaHeader) { otaHeader.style.animation = 'pulse 1s ease-in-out'; } }, 100); } } // Analytics tracking function trackEvent(eventName, data = {}) { if (typeof gtag !== 'undefined') { gtag('event', eventName, { 'event_category': TOOL_CONFIG.category, 'event_label': TOOL_CONFIG.name, ...data }); } } // ========== AI ASSISTANT FUNCTIONS ========== // AI λͺ¨λ‹¬ μ—΄κΈ° function openAIModal() { const modal = document.getElementById('aiModal'); if(modal) modal.classList.add('show'); // ν˜„μž¬ μƒνƒœμ— 따라 μ μ ˆν•œ ν™”λ©΄ ν‘œμ‹œ if (aiModalState.apiKey && aiModalState.currentView === 'gemini') { showGeminiChat(); } else { showAISelector(); } updateAPIKeyStatus(); } // AI λͺ¨λ‹¬ λ‹«κΈ° function closeAIModal() { const modal = document.getElementById('aiModal'); if(modal) modal.classList.remove('show'); setTimeout(() => { aiModalState.currentView = 'selector'; showAISelector(); }, 300); } // AI 선택 ν™”λ©΄ ν‘œμ‹œ function showAISelector() { document.getElementById('aiModalTitle').textContent = 'Choose Your AI Assistant'; document.getElementById('aiSelector').style.display = 'flex'; document.getElementById('geminiChat').style.display = 'none'; document.getElementById('apiKeySetup').style.display = 'none'; aiModalState.currentView = 'selector'; } // Gemini μ±„νŒ… ν™”λ©΄ ν‘œμ‹œ function showGeminiChat() { document.getElementById('aiModalTitle').innerHTML = '✨ Gemini AI Assistant'; document.getElementById('aiSelector').style.display = 'none'; document.getElementById('geminiChat').style.display = 'flex'; document.getElementById('apiKeySetup').style.display = 'none'; aiModalState.currentView = 'gemini'; // 초기 λ©”μ‹œμ§€κ°€ μ—†μœΌλ©΄ μΆ”κ°€ const chatMessages = document.getElementById('chatMessages'); if (!chatMessages.innerHTML.trim()) { addMessage('assistant', `Hello! I can help you with: β€’ Tire pressure calculations and conversions β€’ Vehicle-specific pressure recommendations β€’ Safety guidelines for tire maintenance β€’ Understanding pressure units (PSI, Bar, kPa) β€’ Troubleshooting tire pressure issues What would you like to know about tire pressure?`); } } // API ν‚€ μ„€μ • ν™”λ©΄ ν‘œμ‹œ function showAPIKeySetup() { document.getElementById('aiModalTitle').textContent = 'Setup Gemini API'; document.getElementById('aiSelector').style.display = 'none'; document.getElementById('geminiChat').style.display = 'none'; document.getElementById('apiKeySetup').style.display = 'block'; aiModalState.currentView = 'setup'; } // AI 선택 처리 function selectAI(aiType) { switch(aiType) { case 'chatgpt': const toolContext = `I need help with ${TOOL_CONFIG.name}. This is a safety utility on WIA Pin Code platform for calculating tire pressure.`; const chatUrl = `https://chat.openai.com/?q=${encodeURIComponent(toolContext)}`; window.open(chatUrl, '_blank'); closeAIModal(); trackEvent('ai_selection', { ai_type: 'chatgpt' }); break; case 'claude': const claudeContext = `I need help with ${TOOL_CONFIG.name}. This is a safety utility on WIA Pin Code platform for calculating tire pressure.`; const claudeUrl = `https://claude.ai/chat?q=${encodeURIComponent(claudeContext)}`; window.open(claudeUrl, '_blank'); closeAIModal(); trackEvent('ai_selection', { ai_type: 'claude' }); break; case 'gemini': if (!aiModalState.apiKey) { showAPIKeySetup(); } else { showGeminiChat(); } trackEvent('ai_selection', { ai_type: 'gemini' }); break; } } // API ν‚€ μ €μž₯ function saveGeminiApiKey() { const apiKey = document.getElementById('geminiApiKeyInput').value.trim(); if (apiKey) { localStorage.setItem('geminiApiKey', apiKey); aiModalState.apiKey = apiKey; showGeminiChat(); updateAPIKeyStatus(); } else { alert('Please enter a valid API key'); } } // API ν‚€ μƒνƒœ μ—…λ°μ΄νŠΈ function updateAPIKeyStatus() { const statusEl = document.getElementById('apiKeyStatus'); if (aiModalState.apiKey) { statusEl.innerHTML = 'Change API Key'; } else { statusEl.textContent = 'No API key set'; } } // μ±„νŒ… λ©”μ‹œμ§€ μΆ”κ°€ function addMessage(type, content) { const chatMessages = document.getElementById('chatMessages'); const messageDiv = document.createElement('div'); messageDiv.className = `message ${type}`; if (type === 'user') { messageDiv.innerHTML = `You: ${content}`; } else { messageDiv.innerHTML = `✨ Gemini:
${content.replace(/\n/g, '
')}`; } chatMessages.appendChild(messageDiv); chatMessages.scrollTop = chatMessages.scrollHeight; } // Gemini에 λ©”μ‹œμ§€ 전솑 async function sendToGemini() { const input = document.getElementById('geminiInput'); const message = input.value.trim(); if (!message) return; // μ‚¬μš©μž λ©”μ‹œμ§€ μΆ”κ°€ addMessage('user', message); input.value = ''; // λ‘œλ”© ν‘œμ‹œ const loadingMsg = document.createElement('div'); loadingMsg.className = 'message assistant'; loadingMsg.innerHTML = '✨ Gemini:
Thinking...'; loadingMsg.id = 'loading-message'; document.getElementById('chatMessages').appendChild(loadingMsg); try { const response = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=${aiModalState.apiKey}`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ contents: [{ parts: [{ text: `Context: User is using Tire Pressure Calculator on WIA Pin Code platform. This tool helps calculate optimal tire pressure and convert between units. User question: ${message}` }] }], generationConfig: { temperature: 0.7, maxOutputTokens: 1000 } }) }); const data = await response.json(); // λ‘œλ”© λ©”μ‹œμ§€ 제거 document.getElementById('loading-message').remove(); if (data.candidates && data.candidates[0] && data.candidates[0].content) { const reply = data.candidates[0].content.parts[0].text; addMessage('assistant', reply); } else { addMessage('assistant', 'Sorry, I could not generate a response. Please try again.'); } } catch (error) { // λ‘œλ”© λ©”μ‹œμ§€ 제거 document.getElementById('loading-message')?.remove(); if (error.message.includes('API key')) { addMessage('error', 'Invalid API key. Please check your API key and try again.'); showAPIKeySetup(); } else { addMessage('error', 'Failed to connect to Gemini. Please check your internet connection and try again.'); } } } // ========== EVENT LISTENERS ========== document.addEventListener('DOMContentLoaded', function() { // Initialize onboarding OnboardingManager.showOnboarding(); // Enter key support for pressure input const pressureInput = document.getElementById('pressureInput'); if (pressureInput) { pressureInput.addEventListener('keypress', function(e) { if (e.key === 'Enter') { calculatePressure(); } }); pressureInput.addEventListener('input', clearErrors); } // Pressure adjustment slider update (expert mode) const pressureSlider = document.getElementById('pressureAdjustment'); if (pressureSlider) { pressureSlider.addEventListener('input', function() { document.getElementById('adjustmentValue').textContent = this.value; }); } // AI λ²„νŠΌ 이벀트 document.getElementById('aiBtn').addEventListener('click', openAIModal); // λͺ¨λ‹¬ μ™ΈλΆ€ ν΄λ¦­μ‹œ λ‹«κΈ° document.getElementById('aiModal').addEventListener('click', function(e) { if (e.target === this) { closeAIModal(); } }); // ν‚€λ³΄λ“œ 이벀트 document.addEventListener('keydown', function(e) { if (e.key === 'Enter') { const geminiInput = document.getElementById('geminiInput'); if (document.activeElement === geminiInput) { sendToGemini(); } } // ESC ν‚€λ‘œ λͺ¨λ‹¬ λ‹«κΈ° if (e.key === 'Escape') { closeAIModal(); OnboardingManager.skipTutorial(); skipOnboarding(); } }); // 초기 API ν‚€ μƒνƒœ μ—…λ°μ΄νŠΈ updateAPIKeyStatus(); updateCurrentYear(); updateToolCount(); }); // Track WIA Pin Code clicks for analytics document.querySelectorAll('a[href*="wia"]').forEach(link => { link.addEventListener('click', function() { trackEvent('wia_link_click', { link: link.textContent }); }); }); // ========== DYNAMIC TOOL COUNT ========== // Update tool count dynamically async function updateToolCount() { try { const response = await fetch('/api/tool-count.php'); const data = await response.json(); // Update dynamic tools description document.querySelectorAll('.dynamic-tools-count').forEach(el => { el.textContent = `${data.count}+ free online tools in 211 languages. No signup, no fees, just tools that work.`; }); // Update "All X+ Tools" links document.querySelectorAll('.dynamic-count').forEach(el => { const prefix = el.getAttribute('data-text') || ''; const suffix = el.getAttribute('data-suffix') || ''; const icon = el.textContent.split(' ')[0] || ''; el.textContent = `${icon} ${prefix} ${data.count}+ ${suffix}`; }); } catch (error) { // Fallback: use current actual count from server const fallbackCount = 333; document.querySelectorAll('.dynamic-tools-count').forEach(el => { el.textContent = `${fallbackCount}+ free online tools in 211 languages. No signup, no fees, just tools that work.`; }); document.querySelectorAll('.dynamic-count').forEach(el => { const prefix = el.getAttribute('data-text') || ''; const suffix = el.getAttribute('data-suffix') || ''; const icon = el.textContent.split(' ')[0] || ''; el.textContent = `${icon} ${prefix} ${fallbackCount}+ ${suffix}`; }); console.log('Tool count API not available, using current count:', fallbackCount); } } // Update current year dynamically function updateCurrentYear() { const currentYear = new Date().getFullYear(); document.querySelectorAll('.current-year').forEach(el => { el.textContent = currentYear; }); } // ========== ANALYTICS ========== // Google Analytics window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-XXXXXXXXX'); // Track page view trackEvent('page_view', { tool: TOOL_CONFIG.name, category: TOOL_CONFIG.category });