Posts | Comments

Planet Arduino

Archive for the ‘HTML’ Category

A good robot is always welcome around here at Hackaday, and Hackaday.io user [igorfonseca83]’browser-controlled ‘bot s is no exception. Felines beware.

[igorfonseca83] — building on another project he’s involved in — used simple materials for the robot itself, but you could use just about anything. His goal for this build was to maximize accessibility in terms of components and construction using common tools.

An Arduino Uno gets two D/C motors a-driving using an H-bridge circuit — granting independent control the wheels — an ESP8266 enabling WiFi access, with power provided by a simple 5V USB power bank. [igorfonseca83] is using an Android smartphone to transmit audio and video data; though this was mostly for convenience on his part, a Raspberry Pi and camera module combo as another great option!

A few workarounds notwithstanding — considering some components in this particular configuration do not directly connect to each other — a bunch of code, set up of a website to act as a controller that accesses the IP address of the ESP8266, and an app installed on the audio/video streaming smartphone later, and you have a cat-stalking robot ready to rock. There are, of course, other uses for fpv robots, but with arguably less entertaining results.

[via Hackaday.io and Instructables]


Filed under: Android Hacks, Arduino Hacks, robots hacks

IoT, web apps, and connected devices are all becoming increasingly popular. But, the market still resembles a wild west apothecary, and no single IoT ecosystem or architecture seems to be the one bottle of snake oil we’ll all end up using. As such, we hackers are keen to build our own devices, instead of risking being locked into an IoT system that could become obsolete at any time. But, building an IoT device and interface takes a wide range of skills, and those who are lacking skill in the dark art of programming might have trouble creating a control app for their shiny new connected-thing.

Enter Involt, which is a framework for building hardware control interfaces using HTML and CSS. The framework is built on Node-Webkit, which means the conventions should be familiar to those with a bit of web development background. Hardware interactions (on Arduinos) are handled with simple CSS classes. For example, a button might contain a CSS class which changes an Arduino pin from high to low.

Involt can take that CSS and convert it into a function, which is then sent to the Arduino via serial or Bluetooth communication. For more advanced functionality, Javascript (or really any other language) can be used to define what functions are generated — and, in turn, sent to the Arduino. But, all that is needed for the basic functionality necessary for many IoT devices (which might only need to be turned on and off, or set to a certain value) is a bit of HTML and CSS knowledge. You’ll create both the interface and the underlying hardware interactions all within an HTML layout with CSS styling and functionality.

While Involt isn’t the only framework to simplify hardware interaction (it’s not even the only Node.js based method), the simplicity is definitely laudable. For those who are just getting started with these sorts of devices, Involt can absolutely make the process faster and less painful. And, even for those who are experienced in this arena, the speed and efficiency of prototyping with Involt is sure to be useful.


Filed under: Arduino Hacks
Lug
30

New Generic EPiServer Page Type

C, EPiServer, Generic Lincoln University, HTML, qualifications Commenti disabilitati su New Generic EPiServer Page Type 


New Generic EPiServer Page Type

For you budding coders new or otherwise.

A simple piece of code which when its added to the load event of a EPiServer page can pull any variable from EPiServer or SharePoint using a HTML template with some tags embedded in it


EPiServer page templates in Visual Studio 2008



A bit of the HTML template. For example  the tags  labelled [sp:Title] with the value of a SharePoint variable called Title The same thing applies to EPI server values when a [es:TemplateFileName] tag is found its value is replaced with the EPiServer value for the page in question called TemplateFileName 

Here is the EPiServer page property setup for the course2014 page type. New property variable can be added here and displayed on a page without recompiling the whole website which improves the process with much lower technical risk and more flexibility, allowing user editing of the content in SharePoint and/or EPiServer as user currently do for any page  and allowing the developer to create rich web content and test it of line.

A side effect of this development will allow us to upgrade the new Quals pages so the actual content can be edited in the same way as any other EPiServer page 



A bit of the template file

<link rel="stylesheet" type="text/css" href="/QualsReform2014/Styles/coursereform2014.css" />
<script type="text/JavaScript" src="/QualsReform2014/script/coursereform2014.js"></script>

<div style="background:red">

     
    <div class="course_id_container">
        <h1><script type="text/JavaScript">CourseID('[sp:CourseCode]')</script> <script type="text/JavaScript">CourseDescription('[sp:Title]')</script></h1>
    </div>

    <div id="course_info">
     
        
        <div id="course_container">
           
              <br />
           
              
              <div id="course_desciption">
              <script type="text/JavaScript">Introduction('[sp:Introduction]')</script>
              </div>
           
              <br />
           

The C# code that loads and parses the HTML template and replaces the tags with values

            try
            {
                string filename = TemplateFileName;


                if (!File.Exists(filename))
                {
                    template.Append("Template file not found

"
 + filename + "
");
                    return;
                }

                string courseCode = Request[StructuredSearchController.CourseQueryID];

                if (courseCode == null)
                {
                    template.Append("Course code argument supplied is invalid
"
);
                    return;
                }

                if (courseCode.Length < 3)
                {
                    template.Append("No course code argument supplied
"
);
                    return;
                }

                myStructuredRecored = DynamicStructuredDataUtility.GetCourse(courseCode);

                if (myStructuredRecored == null)
                {
                    template.Append("Invalid course code supplied
"
);
                    return;
                }
           

                //Grab the template and do the work
                using (StreamReader sr = new StreamReader(filename))
                {
                   
                    while (!sr.EndOfStream)
                    {
                        string fline = sr.ReadLine();


                        //Handle SharePoint fields
                        int FSPfldi = 0;

                        int SSPfldi = fline.IndexOf("[sp:", FSPfldi);

                        while (SSPfldi > -1)
                        {
                            FSPfldi = fline.IndexOf("]", SSPfldi);

                            string SPfieldName = fline.Substring(SSPfldi+4, FSPfldi- SSPfldi - 4);

                            //template.Append(SPfieldName + "
");

                            if (!string.IsNullOrEmpty(SPfieldName))
                            {
                                //string FieldValue = getStructuredData(SPfieldName);
                               
                                object obj = null;

                               try {
                                    obj = getStructuredData(SPfieldName); }
                                catch { obj = "SharePoint Field: " + SPfieldName + " Not Found
"
; }

                                if (obj != null)
                                {
                                    string FieldValue = obj.ToString();

                                    //template.Append(SPfieldName + " = " + FieldValue + "
");

                                    fline = fline.Replace("[sp:" + SPfieldName + "]", FieldValue);
                                }
                            }
                           
                            if (FSPfldi > fline.Length)
                                break;

                            SSPfldi = fline.ToUpper().IndexOf("[SP:", FSPfldi);


                        }//End of while (SSPfldi > -1)



                        //Handle EPiServer Fields
                        int FEPifldi = 0;

                        int SEPifldi = fline.IndexOf("[es:", FEPifldi);

                        while (SEPifldi > -1)
                        {
                            FEPifldi = fline.IndexOf("]", SEPifldi);

                            string EPifieldName = fline.Substring(SEPifldi + 4, FEPifldi - SEPifldi - 4);

                            //template.Append(EPifieldName + "
");

                            if (!string.IsNullOrEmpty(EPifieldName))
                            {
                                //string FieldValue = getStructuredData(SPfieldName);

                                object obj = null;

                                try
                                {
                                    obj = CurrentPage[EPifieldName].ToString();
                                }
                                catch { obj = "EPiServer Field: " + EPifieldName + " Not Found
"
; }

                                if (obj != null)
                                {
                                   string FieldValue = obj.ToString();

                                    //template.Append(EPifieldName + " = " + FieldValue + "
");

                                    fline = fline.Replace("[es:" + EPifieldName + "]", FieldValue);
                                }
                            }

                            if (FEPifldi > fline.Length)
                                break;

                            SEPifldi = fline.ToUpper().IndexOf("[ES:", FEPifldi);


                        }//End of while (SEPifldi > -1)

                        //Add modified line to output
                        template.Append(fline);
                    }
                }


               

                //Response.Write(template);

            }
            catch (Exception ex)
            {
                template.Append(ex.Message);
                template.Append(ex.StackTrace);
            }



Dic
14

iPacemaker with Arduino

arduino, Biomedical, Electronics, gallery, gsm, Healthcare, HTML, iPacemaker, Java, project, Web, wifi, wireless Commenti disabilitati su iPacemaker with Arduino 

When we say “there are no limit for  Arduino”, here we have a project,  sent by [ladvine] in wich Arduino meets biomedic tech. The WiFi shield is the real application when they speak about Arduino. There is a long paper about it on this [website] that I suggest to visit to understand more this important project.

iPacemaker is an reprogrammable implant pacemaker with wireless connectivity.
A user friendly embedded web interface helps in changing every parameters of the implantable pacemaker. The important feature is the WiFi alliance complaint hardware which supports every wireless device to establish connection with the IMD. GSM connectivity can be used in absence of WiFi in remote areas helping in Telemetry.
Wireless protection in case of WiFi is enabled through WPA2 security with AES Encryption and Java Web interface which has inherent security capabilities. Shielding the GSM and WiFi antennas helps reduce unwanted patient radiations.



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook