[← Back to work](https://cheyuwu.com/work/)

Project archive



# Net Device - The Gambling Lamp



![Net Device - The Gambling Lamp](https://cheyuwu.com/static/img/mirror/c4cf889103bf.webp)



Client



Class Project, Net Devices, NYU IDM



Contents & work details



Client



Class Project, Net Devices, NYU IDM



## Project record



## Background







I’m fascinated by gambling concept, which depends on luck and we do not have control over it. Though most of the time it is a random event that it is theoretically equal possibility to get any result which might be good or bad. Some people believe that they are born with good or bad luck. So I start my idea with a gambling lamp, which is a lamp plus camera and three dices. If you want to change the brightness of the lamp, you have to roll the dice and the camera will pick up the number you get and sum them up to set the brightness of the lamp.







The original image is currently unavailable[Original image link ↗︎](https://netdevices.damnfinecupof.coffee/wp-content/uploads/2019/04/%E6%9C%AA%E5%91%BD%E5%90%8D%E4%BD%9C%E5%93%81-18-1024x738.png)Original Sketch -> Determine brightness based on gambling dice!







The original image is currently unavailable[Original image link ↗︎](https://netdevices.damnfinecupof.coffee/wp-content/uploads/2019/04/image-1024x744.png)Use open CV to detect signals and send to Max through osc







The original image is currently unavailable[Original image link ↗︎](https://netdevices.damnfinecupof.coffee/wp-content/uploads/2019/04/2019-04-25-11.25.41.gif)







Detecting dices with openCV







The original image is currently unavailable[Original image link ↗︎](https://netdevices.damnfinecupof.coffee/wp-content/uploads/2019/04/dicing.gif)







Rolling dice testing











The original image is currently unavailable[Original image link ↗︎](https://netdevices.damnfinecupof.coffee/wp-content/uploads/2019/04/2019-04-25-11.07.33-1024x645.gif)Sending signal in max through OSC



The original image is currently unavailable[Original image link ↗︎](https://netdevices.damnfinecupof.coffee/wp-content/uploads/2019/04/image-3-1024x559.png)Building simulation model in c4d



The original image is currently unavailable[Original image link ↗︎](https://netdevices.damnfinecupof.coffee/wp-content/uploads/2019/04/2019-04-25-11.25.41-1024x643.gif)



## 



## Multi-dice detection







After demoing in expo 74 science fair, I found that if I can only get total amount of the dice dots, it will be very boring and less control ability. Thus I play with contour detection. I grab out all the contours, make a masked image for each of them and count the dots inside each masked image. The result is great! There are some points worth mentioning – zero-dot areas and white area that are too big (over 1/20 of screen are width) e.g. the desk is hidden from the screen and data, which makes the dice control more stable.







The original image is currently unavailable[Original image link ↗︎](https://netdevices.damnfinecupof.coffee/wp-content/uploads/2019/05/2019-05-02-21.22.34.gif)







Update at 5/3 – individual dices recognition



The original image is currently unavailable[Original image link ↗︎](https://netdevices.damnfinecupof.coffee/wp-content/uploads/2019/05/2019-05-03-11.42.38.gif)







## **Physical Device**







I bought a lamp from Target and modified it by 110V-5V AC-DC transformer and NeoPixel light strip. The chip I use is ESP8266, which is a micro controller with Wifi module.







![Net Device - The Gambling Lamp](https://cheyuwu.com/static/img/mirror/5bebb95e30d6.webp)







Reform the lamp and replace







I use a dense version of neo pixel light strip, and use card board to make the inner layer.











![Net Device - The Gambling Lamp](https://cheyuwu.com/static/img/mirror/8b891eeb8c3f.webp)







Surround the LED in a cylinder to keep the light strip in the lamp







![Net Device - The Gambling Lamp](https://firebasestorage.googleapis.com/v0/b/wucheyu-portfolio.appspot.com/o/images%2FThe%20Gambling%20Lamp%2Fezgif-3-aea2af76b9bf.gif?alt=media&token=716ef989-682d-4112-a646-af700ccb985d)







Test Pattern - Cycling Lamp!!!!!







![Net Device - The Gambling Lamp](https://cheyuwu.com/static/img/mirror/c35bdbce8936.jpg)







Data Send to Adafruit.io







## Demo Video - The gambling lamp!











Connects to the external media service when you play.

[Open in a new tab ↗︎](https://www.youtube.com/embed/33aWO4FM4aI)



Exhibitions, research & collaborations

[Contact the artist](https://cheyuwu.com/contact?work=Net+Device+-+The+Gambling+Lamp&from=/project/-LdyUBwS620lJKwbIrBS/)



## Continue through the work



![Unleash the Future - n3xtcon brand design](https://cheyuwu.com/static/img/mirror/af7e4d0a4c08.webp)


06/2017 – 12/2017



### Unleash the Future - n3xtcon brand design

[https://cheyuwu.com/project/1](https://cheyuwu.com/project/1)



![NCTU Interactive Christmas Tree](https://cheyuwu.com/static/img/mirror/69deb9af2b73.webp)


12/2014



### NCTU Interactive Christmas Tree

[https://cheyuwu.com/project/-L3BB7yLee5Las43HMGh](https://cheyuwu.com/project/-L3BB7yLee5Las43HMGh)



![Interactive Household Electricity Data Visualization](https://cheyuwu.com/static/img/mirror/49805527b04b.webp)


03/2017 – 05/2017



### Interactive Household Electricity Data Visualization

[https://cheyuwu.com/project/-L3BF-Vyu4MIt4bQ_jDa](https://cheyuwu.com/project/-L3BF-Vyu4MIt4bQ_jDa)



1 / 0
