Gemini AI Assistant With Esp32
by Arduino_guy in Circuits > Microcontrollers
612 Views, 9 Favorites, 0 Comments
Gemini AI Assistant With Esp32
![capture 10.png](/proxy/?url=https://content.instructables.com/F3H/SGG8/M4R1PJJC/F3HSGG8M4R1PJJC.png&filename=capture 10.png)
As you may have used google's new AI assistant Gemini. A few time ago Gemini's api got out, so this is a project to test the gemini api
why gemini?
- there is a controvercy between google's Gemini and open ai's chatGPT while chatGPT has huge popularity it isn't free.
- where as gemini is free that means we can ask as many questions as we want.
Supplies
- ESP32 dev module
- 2.8 nich tft display
Connection
Getting the Api Key
![gemini.JPG](/proxy/?url=https://content.instructables.com/FJF/36U5/M4R1PGS2/FJF36U5M4R1PGS2.jpg&filename=gemini.JPG)
![Capture2.JPG](/proxy/?url=https://content.instructables.com/FD1/XWLL/M4R1PGUN/FD1XWLLM4R1PGUN.jpg&filename=Capture2.JPG)
![Capture3.JPG](/proxy/?url=https://content.instructables.com/FRP/JQQ0/M4R1PGZC/FRPJQQ0M4R1PGZC.jpg&filename=Capture3.JPG)
- search for gemini API docs.
- click on "get a Gemini api key".
- then "create API key".
- then click "Create new api key".
- click "copy".
And here you have the API key for gemini AI.
Setting Up the Boards
![Capture6.JPG](/proxy/?url=https://content.instructables.com/FQ9/YGMT/M4R1PIRF/FQ9YGMTM4R1PIRF.jpg&filename=Capture6.JPG)
![Capture7.JPG](/proxy/?url=https://content.instructables.com/F9H/CC8B/M4R1PIVR/F9HCC8BM4R1PIVR.jpg&filename=Capture7.JPG)
![Capture4.JPG](/proxy/?url=https://content.instructables.com/FWA/WN3C/M4R1PIDZ/FWAWN3CM4R1PIDZ.jpg&filename=Capture4.JPG)
![Capture5.JPG](/proxy/?url=https://content.instructables.com/FWQ/9KLY/M4R1PIHN/FWQ9KLYM4R1PIHN.jpg&filename=Capture5.JPG)
Skip this step if you have all library and boards installed.
Installing arduino ide :
- go to Arduino.cc
- then click on "software"
- install the software according to your pc.
- after it gets download install it.
Installing esp32 bord manager :
- In your Arduino IDE, go to File> Preferences
- In Additional Boards Manager URL paste this url - https://dl.espressif.com/dl/package_esp32_index.json,http://arduino.esp8266.com/stable/package_esp8266com_index.json
- Open the Boards Manager, Go to Tools> Boards> Boards Manager
- search fo esp32 by Espressif Systems and click install.
All the libraries you will need for this project :
NOTE :- replace the user setup.h file of TFT_eSPI library with the file given below.
User setup file location
documents --> Arduino --> libraries --> TFT_eSPI
Downloads
Code
There are just few changes to be done and you are good to go
- replace the "ssid" with your wifi"s name.
- replace "password" with your wifi's password.
- replace "API" with the Gemini API key got in the 2nd step.
- click on upload.
and there you have the your esp32 runnig Gemini AI.
Downloads
Conclusion
you can aks any question using the serial monitor in the IDE press "ctrl+shift+m" keys to open the serial monitor and after it gets connected to network try asking your question
the answer will get displayed on both serial monitor and tft display.
enjoy.