-
Posts
21 -
Joined
-
Last visited
Recent Profile Visitors
342 profile views
danish_draj's Achievements

Seeker (1/7)
0
Reputation
-
@FrancescoDiMuro hi there, Actually im doing that because im using pressure sensor to detect pressure drop in my workplace. In the code above, i did a alarm where if pressure drop certain range, an alarm/sound would go off. I dont want it to go off whenever i hook it up to an empty chamber because this could indicate " False Alarm" for my program to alert that the pressure drop
-
Hello everybody, I had made a program and GUI where if I press the Read button, It will display the value obtained by a sensor in the GUI i had created. Can i know how to make the Read button to be automated to get the sensor value and how to disable the program for 3 mins and 5mins? #include "Support\CommMg.au3" #include <MsgBoxConstants.au3> #include <Sound.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 391, 177, 192, 124) $Label1 = GUICtrlCreateLabel("PRESSURE MONITORING SYSTEM", 8, 8, 373, 28, $SS_CENTER, $WS_EX_CLIENTEDGE) GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif") $Label2 = GUICtrlCreateLabel("READING PSI", 16, 60, 161, 17, $SS_CENTER, $WS_EX_CLIENTEDGE) $Input1 = GUICtrlCreateInput("", 16, 90, 161, 32, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_READONLY)) $Input2 = GUICtrlCreateInput("", 16, 122, 161, 32, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_READONLY)) GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif") $READ = GUICtrlCreateButton("READ", 216, 64, 147, 65) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $sportSetError = 0 Local $port = 25 _CommSetPort($port, $sportSetError, 9600, 8, "none", 1, 2) If $sportSetError <> "" Then MsgBox(262160,"Communication Error","Com "&$port&" Error"&@CRLF&"Comport List"&@CRLF&_CommListPorts(),0) Exit EndIf While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $READ READ_VALUE() EndSwitch WEnd ;MsgBox($MB_SYSTEMMODAL, "Title", _CommListPorts()) Func READ_VALUE() _Commsendstring("R") ;get value from Arduino Sleep(500) $datar = _Commgetstring() ;$datar = bits of arduino(total bits in Arduino = 10240)(this bits using got 8) ;MsgBox(0, "A", $data) $data = $datar*0.0049 GUICtrlSetData($Input1, $data) Local $min = IniRead("CDA range.ini", "MIN", "M_MIN", "") Local $max = IniRead("CDA range.ini", "MAX", "M_MAX", "") $path = @ScriptDir & "\alarm.wav" If Number($data) < Number($min) Then GUICtrlSetBkColor($Input2, 0xFF0000) GUICtrlSetData($Input2, "Pressure Low") _SoundPlay($path, 0) sleep(3000) _SoundStop($path) ;MsgBox(0, 0, "PRESSURE LOW") ;EndIf ElseIf Number($data) > Number($max) Then ;MsgBox(0, "", $max) ;GUICtrlSetBkColor($Input1, 0xFF0000) GUICtrlSetBkColor($Input2, 0xFF0000) GUICtrlSetData($Input2, "Pressure High") _SoundPlay($path, 0) sleep(3000) _SoundStop($path) ;MsgBox(0, 0, "PRESSURE HIGH") Else GUICtrlSetBkColor($Input2, 0x00FF00) GUICtrlSetData($Input2, "Pressure Good") EndIf EndFunc the coding The GUI i had created
-
Hi everybody, As what the above title says, Im actually using a pressure sensor to detect the current changes of the pressure inside the pipe at my work place. So im using a pressure sensor that connects an Arduino Uno that connects it to a computer, The Gui i had created is working and when well. But, I had an idea to make the Arduino sent me those data to my computer through wireless, So that I could walk around with it in my workstation area. Im thinking of using a Bluetooth device to connect to Arduino and let it transmit the data to the computer. What im asking is that, is there any reference coding or examples i could look up for bluetooth coding? Really appreciated if anyone could help me out on this.
-
danish_draj changed their profile photo
-
danish_draj reacted to a post in a topic: OutlookTools: Import/Export from/to iCal/vCard/CSV
-
hi everybodytoday i was going to try out doing a countdown timer codingwhere i saw a post about it, in the forumbut on that I could only see the post only involves minutes and seconds as countdown displayI try it out by adding the Hours as well, it works but at one point the GUI created do not show any number displaying for Secondshope you could take your time and see this problem.here's the code: #include <WindowsConstants.au3> Global $SS_CENTER, $_CompteArebour = 60000, $_Hours, $_Minutes, $_Seconds $_GuiCountDown = GUICreate ( "CountDown...", 700, 200, @DesktopWidth/2 -250, @DesktopHeight/2 -100, $WS_EX_TOPMOST ) GUISetBkColor ( 0xFFFF00 ) $TimeLabel = GUICtrlCreateLabel ( "", 35, -10, 480, 180, $SS_CENTER ) GUICtrlSetFont ( -1, 125, 800 ) GUISetState ( ) WinSetOnTop ( $_GuiCountDown, "", 1) $TimeTicks = TimerInit ( ) While 1 _Check ( ) Sleep ( 200 ) WEnd Func _Check ( ) $_CompteArebour -= TimerDiff ( $TimeTicks ) $TimeTicks = TimerInit ( ) Local $_HourCalc = Int( $_CompteArebour / ( 60 * 1000 ) ), $_MinCalc = $_CompteArebour - ( $_HourCalc * 60 * 1000 ), $_SecCalc = $_CompteArebour - ( $_HourCalc * $_MinCalc * 60 * 1000 ) ;$_MinCalc = Int ( $_MinCalc / 1000 ) ;Local $_MinCalc = Int ( $_CompteArebour / ( 60 * 1000 ) ), $_SecCalc = $_CompteArebour - ( $_MinCalc * 60 * 1000 ) $_SecCalc = Int ( $_SecCalc / 1000 ) If $_HourCalc <= 0 And $_MinCalc <= 0 And $_SecCalc <= 0 Then GUISetBkColor ( 0xFF0000, $_GuiCountDown ) GUICtrlSetData ( $TimeLabel, "Bye !" ) Sleep ( 1000 ) ; If @Compiled Then Shutdown ( 13 ) Exit Else If $_HourCalc <> $_Hours Or $_MinCalc <> $_Minutes Or $_SecCalc <> $_Seconds Then $_Hours = $_HourCalc $_Minutes = $_MinCalc $_Seconds = $_SecCalc GUICtrlSetData ( $TimeLabel, StringFormat ( "%02u" & ":" & "%02u" & ":" & "%02u", $_Hours, $_Minutes, $_Seconds ) ) If $_Hours =0 And $_Minutes = 0 And $_Seconds <= 10 Then Beep ( 1200, 100 ) GUISetBkColor ( 0xA093FF, $_GuiCountDown ) EndIf EndIf EndIf EndFunc ;==> _Check ( )
-
danish_draj reacted to a post in a topic: Smtp Mailer That Supports Html And Attachments.
-
danish_draj reacted to a post in a topic: Make Autoit to sent certain documents through Whatsapp
-
Hi Everybody, i have tried the _Excel_RangeFind code, and created a coding. but the coding i did is , it open the 1 Excel file and display the word i assign for the program to find . Rite Now i would like to know which/what coding or code that can make my program to scan multiple Excel Files and display the word i assign for the program to find. Immediate reply to this, would really be much appreciated. Pardon my English, Im still new to autoit btw
-
danish_draj reacted to a post in a topic: Open Excel files and display how many time this Word appears