・役割ごとに分割(音声 / AI / 表示) 🤖 Gemini を“開発パートナー”として活用 ・コードの確認・改善 ・エラーの原因特定 ・より良い書き方の提案 🔌 ハードウェア連携もサポート ・Raspberry Pi の GPIO ・「どのピンに接続すればいいか」まで教えてくれた ✨ 驚いたこと 👉 ハードもソフトも同時に理解してくれる import requests from google import genai from google.genai import types def get_weather(city: str) -> dict: # Example: Open-Meteo via geocoding → forecast geo = requests.get( "https://geocoding-api.open-meteo.com/v1/search", params={"name": city, "count": 1, "language": "en", "format": "json"}, timeout=10, ).json() if not geo.get("results"): return {"error": f"City not found: {city}"} lat = geo["results"][0]["latitude"] lon = geo["results"][0]["longitude"] wx = requests.get( "https://api.open-meteo.com/v1/forecast", params={ "latitude": lat, "longitude": lon, "current": "temperature_2m,weather_code,wind_speed_10m", }, timeout=10, ).json() return {"city": city, "current": wx.get("current", {})}