This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Vic's profile picture

Using ccSensors with inventorySensor and building a shop

Started by Vic, 13 August 2012 - 07:49 AM
Vic #1
Posted 13 August 2012 - 09:49 AM
Hello!

I have an idea I wish to share and hopefully get some proper input to get this started.

So the idea is; to build a shop with several trade-o-mat but show on a monitor above each of them the stock, type and pricing.

And this is possible with the recent update including ccSensors with the InventorySensor.

Since i'm pretty new to ComputerCraft i'm making a todo list what i should keep in mind to gets this working. Maybe i'm going to much into detail, as some things sound really logic. But I want to do this right and perhaps there are things i'm totally unaware of and are worth considering.
  • Each chest (connected to the trade-o-mat) has 1 sensor within exact reach, 1 computer, 1 sensor controller and 1 monitor
  • Program

Program contains the following steps
  1. Read sensor > grab data > split data into amount and type
  2. Show default text on monitor + amount and type and price, preferable connected above (OR read out the price from the trade-o-mat, so updating a price would only require to update the trade-o-mat, but maybe i'm asking too much of this ccSensors :-)
  3. Timer to update the details each x time (OR update on each purchase, but no idea if that is possible)

Please let me know what you think.
basdxz #2
Posted 16 August 2012 - 02:50 PM
I think you need a cookie?
ETHANATOR360 #3
Posted 25 August 2012 - 03:52 AM
this might be possible if your willing to put in the time and effort