Jump to content


Photo
- - - - -

New Project Idea - Need Some Guidance


  • Please log in to reply
3 replies to this topic

#1 steelchizzle

steelchizzle

    New Member

  • New Members
  • 6 posts

Posted 26 June 2017 - 04:30 AM

Hello Again All.

 

I am starting a new project soon. It will be fully documented some where online when it is completed.I shall let all you fello nerds know !

 

Basically my idea is a game  powered by Either a  Raspberry Pi or an Arduino and the desired features are.

 

-  To input a name on a webpage and store in a database (Ideally on the Pi).

-  Gather GPIO readings and store them in the database.

-  Display the name and the GPIO data in real time on a web page with Apache or something compatible with raspberry pi

 

Scope of the game

Basically what I would like to do is take a reading ( Digital for now)  from raspberry pi or arduino and  store this in some sort of data base and in real time display it on a web page, and also be able to look up previous game scores later. I also plan to make this multi player  probably settle for two players.

 

 

So I think I will use a Raspberry Pi for this project but depending on the method ill use anything. Ive both a Pi 3 and an Arduino. I can have the raspberry pi controlling the arduino either.

 

My main idea was turn the raspberry pi into a access point with a Apache web server to display the desired data.

 

To get the data I was thinking of using python to detect the I/O pins and some how throw them into a data base and then in real time display them to a webpage.

 

I do know their is a program or a script to allow python to interact with a web page , I do forget what the name of it is  I briefly used it and I dont think it will work but I do have more testing to do.

 

I am not asking any one to do the project for me but would really appreciate if any one with some experience on making this sort of interface to give some guidance or a few headings I could look up.

 

Im pretty unsure on what to be searching for the particular term.

 

 

I am able to set up the access point on the pi with apache and have web design experience.

I can use the GPIO pins in python .

 

I just dont know how to store and update in real time.

 

Again any guidance is appreciated !! 

 

I also only have one post a day for now :(

 

Thanks So Much !! 

 

 

 

 

 



#2 scr4wl

scr4wl

    R34CT1V4T3D

  • Members
  • PipPipPipPipPip
  • 2983 posts
  • Gender:Male
  • Location:New Mexico

Posted 26 June 2017 - 05:12 AM

I just dont know how to store and update in real time.


It sounds like this is what you are lookin for. Can you provide more info on what data you are trying to store? Is it simply just the player's scores?

And you are wanting them displayed on a site hosted on the pi (which is also running the game) is that correct?

Im assuming you are also using raspian?

Generic Most Awesome Sig


#3 steelchizzle

steelchizzle

    New Member

  • New Members
  • 6 posts

Posted 28 June 2017 - 04:30 AM

Sorry I am limited to one post a day until I reach eight approved posts so yeah haha.

 

Yes exactly that is what I am looking for.

 

So my ideal set up would be a raspberry pi 3  which is connected to a mcp23017 via I2C.   The mcp23017 is a digital I/O expander 16bit.

Taking the readings and talking to the mcp23017 is done in python over I2C. 

 

So the Pi will take readings of the digital pins and store them in some sort of a data base.

 

The Pi will also be running an Apache web server this is where the values from the database will be shown in real time.

I also need the web site to allow me to input a persons name into the database and time and date if I can.

 

When I say python and database and apache ----- These are not in stone they are just my first ideas, which ever way I can make this project work the fastest and with most appropriate method will be grand.

 

I can get the web server working and the mcp23017 working individually.

 

I didn't look into databases just yet .

 

My problem specifically is getting the data in to the data base and on to the website and in real time. 

 

Again sorry for the delay in my replies I cant do anything about it until my account gets unlocked. 

 

I will be developing this project from tomorrow on wards with any free time I get.

 

I also want to document everything I can so others in the same situation can benefit and hopefully make their own projects a bit easier.

 

Again thanks so much for any help I do appreciate it. 

 

Ill be watching this forum but can only reply this time tomorrow.



#4 scr4wl

scr4wl

    R34CT1V4T3D

  • Members
  • PipPipPipPipPip
  • 2983 posts
  • Gender:Male
  • Location:New Mexico

Posted 28 June 2017 - 06:28 AM

Well you can run mysql for the database.

To get the data on the website you can use ajax, or push it using the appropriate libraries.

Look into the mysql connector for python, it may do exactly what you want.

Generic Most Awesome Sig