2017년 4월 4일 화요일

About the amount of BUTTONs


I have many BUTTONs in one screen ( mostly hidden )
for now I got 43 BUTTONs ... and It's already hard to click the bar to choose one
and it still growing...

Is there any solution plz ?

--
Yes, use less buttons...  You should NEVER need that many buttons... You need to either consolidate your stuff, or determine a better way to do it.

What could you possibly need 43 hidden buttons on one screen for?

--
Instead of buttons, use a ListPicker to select.  One button, a list of options and yes you can have 43 buttons; do you need 100?  No problem... use a ListPicker.

or   use just a few buttons and use code to change their functions...possible but complicated.

--
Are these buttons arranged geometrically in rows and columns?
A canvas with a drawn grid might be simpler, using math to decide which cell was touched.

--
an easy app used for showing the important of a book ^^"

--
Could you give an example of that, Abraham? I have a lot of buttons myself (all hidden in rows, accessed via listpicker), and I am interested to know if your suggestion would be useful for me.

--
Here is a link to the doc I made for my implementation of the game Hidato.
https://docs.google.com/document/d/19QpYv2S8ptmSIBJ7ar--aFj3wUNc08RymHlyo-UbWng/edit?usp=sharing
Instead of a 12 by 12 array of buttons, I used a canvas for the board and sensed each touch's location to decide which cell is in play.
--
Use Abraham's suggestion.  TONS of buttons are very consumptive, and there's no reason to use 100 buttons when one control, a canvas, can do it all.

--
Is 36 buttons enough?      Here are 36 on a canvas.  At the moment, only the first 12 are "connected."   This method is a little awkward and not sure the increase in blocks offsets the savings in 'button' but here is one implementation.  Be the first to flesh-it-out by adding the rest of the button implementation (follow the pattern).    Or provide a more efficient algorithm.   I was nice to ya'll, there is an aia.

The secret is a 300 x 300 pixel canvas  and a grid image that is 300 x 300 pixels.


There is a PRIZE.    Winners get to post their implementation here and we all congratulate you.    The time is starting NOW!     Be the first.


--
Here's my solution :)
Snap to grid...
--
Interesting...
I have a question about something like this, but I'll move it to my own thread!

--
Impressive Scott.   This solution is incredibly creative...and done in less than an hour after contest start.  :)
The solution certainly reduces the required number of components and Blocks.    The number of warnings at first prevented loading the aia..eventually 
the aia loaded and I destroyed my now useless code.

This opens lots of doors.    A practical date picker?      A telephone keyboard?    A checker board?    I must have missed something by not  ever coding games.

Thank you Scott.    I would make the award, but  I hope there are more entrees.   There has got to be some more creative ways to do this.

So far, well done.

--
It might be possible to use just one button for each row and change the text of the buttons and images on click.  Consolidate and simplify with logic.  If button1 text = button1 then do this else if button1.text = button2 then do this.

--
The next question would be how to execute blocks depending on the 'button' pressed as you don't have 36 button Click blocks to handle each button.
A very long if then else-if...else?
A lookup table of some sort?
It would be nice if some common blocks could be used along with the index of the button.

--

HC-06 hc01.comV2.0


HC-06_hc01.com_02_800
ZS-040_HC-06_hc01.comV2.0
The latest zs-040 HC-06 modules have an updated firmware, hc01.comV2.0. This firmware has the following defaults:
– baud rate = 9600
– password = 1234
– nl/cr line endings not required.
– AT commands are required to be in upper case
– Firmware version = hc01.comV2.0
– Name = HC-06
– No parity
– SLAVE mode
Since the Bluetooth hardware is the same as the previous zs-040 HC-06s the Bluetooth specs are also the same. Bluetooth 2.0 EDR, SSP.
These use a slightly different BT module than the other zs-040 boards and there is a blue LED at the top left of the daughter board.

LEDs

On these boards there are 2 LEDs. One red LED on the breakout board and a blue LED on the actual BT module (the small daughter board). The LEDs may seem to be linked but they are not. You can control the blue LED without affecting the red LED. See below.
When powered the LEDs flash quickly (I think the rate is 10 times a second) and the flash rate does not change when the modules are paired. When there is connection the LEDs change to constant on.

AT Commands

Replies do not contain end of line characters. This means when using a serial monitor everything appears on a single line. See the above screen shot.
Some of the basic AT commands are:
AT – connection test command. Returns OK
AT+BAUD AT+BAUD1 – sets the baud rate to 1200 and returns OK1200
AT+BAUD2 – sets the baud rate to 2400 and returns OK2400
Other possible baud rates are
1——— 1200
2——— 2400
3——— 4800
4——— 9600
5——— 19200
6——— 38400
7——— 57600
8——— 115200
9——— 230400
A——— 460800
B——— 921600
C——— 1382400
Be careful with speeds over 115200 when using a Windows computer.
AT+NAME Sets the name of the module. This is the name that is broadcast to other devices. Maximum length is 20 characters.
AT+NAMEmyBluetooth sets the name to myBluetooth, returns OKsetname
AT+PIN Changes the PIN/password.
AT+PIN9999 – changes the PIN to 9999, returns OKsetPIN
AT+VERSION
returns the firmware version – hc01.comV2.0
AT+LED turns off the on board LED. This is the blue LED on the small daughter board not the red LED on the larger breakout board.
AT+LED0 – turn off the blue LED, returns LED ON
AT+LED1 – turn on the blue LED, returns LED ON
AT+PN sets no parity
AT+PE sets even parity
AT+PO sets odd parity
The modules accept AT+ROLE commands but they don’t seemed to do anything.
AT+ROLE=S puts the module in to SLAVE mode, returns OK+ROLE:S
AT+ROLE=M puts the module in to MASTER mode, returns OK+ROLE:M
The commands are accepted and I originally thought this may mean the modules can be used as HC-05s but I get any of the usual HC-05 commands to work; ROLE, AT+ROLE, AT+ROLE=, AT+ROLE? doesn’t work.
ZS-040_HC-06_hc01.comV2.0_02
Chinese Data Sheet
English Data Sheet. A different firmware version is different but the commands are the same.
Waven product page. This shows a slightly different hardware version to the ones I have but the commands are the same.

app for sending 2 continuous serial data over bluetooth hc-06 from arduino uno


hello Google. here is my problem. i have 2 variables, "a" and "b". the code is simple as shown in the figure above. i want to display the output from that serial print to my android phone via bluetooth so i've made a simple app for that. the problem is now with my block. i don't know how to let my app determine which one is value of "a" and "b". in the end, both Label 2 and Label 5 end up displaying both number "a" and "b" the same time. i know the block program is not correct because i don't have enough knowledge when it comes to this matter. please help me. 

--
my bad. it's actually an app for RECEIVING 2 continuous serial data over bluetooth hc-06 from arduino uno.

--
refer to: Arduino and Bluetooth

Search for Help with spinner please


The spinner has several elements. The spinner is visible. On first selection ... Please focus your attention on spnDay.AfterSelection and spnMealType.
1) on the spinner I have a list of subjects for people to chose from, on the datapicker they choose the date they want and the timepicker they want to. 2) Then I have a Save button and ... the info that they have saved? Could somebody help me please, I have know idea what blocks to use or how to do it.
Can somebody please supply a link for me to learn about spinner please, I need to know how to specify what item was selected, and how to display ...
I want the Reserve button to store the information on what is put on the datepicker , spinner and timepicker by using a TinyDB. Could somebody please ...
But regarding to the spinner it might not be easy as it seems. ... In my case, when no item is selcted there will an alert "Please select an item.".
As i see if you add functions like the new spinner in old projects, it can't be loaded to Ai2 - test, at least for me, but i want to thank you a lot, the App ...
Please I just want a help with my application where it should be calculated based on the formula below. I don't know how to do if the weight is in kilograms or lbs. and in height how can i get if it is in cm or inches using the Spinner Block. Also I don't know if it will work together with the arduino to count ...
I understand how to create a list, how to use the spinner and seclection. I understand the result command also that once it is read it will come back with ...
Getting frustrated. I have this now, when I select a sound from the spinner I get unable to load 2 and unable to play 2 (number based on what one I ...
It seemed to be working properly until few day, but now when i use the spinner it looks like sometimes it work sometimes it doesn't. The problem is that ... To check it i used a notifier that After selection showed the selection. Sometimes the notifier pop up with the selection, sometimes it doesn't! Please help!
Good day Expert! I just wanna ask if theres any way to fire an after selecting event if i choose the same value of the past selection.?? Please help if u ...
Hi dears... I try order a spinner values from my Custom TinywebDB. but i can not do it. Please help me. TAG VALUES SAVED ...
First spinner is country list and second is year. and when user click the process button then the another screen will open. Please anybody help me ...
it works correctly(meaning the first spinner which I click). After that the else one clicked on doesn't work correctly. Would you, please help me to solve ...
please can you help me? I want to take text from text box insert it into TinyDB (I use text from textbox like a tag not like a value to store because that is better for me) and then I take text from DB and insert it into spinner. So but if I read ...
in Screen2 instead of using 50 checkboxes, you could have used a listpicker, listview or spinner... see the ... PS: next time please ask shorter questions... it there someone who likes to read such loooooong questions? also it might ...
I have a problem with the list viewer. I want to change the elements shown in the list viewer depending on the element selected in a spinner.
... when I select "dati21". I wish that every time that I choose from the spinner 12 or 21, the data appears on the listview ... someone please help me.
My question is I have a spinner with 6 selections and a signature pad they sign. Can someone please help me figure out how to save all this info and signature as an image. I'll need to access this info later to as I will be transferring it ...
Marco ... perhaps instead of using lots of labels you could use Lists, a ListVIew or Spinner or List Picker to view / use your data. Android ... If you need advice with a specific problem, please post an image (jpg or png); doing so helps us understand your issue better and someone might have a solution.