ArrayArrayArray BrainModular BrainModular Users Forum 2014-07-12T11:17:18+02:00 https://brainmodular.org/forums/app.php/feed/topic/4468 2014-07-12T11:17:18+02:00 2014-07-12T11:17:18+02:00 https://brainmodular.org/forums/viewtopic.php?t=4468&p=29990#p29990 <![CDATA[display in Hexadecimal !]]>
Now I can display the RFID tag in HEX, just like on my phone !

Those RFID Tags will be used to change patches and preset in Hollyhock

CODE:

//////////////////////////// Array values &#40;INTEGERS&#41; to HEX commaText/////////////////////////          CONST MAX_ITEMS = 8;var ArrayIn, CommaOUT&#58; Tparameter;var SL1&#58; TstringList;/////////////////////////////procedure init;var i&#58; integer;                      begin                          SetModuleColor&#40;$808080+302060&#41;;     ArrayIn&#58;= CreateParam&#40;'ArrayIn', PtArray&#41;;  SetIsOutput&#40;ArrayIn,False&#41;; SetMin&#40;ArrayIn,0&#41;; setMax&#40;ArrayIn,MAXINT&#41;;  CommaOUT&#58;= CreateParam&#40;'CommaOUT',PtTextField&#41;;  setisINPUT&#40;commaOut,false&#41;;     SL1.create;                    END;//INIT///////////////////////////////////////////Procedure Callback&#40;N&#58;integer&#41;;                      var i, L&#58; integer; var s &#58; string; begin                                 if &#40;n=ArrayIn&#41;              then begin                                            SL1.Clear;               L&#58;= getLength&#40;ArrayIn&#41;;              if L< MAX_ITEMS          then begin            For i&#58;= 0 to L-1             do begin               s &#58;= IntToHex&#40;trunc&#40;getDataArrayValue&#40;ArrayIn,i&#41;&#41;&#41;;               SL1.add&#40;s&#41;;                                 end;                                                                 setStringValue&#40;CommaOut,SL1.GetCommatext&#41;;          end;                                         end;END;//CB////////////////////////////////////////Procedure Destroy;beginSL1.free;end;///////////////////////////////

Statistics: Posted by oli_lab — 12 Jul 2014, 11:17


]]>
2014-07-11T22:11:12+02:00 2014-07-11T22:11:12+02:00 https://brainmodular.org/forums/viewtopic.php?t=4468&p=29986#p29986 <![CDATA[display in Hexadecimal !]]>

CODE:

//////////////////////////////////////////////////////// Int to Hex ////////////////////////////////////////////////////////////////////////////////////////////////////////////// Paramters declaration//////////////////////////////////////////////////////var input &#58; Tparameter;var output&#58; Tparameter;//////////////////////////////////////////////////////// initialisation procedure//////////////////////////////////////////////////////procedure init;begin   input &#58;= CreateParam&#40;'input', ptDatafader&#41;; SetIsOutput&#40;input,false&#41;; SetMin&#40;input, 0&#41;;  SetMax&#40;input, 2048&#41;;                                 SetSymbol&#40;input,''&#41;; SetDefaultValue&#40;input,10&#41;; SetValue&#40;input,10&#41;; output &#58;= CreateParam&#40;'output',ptTextField&#41;; SetIsInput&#40;output,false&#41;; SetMin&#40;output,0&#41;;       SetMax&#40;output,100&#41;; SetSymbol&#40;output,''&#41;; SetDefaultValue&#40;output,10&#41;;                                                    end;                      // Global Variablesvar inval &#58; single;//////////////////////////////////////////////////////// Main Loop procedure//////////////////////////////////////////////////////Procedure Callback&#40;N&#58;integer&#41;;begin               inval &#58;= getValue&#40;input&#41;; setstringvalue&#40;output, IntToHex&#40;Trunc&#40;inval&#41;&#41;&#41;;end;

Statistics: Posted by caco — 11 Jul 2014, 22:11


]]>
2014-07-09T01:10:35+02:00 2014-07-09T01:10:35+02:00 https://brainmodular.org/forums/viewtopic.php?t=4468&p=29934#p29934 <![CDATA[display in Hexadecimal !]]> I know that one is a far cry, but would anyone had already made a script that translate decimal numbers into HEX?
I'm experimenting with RFID tags...

thanks

Olivar

Statistics: Posted by oli_lab — 09 Jul 2014, 01:10


]]>
BrainModular BrainModular Users Forum 2014-07-12T11:17:18+02:00 https://brainmodular.org/forums/app.php/feed/topic/4468 2014-07-12T11:17:18+02:00 2014-07-12T11:17:18+02:00 https://brainmodular.org/forums/viewtopic.php?t=4468&p=29990#p29990 <![CDATA[display in Hexadecimal !]]>
Now I can display the RFID tag in HEX, just like on my phone !

Those RFID Tags will be used to change patches and preset in Hollyhock

CODE:

//////////////////////////// Array values &#40;INTEGERS&#41; to HEX commaText/////////////////////////          CONST MAX_ITEMS = 8;var ArrayIn, CommaOUT&#58; Tparameter;var SL1&#58; TstringList;/////////////////////////////procedure init;var i&#58; integer;                      begin                          SetModuleColor&#40;$808080+302060&#41;;     ArrayIn&#58;= CreateParam&#40;'ArrayIn', PtArray&#41;;  SetIsOutput&#40;ArrayIn,False&#41;; SetMin&#40;ArrayIn,0&#41;; setMax&#40;ArrayIn,MAXINT&#41;;  CommaOUT&#58;= CreateParam&#40;'CommaOUT',PtTextField&#41;;  setisINPUT&#40;commaOut,false&#41;;     SL1.create;                    END;//INIT///////////////////////////////////////////Procedure Callback&#40;N&#58;integer&#41;;                      var i, L&#58; integer; var s &#58; string; begin                                 if &#40;n=ArrayIn&#41;              then begin                                            SL1.Clear;               L&#58;= getLength&#40;ArrayIn&#41;;              if L< MAX_ITEMS          then begin            For i&#58;= 0 to L-1             do begin               s &#58;= IntToHex&#40;trunc&#40;getDataArrayValue&#40;ArrayIn,i&#41;&#41;&#41;;               SL1.add&#40;s&#41;;                                 end;                                                                 setStringValue&#40;CommaOut,SL1.GetCommatext&#41;;          end;                                         end;END;//CB////////////////////////////////////////Procedure Destroy;beginSL1.free;end;///////////////////////////////

Statistics: Posted by oli_lab — 12 Jul 2014, 11:17


]]>
2014-07-11T22:11:12+02:00 2014-07-11T22:11:12+02:00 https://brainmodular.org/forums/viewtopic.php?t=4468&p=29986#p29986 <![CDATA[display in Hexadecimal !]]>

CODE:

//////////////////////////////////////////////////////// Int to Hex ////////////////////////////////////////////////////////////////////////////////////////////////////////////// Paramters declaration//////////////////////////////////////////////////////var input &#58; Tparameter;var output&#58; Tparameter;//////////////////////////////////////////////////////// initialisation procedure//////////////////////////////////////////////////////procedure init;begin   input &#58;= CreateParam&#40;'input', ptDatafader&#41;; SetIsOutput&#40;input,false&#41;; SetMin&#40;input, 0&#41;;  SetMax&#40;input, 2048&#41;;                                 SetSymbol&#40;input,''&#41;; SetDefaultValue&#40;input,10&#41;; SetValue&#40;input,10&#41;; output &#58;= CreateParam&#40;'output',ptTextField&#41;; SetIsInput&#40;output,false&#41;; SetMin&#40;output,0&#41;;       SetMax&#40;output,100&#41;; SetSymbol&#40;output,''&#41;; SetDefaultValue&#40;output,10&#41;;                                                    end;                      // Global Variablesvar inval &#58; single;//////////////////////////////////////////////////////// Main Loop procedure//////////////////////////////////////////////////////Procedure Callback&#40;N&#58;integer&#41;;begin               inval &#58;= getValue&#40;input&#41;; setstringvalue&#40;output, IntToHex&#40;Trunc&#40;inval&#41;&#41;&#41;;end;

Statistics: Posted by caco — 11 Jul 2014, 22:11


]]>
2014-07-09T01:10:35+02:00 2014-07-09T01:10:35+02:00 https://brainmodular.org/forums/viewtopic.php?t=4468&p=29934#p29934 <![CDATA[display in Hexadecimal !]]> I know that one is a far cry, but would anyone had already made a script that translate decimal numbers into HEX?
I'm experimenting with RFID tags...

thanks

Olivar

Statistics: Posted by oli_lab — 09 Jul 2014, 01:10


]]>