Buon pomeriggio,
premetto che non ho molta esperienza in MIT, stò cercando di realizzare un'applicazione ad uso privato, ho impostato tutto ora però sono arrivato ad un punto di stallo :
praticamente dopo aver scelto il tipo di materiale, la potenza e lo spessore della lamiera premendo il tasto calcola mi dovrebbe restituire un valore, il punto è che ci sono 20 spessori, 4 materiali e 10 potenze diverse, qualcuno può aiutarmi?
Grazie
use lists to store the different values of thickness, material and power
Taifun
Hello and tnanks fast response, help me build the blocks, there's too much info and I don't know where to start
How does the calculation work?
Please provide some examples, for example if we choose
- Carbon Steel, 1000W, 3.00 mm
- Brass, 2000W, 5.00 mm
For the calculation it would be easier to use only integer values without measuring unit, i.e. 1000 instead of 1000W or 4 instead of 4.00 mm
Also please switch the language to English before taking a screenshot next time
Taifun
I suspect there is a table with rows and columns behind this problem.
Maybe only certain combinations are allowed?
Practically the application does not have to do calculations but rather return a certain value, depending on the 3 choices it must write the value as the following table
an aia file for me?
Sorry but I have the problem with MIT block
one solution would be to store the data in the local sqlite database in a table, which could have the following columns
Material, Thickness, Power, Speed
Carbon steel, 1, 500W, 7.0 - 9.0
Carbon steel, 1, 1000W, 8.0 - 10
...
To get the result, you would send a select statement to the database like this
SELECT Speed FROM myTable
WHERE Material = 'entered Material'
AND Thickness = 'entered Thickness'
AND Power = 'entered Power'
to access the local sqlite database you have to use an extension, for example this one App Inventor Extensions: SQlite | Pura Vida Apps
Of course there are also other approaches, let's see what others suggest...
Taifun
You could "flatten" your spreadsheet table (no merged columns/rows) and use gviz to query your selections....
I don't know where to start
start with the tutorials...
A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you...? .
Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
I see this as a 5 column table:
- Material
- Thickness
- Watts
- minimumSpeed
- maximumSpeed
Save this as a csv file in the Media folder, for load at Screen1.Initialize time.
Load 3 List Pickers with the values from the first 3 columns, and use their Selections to feed this block that will return the row you want.
Select items 4 and 5 from the returned row to get your min and max.
Start by typing those values into a spreadsheet.
Google Sheets is free .
Can you give me an example? Both with blocks and with Google Sheets?
are you here to learn how to create this app yourself or are you here to get the solution (aia file)?
it is very unlikely that someone spends time to provide a complete solution for you for free...
you probably like to pay someone to get a solution?
Taifun
Here's where it was, lots of answers to get compensation, no problem, how much do you need?
Start creating a Google Spreadsheet and enter your data in the following format using 5 columns. As example here are the first 3 rows:
Material, Thickness, Power, Min Speed, Max Speed
Carbon steel, 1, 500, 7, 9
Carbon steel, 1, 1000, 8, 10
Then provide a link to the spreadsheet here
The simplest solution will be a gviz solution then... the disadvantage is, it needs internet access...
Taifun
This is an old example of selecting rows of a table by column value:
However, the table was built in by blocks, which is okay for a tiny table, but a pain for a large table like yours.
Here is an example of loading a spreadsheet export as a CSV file from the Media folder.