MicroView and Phoenard Arduino Forum
Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
GreatAnubis

Avatar / Picture

Junior Member
Registered:
Posts: 6
Reply with quote  #1 
I'm the author of this instructable I've created some time ago. I'm posting it just in case you've not seen it [smile]

http://www.instructables.com/id/MicroView-CPU-Usage-Temp-Monitor/


regards
MLXXXp

Avatar / Picture

Senior Member
Registered:
Posts: 75
Reply with quote  #2 
GreatAnubis,

Now that you know how to rotate the display 180 degrees, so that you can plug the MicroView into a USB port on the left side, I suggest you alter your sketch so that you control the rotation from the PC. This way you can use the same sketch in the MicoView for both right and left handed ports.

The program running on the PC would then set the display orientation. I'm sure you could figure out how to make this a user configurable setting.

Currently, your sketch is looking for the letter "S" to indicate the start of the data string. You could use different letters, such as "R" for rotate and "N" for normal, to set the display rotation. The new readSerial() function in your sketch would be something like:
// retrieves data from serial port
void readSerial() // this is where the input from the serial port is initially processed
{
    char command;

    if (Serial.available())
    {
        // search for a command
        command = Serial.read();

        if(command == 'S')
        {
            // 4xcpu + 1 temp
            for(int i = 0;i<5;i++)
            {
                String val = Serial.readStringUntil(32);
                widget[i]->setValue(validate(val.toInt()));
            }
            uView.display();
        }
        else if(command == 'R')
        {
            // rotate the display 180 degrees for a left side USB port
            uView.flipHorizontal(true);
            uView.flipVertical(true);
        }
        else if(command == 'N')
        {
            // set the display to normal for a right side USB port
            uView.flipHorizontal(false);
            uView.flipVertical(false);
        }
    }
}

Also, remove the flip function calls from setup()

If the PC program sends nothing or an "N" then the display will be normal, for a right hand port. If the PC sends an "R" then the display will rotate 180 degrees, for a left hand port. You would only have to send one of these commands once, or whenever you want to change the display orietation.
GreatAnubis

Avatar / Picture

Junior Member
Registered:
Posts: 6
Reply with quote  #3 
ha, you're right [smile] Now it's possible to control the display from the PC it's connected to [smile]
I'm going to rewrite that anyways, but.. yeah.. thanks for the idea. I'll use it for sure. 
JolynLaub

Junior Member
Registered:
Posts: 1
Reply with quote  #4 
I want to know something about which you implemented on your CPU. How did you achieve it i mean did you use any special hardware?
If hardware was there then which type of the hardware you used here and what is the specification of it?
I mean is it a board or any other type of the MCU?
Also if you achieved it using the firmware only then what is that firmware?

assembly and pcb
GreatAnubis

Avatar / Picture

Junior Member
Registered:
Posts: 6
Reply with quote  #5 
I do not fully understand what you're really asking for. There's no special hardware used at all. Just MicroView connected to my PC with USB. All the job that left is done by the software:
CPU/Memory usage data is provided by the Core Temp's server. Software run on the PC connects to that server and listens for the data provided by the server. That data are 'converted' to the understandable by MucroView format. That's all magic here. 


( [CORE TEMP SERVER] ===> [PC SOFTWARE] ) ===[USB]===> [MicroView]

[Blue part is run on the PC]
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!