News Feed

Easy Time Card App – The paper time card alternative

Many offices today are still filling out paper time cards. Why you ask?

2018-03-06 11.12.29

  1. Nefarious software integration
  2. The learning curve
  3. Bugs or “features”

Almost everyone is guilty of it. Software products are designed to work with constant support resulting in monthly or yearly fees. Upgrades, server costs etc. But most people aren’t getting paid to figure out software. Many low skill employees can’t or drag their feet. They want the solution that stays the same. Not one that changes with the weather. As they sort through all the numerous buttons they passively fear that the next upgrade will change things and they will spend more time relearning. Barf.

 

But paper time cards suck!

Paper time cards take time to fill out. There is zero space to write. They get smudged and lost plus people have to hand deliver them back to the office. Someone needs to sort through them. It’s not really a great solution.

 

A better solution

For sale on google play store is the EASY TIME CARD APP. A compromise between the two.  This app is real easy. Two buttons to operate it and if the setup is too hard someone else can do it once and its done. Right is a screen shot from the main screen of the app. You can see the current day being shown as clocked in at the top.

 

At the bottom, when the user is ready to clock out just press the big red button.

 

When the user is ready to report their time they can press the button on the bottom  labeled report time. This send the time card over in an easily readable email without any work.

 

 

2018-03-06 10.57.43

Here you can see the email which is automatically made after the user clicks the “Report Time” button.

It super clear and easy to read. It tracks starting and ending times as well as total work times.

As workers go from job to job they can track how much time they are spending at each location or task.

Best of all the records can be emailed to three people. So now that single time card can be reviewed and saved digitally.

Workers are still on the honor system because these time card emails can be edited manually. This is helpful is you make a mistake and forget to clock in. Simply type in a note on the email or change a start time.

Most importantly this is something 99% of people already know how to do. This app isn’t trying to change your life. Its simply the exact same paper time cards you have relied on in a digital format!

 

Powered by WPeMatico

Easy Time Card

Many offices today are still filling out paper time cards. Why you ask?

  1. How nefarious software integration is
  2. The learning curve
  3. Bugs or “features”

Almost everyone is guilty of it. Products are designed to work with constant support resulting in monthly or yearly fees. Upgrades, server costs etc. But most people aren’t getting paid to figure out software. They want the solution that stays the same. Not one that changes with the weather. As they sort through all the numerous buttons they passively fear that the next upgrade will change things and they will spend more time relearning. Barf.

 

But paper time cards suck!

Paper time cards take time to fill out. There is zero space to write. They get smudged and lost plus people have to hand deliver them back to the office. Someone needs to sort through them. Its not really a great solution.

 

My Solution

A compromise between the two.  This app is real easy. Two buttons to operate it and if the setup is too hard someone else can do it once and its done. Below is a screen shot from the main screen of the app. You can see the current day being shown as clocked in and below. When the user is ready to clock out just press the big red button. When the user is ready to report their time they can press the button on the bottom  labeled report time.

 

Here is the main activity below which is android class that you build your app around. Here there are a few boilerplate function to get the app onto your screen and a few more to to make dates, times or save files to your device.

This UI of this app is built within the Fragment and Dialogue Fragment classes within android library which is conveniently optimized with android studio which has great autocomplete.

Me thinking about autocomplete. Colorized. Circa 1999.

The main design of this app relies on java calendar. By using the calendar .get instance I can pull a number of int objects representing the minute, hour, day, week or month of the year. In order to build this app I created a listview showing the previous data.

I have several onClick methods calling my different methods throughout the fragment class I created.

 @Override
public void onClick(View view) {

switch (view.getId()){

case R.id.clockIn_Out_button:

if (CURRENT_STATUS.equals(CLOCKED_IN)) {

clockOut();

} else { clockInFromClick(view); }

break;

case R.id.report_button:

deleteOldData();

boolean infoToReport = createReport();

if (infoToReport) {
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("message/rfc822");
i.putExtra(Intent.EXTRA_EMAIL, recipientOfEmail);
i.putExtra(Intent.EXTRA_SUBJECT, subjectOfEmail);
i.putExtra(Intent.EXTRA_TEXT, bodyOfEmail);

try {

startActivity(Intent.createChooser(i, "Send email..."));

} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(getActivity(), "No email Client installed", Toast.LENGTH_LONG).show();
}

}else if (reportErrorExplain.equals("You must fill out your name in settings") || reportErrorExplain.equals("You must fill out an email recipient in settings")) {
Toast.makeText(getActivity(), reportErrorExplain, Toast.LENGTH_SHORT).show();

new Handler().postDelayed(new Runnable() {
@Override
public void run() {
((MainActivity)getActivity()).loadSettingsFrag();

}
}, 2000);

}
else {

Toast.makeText(getActivity(), reportErrorExplain, Toast.LENGTH_SHORT).show();
}

toReport.clear();

clearScreen();

break;

}

}

My big mistake was not breaking down the data processing into smaller more usable methods. Instead I ended up with two lengthy methods for pulling data from the device and making a human readable list. One of these methods serves the device users list. The other serves a method which creates the email to be sent. See below!

<pre>
public void createList()
{

    eachDaysData = new String[20];
   String s;
   String[] d = new String[20];



    for (int i = 0; i < 20; i++) {


       s = ((MainActivity)getActivity()).createCalendarDate(i);

        //Log.i("createdates: ", s);

        d[i] = ((MainActivity)getActivity()).getData(s);      //at this point d has each days raw data



    }


    for (int i = 0; i < d.length; i++) {

        if (i == 0 && CURRENT_STATUS.equals(CLOCKED_IN)){
            String q = ((MainActivity)getActivity()).createCalendarDate(i);
            eachDaysData[i] = q + "\n" + "CURRENT STATUS: CLOCKED IN";
        }


        else if (!d[i].equals("")){

           String min = "";
           String myHr = "";
            String prevHour = "";
            String prevMinute = "";
            String startTime = "";
            String endTime = "";
            String timeWorked, timeBreaked;
            int pHr,pMt, Hr, Mt;
            int cumHrW = 0;
            int cumMinW = 0;
            int cumHrB = 0;
            int cumMinB = 0;
            String currLoc ="", nextLoc ="";

            boolean inEvent = true;

            Log.i("createList: ", d[i]);

            String[] e = d[i].split(DELIM_O);    //e[0] = "clockedin_13_53, e[1] = "clockedout_13_53

            for (int j = 0; j < e.length; j++) {

               String[] p = e[j].split(DELIM_I);  //p[0] = clockedin p[1] = 13 p[2] = 53 p[3] = "some location"

                if (p.length == 4) {

                    addToRecentLocations(p[3]);
                   // Log.i("location found", "true");
                }

                if (startTime.equals("")) {                                                        //this does start time

                    String marker = "am";

                    int t = Integer.valueOf(p[1]);
                    if (t > 12){  t+= -12; marker = "pm"; }
                   myHr = String.valueOf(t);

                    t = Integer.valueOf(p[2]);
                    if (t < 10){min = "0" + String.valueOf(t);}
                    else {min = String.valueOf(t);}


                    startTime += myHr + ":" + min + marker;
                }
                if (j == e.length-1){                                                               //this records endtime


                    if (p[0].equals(CLOCKED_IN)){



                    }else {


                        String marker = "am";

                        int t = Integer.valueOf(p[1]);
                        if (t > 11) {
                            marker = "pm";
                        }
                        if (t > 12) {
                            t += -12;
                        }
                        myHr = String.valueOf(t);

                        t = Integer.valueOf(p[2]);
                        if (t < 10) {
                            min = "0" + String.valueOf(t);
                        } else {
                            min = String.valueOf(t);
                        }

                        endTime += myHr + ":" + min + marker;

                    }

                }



               if (j != 0) {

                 //  Log.i(TAG, "createList: " + prevHour);
                 //  Log.i(TAG, "createList: "+ prevMinute);
                 //  Log.i(TAG, "createList: " + p[1]);
                 //  Log.i(TAG, "createList: " + p[2]);


                   pHr = Integer.parseInt(prevHour);
                   pMt = Integer.parseInt(prevMinute);
                   Hr = Integer.parseInt(p[1]);
                   Mt = Integer.parseInt(p[2]);

                   if (!inEvent) {

                       cumHrW += Hr - pHr;

                       cumMinW += Mt - pMt;
                   }else {
                       cumHrB += Hr -pHr;
                       cumMinB += Mt -pMt;

                   }


               }


                prevHour = p[1];
                prevMinute = p[2];



                inEvent = !inEvent;

            }

                   //this is where we put what we figured out into text

            if (cumMinW > 60) {

                cumHrW += cumMinW /60;
                cumMinW = cumMinW%60;
            }else if (cumMinW < 0 ){
                cumMinW = -cumMinW;
                cumHrW =cumHrW - 1-( cumMinW/60);
                cumMinW = 60 - cumMinW%60;
            }


            if (cumMinW < 10){min = "0" + String.valueOf(cumMinW);}
            else {min = String.valueOf(cumMinW);}

           timeWorked = " " + String.valueOf(cumHrW) + ":" + min + " Total Time Worked";

            if (cumMinB > 60) {

                cumHrB += cumMinB /60;
                cumMinB = cumMinB %60;
            }else if (cumMinB < 0 ){
                cumMinB = -cumMinB;
                cumHrB = cumHrB- 1 -(cumMinB /60);
                cumMinB = 60 - cumMinB%60;
            }

            if (cumMinB < 10)
            {min = "0" + String.valueOf(cumMinB);}
            else  {min = String.valueOf(cumMinB);}
               timeBreaked = " " + String.valueOf(cumHrB) + ":" + min + " Total Breaks ";

            String q = ((MainActivity)getActivity()).createCalendarDate(i);

            Log.i("createList: ", q);

            eachDaysData[i] = q + "\n" + startTime + " - " + endTime + " Start and Finish" + "\n" + timeBreaked + "\n" + timeWorked;



        }else  {


           String q = ((MainActivity)getActivity()).createCalendarDate(i);

            eachDaysData[i] = q + "\nNo work performed";


        }

    }



}

After all said and done though its working perfectly. I’m debugging it now and tracking time on my different projects. My pan is to release it on google play store and maybe figure out a way to market it a bit better than just waiting for people to search it.

 

The post Easy Time Card appeared first on SignalHillTechnology.

Powered by WPeMatico

Foot Candle Light Meter

The foot candle light meter is one of the first apps developed. Very simple yet handy for construction professionals.

Most, if not all, smartphones have an ambient light sensor which is used to control screen brightness. This hardware is designed and programmed by the manufacturer. So its very hard for me as a consumer and developer to analyze the accuracy of these devices. After all, the hardware interacts with the android system and I am served up with a number defined as lux which is an SI unit.

In order to make this app work I used Java and a lot of the boilerplate code needed for android.

But in essence the app boiled down to a single method.

 

Does it get any easier. No, its as close to the “Hello World” of scientific apps as you can get. However it does serve a purpose for the consumer.

 

Building codes throughout north america use foot candles as a measure of describing illumination. Although antiquated everyone still uses it and many product labels and building codes are described in foot candles. This app allows the average person to make a fairly accurate approximation about their existing lighting or where their lighting needs to be for the task required.

Above you can see the layout is simple. That’s the foot candles on my office desk with the lights on full blast!

 

The post Foot Candle Light Meter appeared first on SignalHillTechnology.

Powered by WPeMatico

Commercial property construction as an investment

 

When performing construction work to a commercial property it only makes sense to consider these expenses as an investment.

  • Will that investment pay off?
  • Are there other, better, investment opportunities?
  • Will I be able to get this same work later for more or less expense?
  • Will delaying this work accrue extra damages if not performed promptly?

 

These are some of the important questions a property owner needs to consider. At soco construction your concerns make a lot of sense. Many contractors will explain that investing in your building is always a good idea. But I would like to talk about why this is not necessarily true. To break this down better lets divide this discussion up into three major factors affecting your work.

  1.  The scope of work
  2. The quality of the work
  3. When and how fast

 

The scope of work is a key consideration. If you are a an end user the scope of work might be dictated by the business. But that doesn’t mean you can’t save money! Frequently innocent and relatively small architectural mistakes lead to big cost increases. If your project is over 50 thousand dollars in size and you don’t have a contractor you use regularly it would be wise to pay a contractor for a constructability review. A few hundred dollars could save you thousands down the road. Furthermore it may be wise to pay a consultant for a price estimation on the plans. Often times contractors will submit very different prices. However after choosing the less expensive option a customer can find out that a major scope of work was left out and that cheaper option was actually more expensive and less experienced! Lastly if you are a landlord or other type of non end user you have greater simplicity and flexibility. Most tenants prefer core building features such as electrical systems and high security doors to be functioning. They would also typically prefer a credit for the cost of painting the building to do with as they please than to have the building painted.

 

Secondly is the quality of the work. This is a double edged sword as I will explain. Frequently customers will focus on an end product with little concern for sustainability. For example installing an expensive tile over a terrible substrate. The install will look poor and will fail very soon only to be redone at a greater cost. It would have been better to pay twice as much for a job that would last 10 times as long. Or building an expensive new office around a failing electrical or plumbing system. In these examples the customer will achieve short term results but will pay a far greater cost in the long term. The other side of this is putting too much money into something that nobody cares about. To rehash the tile example someone once paid soco construction to install a very expensive tile in a not so great warehouse office despite our suggestion of a sealed concrete floor. The tenants moved in and filled the office with boxes and furniture and there it sits completely covered up. Frequently fixtures and finishes used by tenants will be quickly worn down. Time and time again customers request expensive commercial toilet paper dispensers and paper towel dispensers. But after the lease is expired I come back to find them all broken and the paper products resting on the fixtures. Why not install the simpler cheaper and more attractive versions? For most people they just don’t know any better.

Lastly is when and how fast. Unfortunately the best time to invest in your building is also the best time not to invest in your building. When rents are high and opportunity seems abundant contractors are busy and expensive. When work is slow for contractors it benefits both you and the contractor to keep a steady work flow. Prices are lower and availability is better. However it is during these times that you can frequently make good investments in other property or the the stock market for example. Don’t just invest in your property without thinking. If your money can be put to use elsewhere do it. Wait until the timing is right. Also there is a certain value to be had by planning ahead. Many people will wait till the last minute to contact someone about their project. Then they will set moronic bid dates that squeeze everyone’s time or make unreasonable deadline for finishing the project and therefore drive up the price. Now obviously, there may be other financial circumstances driving these decisions. But countless times customers call and ask for some arbitrary work to be done right away or in a meeting a group of corporate executives will sit there and talk about the project for 3 months and they pay through the nose during the 3 months of construction timeline as everything is rushed to the job instead of working themselves harder to make decisions in the first month and give the contractor 5 months. It benefits the customer to call early and ask the contractor for a price and let them know there are no major time constraints.

Powered by WPeMatico

Crossfit Gym Construction

This was a gym construction in which I did the majority of the work and the owner pitched in or used friends for certain things he could get done at the friend price.

Here is a picture of day 1. Someone else did the demo and we just showed up to take a look around.

building a gym

building a gym

Our starting point was to get some underground plumbing done. We had an existing nearby restroom and are merely moving it over about 25 feet.

building a gym

building a gym

We had to relocate some mechanical lines. Material was delivered right away as well.

building a gym

building a gym

Here we had some windows being covered by a wall. So we painted some drywall black and attached it into the window frame to obscure the view from outside.

blacking out window with drywall gym construction

After we reworked the mechanical and poured the underground we started framing.

gym metal stud framing

gym metal stud framing

gym construction metal stud demising wall

 

Here the panel has a bunch of new electrical runs hanging from as we still work.

gym construction electrical

After we double drywall and insulate we are spraying some texture. Some walls are fire tape only because they will be covered with wood.

gym construction drywall texture

Rear wall fire tape

 

Don’t forget to patch the roof!

crossfit gym construction roof patch

The owner and his buddies put in a lot of the finishes such as the high bay lighting, the foil, the paint and the wood. Which is fine with me. Here is the finished product. I think it looks great.

gym construction complete

gym construction complete

 

gym construction complete

gym construction complete

 

 

Powered by WPeMatico

Waterproofing second floor restroom

2016-06-24 13.40.45

This job was in Carson a. A customer from a previous job asked me to waterproof a new bathroom installation because of a leak that had gone into the IT room below.

Whenever someone installs a toilet there is a question of whether to caulk or silicon around the base. Here is my two cents. On a first floor concrete installation you should always caulk or silicon around the base of the toilet. This isn’t necessary but it looks nicer and if the ring ever fails you have a second line of defense.

On a wooden sub floor you should never caulk or silicone around the base because if the ring fails water will be trapped and hidden in the sub floor and will cause damage even if there is water proofing. End rant.

2016-06-24 12.59.43

On this job there was a lightweight concrete deck on top of a plywood sub floor. In order to water proof this we used a product called hydro ban. Hydro ban will waterproof a solid surface by merely painting it onto the surface. Judging by the condition of the existing concrete I could determine there was no cracking or deflection in the floor. If the floor is flexing this need to be corrected before attempting to waterproof.

2016-06-24 12.57.55

A plumber had just installed floor drains before we came. It was obvious that any water leakage was around the toilet flange or where the floor meets the wall as naturally there is a small seam at these points. We used a cloth fabric designed for water proofing to cover these points plus the new floor drain and create a completely solid surface to water proof. Then we gave the floor two coats of water proofing material.

Now all the need to be done is too make sure the tile installers do no carelessly or purposely scratch the floor when installing the tile.

This method will stop minor flood or leaks. Obviously if water runs out from the restroom into the hallway the water proofing stop at the threshold of the restroom door.

2016-06-24 13.42.52

Powered by WPeMatico

Rain water leaking into side of building

This warehouse is built against a small hill. As you can see in the pictures there are existing rain gutters that run into a concrete v gutter. This is how the water is supposed to tun away from the building. However you can clearly see that soil erosion keeps falling into the gutter and blocking the path of the water attempting to flow away. The long term effect is water pooling along he v gutter and flowing into the space between the building and the hill.

This warehouse is built against a small hill. As you can see in the pictures there are existing rain gutters that run into a concrete v gutter. This is how the water is supposed to tun away from the building. However you can clearly see that soil erosion keeps falling into the gutter and blocking the path of the water attempting to flow away. The long term effect is water pooling along he v gutter and flowing into the space between the building and the hill.

This is the hill funneling all water towards building.

 

rain water intrusion

This downspouts is buried under dirt.

 

Here you can see the gutter and downspouts

 

For whatever reason the owner did not like my suggestion of removing the tree replanting Ivy and building a new curb and gutter. But this was an expensive route so I understand their concerns. My second suggestion was to seal the existing concrete as best as possible and to focus on diverting the water away from this area. The roof drains from this 20+ square foot building all drained into this narrow corridor and essentially had nowhere to go.

The water from the hill was minimal so I focused on a solution that relieved a majority of the problem in an attempt to comprise the budget and the objectives.

sealing water intrusion

The application above is a typical roofing cement. Its not a great solution because even though we injected it into the cracks there will be future movement that will open them back up. But this was a cheap stop gap measure.

Secondly we installed the following.

commercial rain gutters

These are irrigation pipes with custom sheet metal spouts covered by a 1/4 inch screen. These are not pretty by any stretch of the imagination but they serve two purposes. The first is the sloped rain head with the screen allows leaves to flow right off the top and it prevents clogging which is a problem at this address. Second, the piping at the bottom can be run a long distance before draining to a location where it cannot be blocked by soils from the hill.

rain gutter distance run

rain gutter distance run

As you can see every drain or scuppers dumps into this piping system which is secure from clogs.

Finally below you can see a painted section of the gutter where the pipes carry the water far away from the building where it should have been running in the first place.

rain gutter

rain gutter

 

Powered by WPeMatico

CNC Plasma Torch and Laser Diode

Here is the video I talk about my plasma cutter

This video is great for instruction but has no video of plasma cutter working

Truthfully after i did the test cuts, and forgot to video them I put my plasma cutter assembly away and haven’t had a chance to use it again. If you are looking to cut steel you can order a cheap plasma cutter for less than $300 on the internet.

CNC plasma cutter

These supposedly pull 20 amps and I haven’t checked but its thrown every 20 amp breaker I’ve tried it on. I ended up wiring a 30 amp breaker to two outlet to supply.

You will have to custom build a method to turn the plasma on and off but this is fairly simple. The only extra advice I have is to make sure your whole system is grounded and to put your power, on/off relay connection and computer cables through ferrite cores. Because the plasma cutter will generate generic radio frequency style interference it can actually disable your computer. The computer case itself if properly grounded and kept away from the plasma cutter will help. The ferrite cores will stop the plasma cutter and computer cords from acting like broadcasting or receiving antennas.

ferrite cores for CNC

 

I cut out some ninja stars

 

Laser Diode

The laser diode is very easy. It uses the regular 120v power relay like all the other tools and can cut or burn depending on what you need.

Here I cut out a storm trooper stencil. Black paper works best as the light cannot escape and become heat.

storm trooper stencil

 

The post CNC Plasma Torch and Laser Diode appeared first on SignalHillTechnology.

Powered by WPeMatico

CNC milling with router

Here is my video with general info

 

For my milling set up right now I’m using a 2 horsepower harbor freight router with the harbor freight speed control. Its definitely on the cheapest end of the setup but so far I am moving forward nicely.  This whole setup is basically operated with a relay controlled by the mach 3 system. I have to adjust my speed between 18k and 28 manually and I had to make these measurements manually with a tachometer and then draw them into my adjustment knob with a marker!

Wood Milling

Wood working is done on my vacuum table. Here you can see me making some stuff with my new router holder. The vacuum table is super easy to make and I wont go into it. Im ordering some really nice $30 dollar bits from amazon.com and they cut through wood like a hot knife through butter.

CNC Vacuum table

Aluminum Milling

Here is my machine milling some aluminum to make the holder from the video above.

As you can see I have a sump pump pumping cooling fluid onto the bit as it works. Also you will notice that there was massive water spraying everywhere. I have remedied this since then by building walls onto the box containing the vice.

CNC milling Box

The inside of the box is painted with red guard which is a waterproofing for showers. The bit stayed ice cold despite slow movement of tool tip and 28k RPM spindle speed.

Here is the finished product below. Not up to the standards of a large machine shop but that cuts looks fairly decent to me.

CNC milled aluminum

 

 

The post CNC milling with router appeared first on SignalHillTechnology.

Powered by WPeMatico

Building the 3D Printer Temperature control from an arduino prototype

So I decided to build my own temperature control unit. Here is my, Errrr masterpiece.

3D printer temperature controller

 

Here is the layout of my circuit board.

3D Printer Temperature Control Circuit

This layout above doesn’t show some things on my board like my voltage regulator for 5v power or my electrolytic and ceramic capacitors plus inductor for decoupling. I realized I needed those after I had mounted all this. YIKES!!

soldering the build

 

My micro controller has 3 tasks on a continuous loop.

1- Check the temperature of the thermistor

2- Use a mosfet and pwm to adjust the heating element

3- Check a potentiometer to determine user input of target temperature

4- Update the screen

 

Here is my current code. I plan on changing it in the near future but even if I forget this may help someone get a bit closer in the right direction

// include the library code:
#include <LiquidCrystal.h>
#include <SmoothThermistor.h>
#include <PID_v1.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
SmoothThermistor smoothThermistor(A0,
 ADC_SIZE_10_BIT,
 100000,
 100000,
 3950,
 25,
 10);

 
double actualTemp;
double detectedTemp;
double outputPWM;
 double desiredTemp;
 long previousMillis = 0;
 long interval = 1000;
int mosfetPin = 6;

PID myPID(&detectedTemp, &outputPWM, &desiredTemp,2,7,1, DIRECT);




void setup() {
 // put your setup code here, to run once:
 
 //some communications crap
 Serial.begin(9600);



 //thermistor
 

 //mosfet controll
 pinMode(mosfetPin, OUTPUT);


//PID 
myPID.SetMode(AUTOMATIC);

 // LCD set up
 lcd.begin(20, 4); // this is setup nt line selection
 lcd.print("Temperature is : ");
 lcd.setCursor(0,2);
 lcd.print("Target Temp set at : ");

 
 

}

void loop() {
 // put your main code here, to run repeatedly: 

 unsigned long currentMillis = millis();

if (currentMillis - previousMillis > interval)
{
 previousMillis = currentMillis;
 
 smoothThermistor.temperature();
 detectedTemp = smoothThermistor.temperature();

 //create an average to display and run off of
 averageTemp();
 
 
 //Read Desired Temperature
 tempReading(); 


 
 

 
 // set the cursor to column 0, line 1 
 lcd.setCursor(0, 1);
 //show current temp 
 lcd.print(actualTemp);

 lcd.setCursor(7, 1);
 //show current temp 
 lcd.print("C");

 //attempt to adjust temp
 adjustTemp();



}

 
}

void adjustTemp()
{

if (desiredTemp > (detectedTemp + 15))
{
 analogWrite(mosfetPin, 255);
 lcd.setCursor(9, 1);
 lcd.print("high");
 


 
}

else if (desiredTemp < (detectedTemp -3))
{
 analogWrite(mosfetPin, 0);
 lcd.setCursor(9, 1);
 lcd.print("-off");
 
 


}
 
else
{
 myPID.Compute();
 //Serial.print("PID # : ");
 //Serial.println(outputPWM);
 analogWrite(mosfetPin, outputPWM);
 lcd.setCursor(9, 1);
 lcd.print("-PID");
 

}
 
}

void tempReading()
{
 int value = analogRead(A1);

 //Serial.print(value);

 value = map(value, 0,1023, 25, 250);

 desiredTemp = value;

 

 if (value > 99)
 {
 lcd.setCursor(0, 3);
 lcd.print(value);
 }

 if (value < 99)
 {
 lcd.setCursor(0, 3);
 lcd.print(0);
 lcd.setCursor(1, 3);
 lcd.print(value);
 }

 lcd.setCursor(5, 3);
 lcd.print("Celcius");
}




void averageTemp()
{ 
 // Serial.print("actual temp 1 ");
 //Serial.println(actualTemp);
 if (actualTemp < 10)
 {
 actualTemp = detectedTemp;
 //Serial.print("actual temp 2 ");
 // Serial.println(actualTemp);
 }
 
 double temp = actualTemp + detectedTemp;

 actualTemp = temp/2;
 
 // Serial.print("detected temp ");
 //Serial.println(detectedTemp);
 
 //Serial.print("actual temp ");
 //Serial.println(actualTemp);
 //Serial.println(" ");
 // Serial.println(" ");

}

The post Building the 3D Printer Temperature control from an arduino prototype appeared first on SignalHillTechnology.

Powered by WPeMatico