Electronic Dice

I am using a SEEDUINO SENSE BLE. I am making a small digital 6 sided die that relay the dice number to an arduino nano which will then display the result.

My question. How do i use an HM-10 to read the value (1,2,3,4,5,6) and store that number.

Seeduino BLE works great with Android app and i can see the numbers changing as the dice is rotated to different sides.

Next i need to get that data wirelessly to an arduino nano and read the number that the seeeduino is sending over BLE.

Its a 1inch cube dice with Seeduino inside and very small LIPO battery.

Then i have an arduino Nano with display that will show the number based on what side the dice is showing.

Again, i am trying to just get a one digit number received using an HM10 from the Seeduino BLE.

Thank you for your time.

With a great deal of difficulty , have a google on vision systems . Think about how you would use a camera to find the die , it’s various angles it might have to the camera , then from the image how do decide what the number is

From a quick google

Welcome to the forum.

I guess you basically want to measure the orientation of the dice from within the dice itself?

Maybe a couple of mercury switches would do the job.

[edit]

cube

If four switches are placed facing vertex 2, 4, 5 and 7 parallel to the space diagonals, then you could use the following table to detect the orientation of the cube.

2 4 5 7 orientation
1 1 0 0 top
0 0 1 1 bottom
1 0 1 0 left
0 1 0 1 right
0 1 1 0 front
1 0 0 1 back

You can omit any of the four switches, but that would affect the balance of the cube.

Adding parts to the dice would “load” it and stop the throw result being random

True, but there is already a Seeeduino and a LIPO inside apparently. Some careful balancing is needed.

Didn’t spot that ……How big is it lol :joy:

Evidently it's...

:wink:

It's a 1inch x 1inch 6 sided die. Currently hollow cube with switch, controller, and 100mah lipo baytery inside. Weighted dice will be an issue but i will cross that bridge later.

I was able to use the seeeduino ble sense 6dof to read the orientation of the die which then
sends the data of which side is showing over BLE to my serial monitor wirelessly using arduinoBLE library

This is just a prototype before 3d printing the actual dice enclosure.

Since i am a new user i can only add one picture to the post.

Weight will be a very big challenge for true random. But close enough will make it fun

I guess there are lots of options to determine orientation...

Maybe one of these... Accelerometer Gyroscope GY521 module MPU6050 MPU-6050 module - Sound Division & Surplustronics

Or you could just use LDRs on each face... and some simple logic to determine which one is in the dark (face down).

I agree that the weight distribution will be a challenge to keep it random... if the dice was made of a heavy material to influence of the non centred internal components would be less.

Good luck.

EDIT: I should have read your post more clearly... seems like you've done all the hard work. So you're now just trying to figure out out to send the data from the dice?

Impressive !

Except balancing the die. That in itself is a non-trivial challenge, as you actually need to consider not just centre of gravity but weight distribution influencing moment of inertia in three axes. :astonished:

I was trying to find away for an HM-10 ble to connect to the BLE of the Seeeduino Sense. From what i have determined is there is no library that will acheive connecting the HM-10 to a BLE. Well atleast not that i could figure out.

My solution so far. Use another arduino that works with the arduinoBLE library as that library has tons of features to utilize and connect. I have successfully received and send data between two BLE seeeduinos and working fine. But would have been nice to use a arduino nano with HM-10.

If anyone knows if HM-10 can receive data from a Seeeduino BLE sense.. this will make it more affordable. But i just dont know if this is even possible. Everything i have found online only shows HM-10 connecting to another HM-10 or connecting to a mobile phone. There is no good documentation on HM-10 to a BLE chipped microcontroller. Or maybe there is and i need help finding this. Maybe i am using bad search terms. :thinking:

Project: physically roll a dice and a display the results wirelessly on an OLED display.

Reason for wireless: we want to physically throw the dice like in Craps or any childhood board game such as monopoly. If there are wires, it will not work. So wireless is a MUST. BLE will be a great option as they can run on a very small battery and last a long time before needing to be charged.

Object: a human can pick up the dice, throw them, and the display will show the result on a screen. The display will add up the total dice and display the sum of all the dice. The display can be anything like OLED. 8x8 matrix, LCD, etc... doesnt matter here.

Size: i am trying to keep the dice small. About 1inch cube sized. Just lsrge enough to fit components and to hold multiple dice for throwing.

Dice Components: to keep it within the size constraints we need to fit all the hardware within the cube. I have selected a Seeeduino Xiao Sense with BLE. The reason i chose this item is because it has a built in 6axis IMU and built in bluetooth BLE and bonus it has built in charging using a USB C cable and its less than 1inch in size. All of these components are built in so all i need to do is hook up a small battery and switch to turn the device on and off. I have successfully wired and fit these components in a 1inch cube. Yay. This step is complete.

Read and display the dice reaults: this is where i am currently at. Now i need to wirelessly get the dice to show on a display board. I had planned on using HM-10 bluetooth module to receive the data from the BLE on the Seeeduino Xiao. Sadly this was not successful using HM10. However i wad able to read the data from another Seeeduino BLE device and successfully display it so i guess i could go this route but would prefer not to as this will become costly to reproduce.

BLE LIBRARIES: arduinoBLE is an amazing library for working with BLE however it is not compatible with HM10. If anyone knows of a good BLE library that works with HM10 that will allow it to connect to the Seeeduino Xiao BLE chip then we will be moving in the right direction.

Final product: physically throw dice, a display that shows what each dice are showing and total them for the user.

Next steps: once the dice are working and wirelessly sending data to display. Then i can use these dice to make arduino controlled robots and games from these dice. It will open up a new digital world of letting users to have the ability to use something and digital while playing a game.

Research: there are lots of examples of digital dice which most are just flat and pushing a button to "randomly" generate a number.
There are some that are physical in nature on the youtube but they are not able to be thrown.
There are some people out there making digital dice that can be thrown but they are very very expensive and only work with mobile phones and dont appear to be adaptable to arduino without major modifications.

Summary: make arduino physical dice that send the results to another arduino that will do something with the data wirelessly, inexpensive, and low energy.

I am very close and will post code and pictures as the project continues. It will be a game changer (pun intended).

Balance it like we do model airplanes boats and cars with modelling clay. push it into the corners until it balances. If necessary add bb's or lead shot as needed.

Absolutely will look into modeling clay and Balancing weights. I used playdo and stuffed it all around ( completly enclosed the electronics inside) to make it solid however i wasnt sure if airflow is an issue with lipo battery and the microcontroller. After one day of use the playdo must have eaten away at the microcontroller and the Onboard Led Lights all were missing. Or they overheated and melted off.
Puzzled on that.

More information can be found here..

Arduino Project Hub Wireless Dice

I am looking for help with BLE and HM-10 if anyone cares to share how to communicate between the two using Arduinos or microcontrollers. note HM-10 to HM-10.. but HM-10 to BLE... if possible..

Seen this?

A bit pricy. I got a set last month as a result of backing a kick starter.

Covid did hamper things, it took about 3 years to come through. Yes balancing is a problem. They use Bluetooth and there is an RGB light in each dice and there is a super cap inside to run it. Each dice takes about ten seconds to charge for 2 hours play. It uses an accelerometer to measure the orientation, and you can get shells for solids other than cubes for more number ranges up to 10.
Current with a 30% discount.

Or there is my static dice game, which is not about rolling them but placing them in a sort of Nim game. They are detected by hall effect sensors in the base of the box and magnets as the spots. Full details, software and video here:-
Arduino Dice Game

Hey thanks for sharing. I saw your video during my research. Very cool to see all the wireless dice projects. I also saw that GoDice kick starter and others awhile back and likely inspired me to give it a college try but took a long break. Fast forward to now.. i was bored and needed a fun late night project.

It would have easily been cheaper for me to just buy something like that for $100+ as i have been buying many different components which add up over many trial and many many errors.

I guess i was looking for a very DIY project to learn and understand. Which worked and was fun to tinker with. I may just end up buying an already made product so i can appreciate all the work that was put into it but for now, complete DIY is my goal. Money is part of the problem but learning and understanding is far superior.

Keep on posting and sharing. I appreciate it.