Micro:Bit Step Counter with Database in MicroPython Possible?

Questions and discussion about running MicroPython on a micro:bit board.
Target audience: MicroPython users with a micro:bit.
Post Reply
ferdel4nce
Posts: 2
Joined: Thu Feb 09, 2017 11:12 am

Micro:Bit Step Counter with Database in MicroPython Possible?

Post by ferdel4nce » Thu Feb 09, 2017 11:13 am

0
down vote
favorite
I will start this from scratch: I set myself to develop an activity tracker for your pet that keeps track of the amount of steps that your pet takes. When finished that user would press one of the programmable buttons on that board to transfer that number of steps onto a database.

At first, I thought the BBC micro:bit board had everything I needed such as an accelerometer, compass, Blue Tooth but it seems as I do my research and as I code this thing it seems that what I want it to do is too ambitious for this microchip and it may be impossible to do with this product. However, before I scrap this product altogether I want others' opinions just to see if it really is possible with it.

The microchip can be programmed in the following languages:

MicroPython (which I chose)

JavaScript

Blockly

I chose MicroPython because I know you can use Python to connect to databases. Although no errors show up when I throw in code to connect the database up locally via file path the microchip doesn't work with me when I try to 'print' out the information that is stored in the tables stored within the database. The print displays by means of 25 LED lights on the microchip that can print out words and debugging.

Perhaps another microchip can do this step counter better and that can perfectly connect to databases, update the steps and store it within the database so I can make queries and tables that will display on my own created computer software that works alongside this piece of hardware.

Any thoughts?

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Micro:Bit Step Counter with Database in MicroPython Possible?

Post by deshipu » Thu Feb 09, 2017 4:40 pm

Some points:
  • Not sure what you mean by "database" in this context, or by "connecting to a database". As far as I know, there is no database for Micro:bit. Did you implement your own? Or did you just copy some code from a normal Python on the PC and expect that to work?
  • You can't use bluetooth with MicroPython on the Micro:bit, as there is not enough memory for the two to fit there at the same time.
  • You can, however, use the radio that is normally used by bluetooth, to send information to another Micro:bit. You can also communicate with a PC over the serial interface through the USB cable, as long as you write a program for the PC to receive the data.
  • I don't think Micro:bit is really a good base for a commercial product. It was designed as an educational tool.

ferdel4nce
Posts: 2
Joined: Thu Feb 09, 2017 11:12 am

Re: Micro:Bit Step Counter with Database in MicroPython Possible?

Post by ferdel4nce » Thu Feb 09, 2017 5:06 pm

Okay, so the micro:bit isn't a good product for my step counter. What would you recommend I buy to be able to code and achieve this?

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Micro:Bit Step Counter with Database in MicroPython Possible?

Post by deshipu » Thu Feb 09, 2017 5:32 pm

Maybe fitbit or one of the hundred other "fitness trackers" out there?

Post Reply