Profiles

Forums

Calendar

Everything posted by yyrkoon

Everything still works fine with the latest version of code::blocks, and the first version of energia on Windows 10 x64 pro. In fact, the launchpad is recognized straight out of the box, without installing drivers. That is, at least for the purpose of flashing binaries to the launchpad.
IN fact I've just flashed three TSSOP-20 parts, using the launchpad using a ZIP socket adapter + 20 pin TSSOP to DIP socket adapter.

This how-to is primarily for Windows users. However, paths aside most of this information should be applicable for Linux users as well. Technically, this should also work with OSX. You will need Energia, and Code::Blocks. Plus a bit of time. In this how-to I will walk through setting up a toolchain for use with Code::Blocks, and when done showing how we can use the created project as a user defined template for future projects. Added Videos to youtube to help clarify some things I found confusing myself in this how to.
and
First things first, we need to setup a directory where Code::Blocks expect to find the MSP430 toolchain. This is optional, but highly recommended as it will be less hassle to set everything up. So . . . 1) Create directory C:\hightec 2) Navigate to \hardware\tools and copy the msp430 directory to C:\hightec\ 3) Install code::blocks if not already installed. First time it is run the MSP430 toolchain should be detected. 4) create a new project. -> select empty project. -> Click the go button. 5) Name the project. the name is unimportant, but needed. First time code::blocks is run, you will have to tell it which directory projects are created in. click the next button. 6) On this page, select "GNU GCC compiler for MSP430" from the compiler dropdown box, then select the finish button. code::blocks will complain, giving ~3 message boxes saying it does not how to setup various settings for the compiler. 7) From the menu bar Select settings -> compiler. 8) At the top again we need to select the compiler from the dropdown box. select "GNU GCC compiler for MSP430" 9) Click the toolchain tab. below this should be yet another tab "Program files". Here the toolchain should already be autodetected. However. . . Compiler: -> msp430-gcc.exe C++ compiler: -> msp430-g++.exe linker for dynamic libs: -> msp430-gcc.exe linker for static libs: -> msp430-gcc.exe Make program: -> make.exe ( keep in mind Energia uses it's own build system, and has no make) 10) Change to the Addtional paths tab. add -> C:hightec\msp430\msp430\include 11) Change to the Compiler settings main tab -> other options tab -> add -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 12) Switch to the linker settings tab -> in the other linker options text box add -> -Os -Wl,-gc-sections,-u,main -mmcu=msp430g2553 13) Click the ok button on the bottom. 14) From the menubar select project -> properties -> build targets. Uncheck the auto-generate filename extension. In the Output filename field change the output file name extension to elf. 15) Click ok to save and exit the dialog. 16) From the menubar select file -> new -> file C/C++ file -> go -> next -> Filename with full path: click the ... button, name the file -> click ok -> Select the All button -> and finally the finish button. Add . . .
#include int main(){ return 0;}
to main.c/cpp and save. 17) From the menubar select build -> build. Output should be similar to . . .
-------------- Build: Debug in msp430 (compiler: GNU GCC Compiler for MSP430)---------------msp430-g++.exe -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -IC:\HighTec\Msp430\msp430\include -c main.cpp -o obj\Debug\main.omsp430-gcc.exe -LC:\HighTec\Msp430\msp430\lib\ldscripts\msp430g2553 -o bin\Debug\msp430.elf obj\Debug\main.o -Os -Wl,-gc-sections,-u,main -mmcu=msp430g2553 Output size is 6.44 KBProcess terminated with status 0 (0 minutes, 0 seconds)0 errors, 0 warnings (0 minutes, 0 seconds)
18) From the menubar select file -> save project as template name the template and click ok. Now, when you create a new project... File -> New -> Project -> On the left select user templates. Violoa ! Pretty sure mspdebug can be used in conjunction with this as well. However I am done with this for today, and will leave that for the next time.

So, I've been trying to help out for IDK maybe 5 years now on the beagleboard.org google groups. And,I see all kinds of stupid things. Just tonight, I'm trying to help out someone who obviously could not <insert explicitive > with out a link on instructions how to do so . . .
So, I answer this person, tell him he needs to be more verbose in the explanation of his problem, then proceed to tell him what I think the problem is. This goes on for a few posts . . . Robert Nelson comes on, says the same exact thing I say, but gives this idiot an exact link to something the guy should have already known . . . suddenly, it's fsck all to me and thank you very much Robert Nelson sir . . .
Make me want to go out and help people spitting on me in the street . . . Yeah, sarcasm definitely.
EDIT:
Yeah I probably should have mentioned the point, My point is that, is it just me, or did young people get drastically less . . .intelligent ? Sure seems that way from where I'm sitting. Not only that, if you do not give a link to something, for this younger generation. It seems they can not figure things out on their own. Let along come up with an original idea, or at minimum, any idea that was not handed to them by someone else . . .

As do I appreciate anyone who tries to help me too.
So, when I go to try something I've never done, I usually won't ask anyone for help per se. Usually I'll look for example code, and become familiar with how, and perhaps why it works. After that, because virtually no one writes code to my own "standards", I'll write something completely from scratch, as the shortest possible example I can think of. For myself to refresh my memory later on down the road if I ever need to. Because honestly, I do not retain hardware specific information in my head. Only some semblance Of the programming languages I use. But writing myself functioning, and concise example code, shows me exactly what I need to do, to achieve a certain goal, and then I know of several "mechanisms" (API's perhaps )to further that goal. Even if I have to look up a function prototype or two, to remember exactly how they work.
Maybe I'm just one of those "odd ones out" ?
EDIT:
By the way when I say "virtually no one writes code to my standards . . ." I'm talking about style, and not ability.

Anyone here have hands on with this board ? https://store.ti.com/CC1350STKUS-Simplelink-CC1350-SensorTag-Bluetooth-and-Sub-1GHz-Long-Range-Wireless-Development-Kit-P50807.aspx?HQS=ecm-tistore-promo-diyweek17-null-lp-null-wwe
So what has me intrigued is that there is bluetooth, and sub ghz radios on this both. So I'm kind of thinking "remote control" of some object on our property here from a cell phone with bluetooth of course. One thing I'm not sure of is, I can not just use two of these connected together thru subGhz, or can I ? If so, what would be the better way to do so, assuming two of these connected together would not be the ideal situation ?
EDIT:
The reason why I ask is that I have zero hands on with these boards, and I would like to set myself up to be able to "play" at some point when I have nothing else going on in my life. The idea is as mentioned above. Having *something* remote on our property, e.g. a receiver that performs some task, or several small tasks. Then of course this, the transmitter.

So, this is partly for me, and partly for others who need a refresher, or just do not know how. But I will be making several post here over time on how to write very simply code, to do one thing, or another. These, used in conjunction with a shell script could be very useful / flexible. After several long talks with many people, including some here on these very forums. I've decided that using C, to communicate with hardware, or hardware interfaces is best as can be for many situations. However, when you need to run several tools all at once, and have output formatted in some fashion, or easily modified. Shell scripts are very good at that sort of thing.
Read from a real-time clock
This post I will make about reading from a real-time clock. I spent hours messing around code related to I2C communications, and could never get exactly what I wanted. Plus, I wanted something that output date / time that looked very similar to the date Linux command. This could definitely been done using a shell script, but code size would probably be a lot larger. Additionally, a shell script would very likely be a lot slower, as with a script, one would have to be calling external cmdline tools to perform various operations. This example code is very fast, and prints to screen immediately after issuing the command. Since this command is very simple, and only prints the formatted date / time to screen. This could very easily be called from a shell script, and formatted further if need be.
The real-time clock I'm using for this demonstration is a Maxim DS3232 real-time clock which is very accurate, and also very expensive compared to other real-time clocks. At $7 + US each, it's not cheap. I also had to write my own device tree overlay for this RTC, which strictly speaking is not necessary. One can set the device up from the command line manually as demonstrated for many different RTC's on the web. In fact, all the device tree overlay that I wrote does, is set all this automatically up at boot. As far as teh actual overlay it's self. All I did was modify an existing overlay from the "official" bb-overlays repo on github. https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-RTC-01-00A0.dts
To look something like this:
/*
* Copyright (C) 2015 Robert Nelson <robertcnelson@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/board/am335x-bbw-bbb-base.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>
/ {
compatible = "ti,beaglebone", "ti,beaglebone-black", "ti,beaglebone-green";
/* identification */
part-number = "BB-RTC-01";
version = "00A0";
fragment@2 {
target = <&i2c2>;
__overlay__ {
status = "okay";
/* shut up DTC warnings */
#address-cells = <1>;
#size-cells = <0>;
/* MCP79410 RTC module */
rtc@68 {
compatible = "maxim,ds3232";
reg = <0x68>;
};
};
};
};
On our cape, the RTC is on bus I2C-2, which is already enabled by default for capemgr. The rest of the above just means that status is okay(load the device ), the kernel module to load is called "ds3232", and the device address on the bus is 0x68.
Now on to the actual C code for reading from /dev/rtc1:
#include <stdio.h>
#include <stdlib.h>
#include <linux/rtc.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
void display_date_time(void)
{
struct rtc_time rtc_tm;
int fd = open("/dev/rtc1", O_RDONLY);
if(fd == -1){
perror("/dev/rtc");
exit(errno);
}
/* Read the RTC time/date */
int retval = ioctl(fd, RTC_RD_TIME, &rtc_tm);
if (retval == -1) {
perror("ioctl");
exit(errno);
}
int d = rtc_tm.tm_mday;
int m = rtc_tm.tm_mon + 1;
int y = rtc_tm.tm_year + 1900;
const char *wdays[] = {"Sun","Mon","Tues","Wed","Thur","Fri","Sat"};
const char *mnths[] = {"Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"};
int wday = (d += m < 3 ? y-- : y - 2, 23*m/9 + d + 4 + y/4- y/100 + y/400)%7;
fprintf(stdout, "%s %s %02d %02d:%02d:%02d %d UTC\n",
wdays[wday], mnths[rtc_tm.tm_mon], rtc_tm.tm_mday,
rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec, y);
}
int main( int argc, char **argv )
{
display_date_time();
return 0;
}
As one can see, most of this code is for formatting the output in a specific way. In this case, the output will look exactly like the output one might expect to see after issuing the command "date". However, this output is fixed to output the date / time in the UTC time zone. As for one of the projects I'm using this in is for devices spread out all over the US, in 3 different time zones, and we do not care so much what the local time zone of that system so much, as much as knowing a given time "standard". e.g. if something fails, and we need to tell a customer what failed, and what time it failed, we can, Then if we need to convert that time to their time zone, easy.
Notice that the read() is handled by ioctl(). . .
Output:
root@wgd:~/# gcc -Wall -o read_rtc read_rtc.c
root@wgd:~/# ./read_rtc
Tues May 09 23:08:49 2017 UTC

I added a couple pictures here: https://plus.google.com/u/0/106867156582775247949 with a short explanation of each. It's much easier for me to just make post on my google+ page and then link back here.
I am intentionally going slow with my project here. I want to make sure it all works out good. As it is, I will need to trim the aliminum tray part I ordered precut, to the mini ITX motherboard standard. After that, I'll also have to take measurements of the board, and mark mounting holes. Also from the mini ITX motherboard standard.
EDIT:
For those of you who also may be interested in the mini ITX specification: http://www.formfactors.org/developer/specs/mini_itx_spec_v1_1.pdf
The PDF also covers the mATX, and ATX standards if I'm not mistaken.

@NurseBob So you've show interest in this through another post. Instead of polluting that post, I figured I would respond here. Where to start. . . My idea here started because I work remotely for a company who builds systems based off the beaglebone. Soon, I plan on traveling, which is not a problem when you work remotely, but you may still need to bring hardware with you to write, and test software while you're on the go . . . I looked all over the place for reasonably priced aluminum enclosures. They really do not exist. Then it dawned on me that there are plenty of mini ITX cases on the market, why not look into that . . .
My idea in a nutshell:
1 Mini ITX case
1 ODROID XU4
1 Beaglebone
Random capes
1 1TB hard drive or larger
1 USB 3.0 to SATA adapter
1 5 port ethernet switch
1 10A 5v power supply to power everything
miscellaneous M3 mounting hardware
pre-cut aluminum for motherboard tray, PSU hole cover, I/O plate cover
miscellaneous panel mount adapters.
So, some of this is not completely thought out yet. For example, finding a network switch that is power via 5v input could prove to be hard, or impossible to find, Usually ethernet adapters use a 48v power supply. At least that's been my experience. I have not looked in earnest yet. Then, just having looked, I notice the USB adapter I bought takes 12v input . . .
These I have already ordered and are on the way, or are already here:
USB 3.0 -> SATA adapter: https://www.amazon.com/gp/product/B005B3VO24/ref=oh_aui_detailpage_o01_s01?ie=UTF8&psc=1
Mini ITX case:https://www.amazon.com/gp/product/B00F2RRE1E/ref=oh_aui_detailpage_o06_s00?ie=UTF8&psc=1
Miscelaneous M3 mounting hardware is already here, or on the way, the aluminum will probably be here tomorrow. Then I have no made up my mind on which hard drive ill buy, but I have a spare here now, and a Samsung 850 Pro SSD( I may use both ). 5 port switch, and power supply are up in the air. Then all the panel mount stuff will probably come from Adafruit. Not ordered yet.
So, I've had the Xu4 for better than a month now. Maybe even two. But I have not powered it up yet, because I've had this idea rattling around in the back of my head for a few months . . .
It should not be long before I start building this system. The purpose of this system when complete, is to serve as an ABI compatible development platform. Meaning the beaglebone and XU4 are, or can be made ABI compatible. Which means no need for a cross compiler, period. The XU4 will then take on compile duties, as well as acting as a support system for all beaglebone projects in the future. The entails code storage, as well as NFS, and Samba duties. So code can be accessed from any local network machine( OS agnostic ).

How to read an ADC
So this bit may seem a little odd to some. Hell I know the hardware, and wrote this really quick snippet as a demonstration, and I think it's odd. The short story here. Is that we have a pin multiplexer on AIN6, and this multiplexer selects an external channel based on a bit pattern sent to it through 3 GPIO pins. That code I won't be showing in this post. but I wanted to point out why I have an odd "mvolts" value. Which indicates maximum input voltage before the voltage limiting resistor network. e.g. the on board ADC pins can only handle 1.8v absolute maximum voltage, and I'm pretty sure without all circuitry voltage drop, outside maximum voltage is supposed to be 0-10v, and wulf probably designed the voltage into the ADC it's self to be less than 1.5v . . . So I started with 10v in mind, saw the reading was definitely too high, and then played a guessing game until the voltage I read from a volt meter, matched what I was reading through the ADC. So there is definite resolution loss here . . .
Anyway, the best and easiest way to load drivers for the ADC is to load the stock ADC overlay from /lib/firmware/.
root@wgd:~# ls /lib/firmware/ |grep ADC
BB-ADC-00A0.dtbo
That is the file to load. Which can be loaded through capemgr via the command line manually, or from /boot/uEnv.txt at boot.
ADC C code:
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
const char *ain6 = "/sys/bus/iio/devices/iio:device0/in_voltage6_raw";
int main()
{
int fd;
int len;
char adc[5] = {0};
float madc = 4095.0f;
float mvolts = 7.7f;
float bvolts = (mvolts / madc);
fd = open(ain6, O_RDONLY);
if(fd == -1){
perror("ain6");
exit(1);
}
len = read(fd, adc, sizeof(adc - 1));
int adc_val = strtol(adc, NULL, 10);
float voltage = adc_val * bvolts;
printf("%f \n", voltage);
close(fd);
return 0;
}
Output:
root@wgd:~# gcc -Wall -o adc adc.c
adc.c: In function 'main':
adc.c:14:6: warning: variable 'len' set but not used [-Wunused-but-set-variable]
int len;
^
root@wgd:~# ./adc
0.030085
A couple things to notice here. First is the warning I'm getting back from the compiler. This is because I'm using the -Wall option, which pretty much tells the compiler to use strict reporting of warnings. It is my belief that one should always at least use the -Wall compiler flag. Then we should treat these warning as if they're errors, and correct them. Which( and yeah I hate explanations like this too ) I'm ignoring for this one situation. Basically "len" is a return value from read() which can let us know how many bytes were read out of the file, and we absolutely should test this value for a non negative number. Then act on negative numbers as an error, which could be done a few different ways. For this demo, I was not sure in a pinch what would be a better way to handle that potential error. Mostly because I know these values will always be 0-4095, unless there is a problem with the hardware. At which point we're done anyhow( probably a blown processor ). One way to deal with this kind of error, would be to use perror() followed by exit(errno) in an if block. But at this point I'm fairly confident the system would not be running anyway . . .However, the values coming out of the ADC module should always be 1-4 characters, so how do we test for no characters ? NULL, but if we're reading out a NULL, how did our code make it thus far anyhow ? Additionally, if we're reading more than 4 character . . .Not only do I believe this to be impossible because of the way I wrote this code, but if it were somehow possible. We'd have a buffer overrun. Which may be a very good idea to test for. If for nothing else, good practice ? You decide.
Secondly, the really low, but not absolute zero value. Well, I've come to realize that when working with circuits of this nature, that can not tied to ground, or pulled high. You're basically "floating" but close to a low, or a high . . . again, I'm not exactly an EE, so maybe someone who cares to can elaborate further. But I always think of this sort of situation as induced parasitic voltages from the circuitry. I'm definitely all ears if someone has a better explanation, or insight into this. . .But I've tested these readings against a volt meter, and am reasonably happy that I'm "close enough" for my own purposes. Someday, perhaps I'll buy a USB computer style Oscilloscope, in hopes to enlighten myself further..

Read from a DS18B20 temperature sensor
Again, very simple code to read from a device, and put that read information out to stdout. In this case, reading from a 1-wire DS18B20 sensor. The pin used is unimportant, so long as that pin is configurable as gpio, and is not already in use by another device. 1-wire is one of the simpler sensors to connect to a beaglebone, and can be plugged directly into one of the two headers on the beaglebone using jumper wires. You need power(3v3), ground, and a gpio pin connected. See the DS18B20 datasheet to determine which pin on the sensor is used for what purpose. As for setup in Linux for this sensor. You can search the web for a guide as to how to do this manually from the cmdline, or you can use a device tree overlay. I used this overlay file as a template, then modified the pin information to reflect the pin I needed to use. https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-W1-P9.12-00A0.dts
C code:
#include <stdio.h>
#include <dirent.h>
#include <string.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
int read_DS18B20(void)
{
DIR *dir;
struct dirent *dirent;
char dev[16];
char devPath[128];
char buf[80];
char tmpData[6];
char path[] = "/sys/bus/w1/devices";
ssize_t nread;
dir = opendir(path);
if(dir == NULL){
perror("/sys/bus/w1/devices");
exit(errno);
}
while((dirent = readdir(dir))){
if (dirent->d_type == DT_LNK && strstr(dirent->d_name, "28-") != NULL){
strcpy(dev, dirent->d_name);
}
}
(void)closedir(dir);
sprintf(devPath, "%s/%s/w1_slave", path, dev);
int fd = open(devPath, O_RDONLY);
if (fd == -1){
perror ("/sys/bus/w1/devices/28-*/w1_slave");
exit(errno);
}
long tempC = 0;
nread = read(fd, buf, 80);
if(nread > 0){
strncpy(tmpData, strstr(buf, "t=") + 2, 5);
tempC = strtol(tmpData, NULL, 10);
}
close(fd);
return tempC;
}
int main (void)
{
float temp = read_DS18B20() * (1 / 1000.0);
printf("Temp: %.3f C \n", temp);
return 0;
}
Output:
root@wgd:~/# gcc -Wall -o read_ds18b20 read_ds18b20.c
root@wgd:~/# ./read_ds18b20
Temp: 25.312 C

So, almost everything I need is here. There only thing I'm missing is the non conductive M3 standoff washer( dont know what else to call them ), and the actual 1/4" screws that screw into the standoffs. Just playing around today, I took the main board tray piece of aluminum I have precut, and marked out the screw holes to mount it to the case frame. How I did this was cut a piece of cardboard exactly the same size as the piece of aluminum I had cut, put it into the case, pressed down on the cardboard until I got indentations form the mounting standoffs. Then I drill out the center of these indentations, and scribed onto aluminum with a fine point sharpie. I was not very happy with this result.
So something I was thinking about the other day, and wulf reminded me of today, was to go find the standard for mini itx boards, and get the measurments from that. Gee, why didn't I think of that, which I did, just forgot . . .but i did find this: http://www.formfactors.org/developer/specs/mini_itx_spec_v1_1.pdf
Perfect, so all I need now is daylight, and a bit of time. Then I'll revisit / re-approach this problem and get busy. I did take a few pictures, but they're still on the phone, and I CBF'd right now to upload them Perhaps later.

Yeah after watching this video on gitlab: https://www.youtube.com/watch?v=PoBaY_rqeKA
I've concluded for now, it's a bit more complex than I want. Granted . . . git it's self is fairly complex too, but gitlab would be something else I had to read up on, and keep up with, when all I really want is to feel all warm and fuzzy about my data being there when I need it. I may even think about making my backup strategy even simplier than what I'm currently think it should be now. May even forgo git all together, and just use rsync in conjunction with dd or tar. For 3 layers of redundancy. But I do liek the idea of versioning . . . a lot.

It sounds interesting. Having a web based GUI could be useful, if that's what it is. Quite honestly though, and do keep in mind im by far not a git guru. I prefer to use tools of this nature form the command line. Honestly, I find using the tools much quicker from the command line. and this way keeps me in touch with how the tool is used. So if someday I wish to script something up, it should be trivial. Which is something else I've been doing a lot of. Which also lends a lot to readability for anyone who knows their way around a Linux system. So when working with others, like for me at work, I designed a complete monitoring system for production boards that anyone at work can read, and understand fairly quickly Even the boss, who is actually an old school embedded *NIX systems software developer.
Anyway, for me, I'm not doing a local backup through git right now. But I have invested a considerable amount of time reading about it over the last year or so. So it's just a matter of time before I follow through. Then like I mentioned in a previous post. I'll have a completely separate partition, and mostly like a completely separate disk that I mount only when making backups. and probably using something like dd, to make 1:1 copies, or perhaps just using tar. So mount -> backup -> umount. This for me, will be very robust, and about as bullet proof as I would care to get. However, the system doing backups, for me would require a UPS, and possibly may just be a laptop for the built in battery power in case of power failures. Which is partly why I have not followed through with this yet. I want everythign runable during a power failure, and I have not had any of the required circutry, and possibly code designed yet. A friend of mine however( not wulf ) have been talking seriously about a design for a while now. Something he'll design in hardware, and something I'll design in software, assuming software will ever be needed.

If someone loses data because their strategy is simplistic. Then they;'re not thinking how to do backup properly( not thinking the process through fully ), or they're doing something silly. You know the reflow oven wulf and I fiddled about with 5 is years ago ? I still have that code safely tucked away on a removable USB hard drive. My backup strategy ? About as simple as it gets. Manually copy files directly to my USB hard drive. Is it fool proof ? not by a long shot, but it works for me.
Now all my beaglebone embedded Linux code, sits on a dedicated server, that's actually an Asus eee-pc, with a broken screen. But . . .
william@eee-pc:~$ uptime
17:21:38 up 190 days, 22:13, 2 users, load average: 0.00, 0.01, 0.05
I'd say it's doing a pretty good job of what it's doing. Do I have a redundant copy of all my work ? In some cases, kind of, but not really. A lot of my important code is on a private git, on github. Now some of the other "important" stuff, is not redudant. But this code I classify as "important" is mostly experimental code, that I wrote while getting familiar with *something*. Be it CANBUS, sm_bus I2C stuff or whatever.
By the way, the reason why that server only has a 190 uptime, Is because I shut it down while I was on vacation for a month . . .Unplugged it from power, and the network while I was at it too( thunderstorms . . .)

This is where (possibly) git could come in handy, Lets say you need a specific file from a specific day for whatever reason. But anyhow, I personally, do not necessarily agree with the strategy you chose. But the point is here. we do not have to agree, because what you're getting is what *you* want. At minimum, what you think you want right now.
Still, I urge you to look at your process, and think about it objectively. Which I think is what Rick was also trying to do. Finding an outside corner case where your backup strategy would fail you for a specific case. But let's say it does not fail, and does end up copying 1000 iterations of the same file slightly modified . . . this also may be less than desirable if that outside corner case just makes 1000 copies of the same file, with a different time stamp. or whatever.
Really, what you need to think about is exactly what you want, and if your strategy is fulfilling what you want / need. For me, the difference between a file being saved when actual code differences have been made is a must, Meaning, I change a single line, I may want that change to stick and be persisted, For you, that may not be appropriate?
So, for me personally. I think a local git hub may be exactly what I want, but also having a redundant copy of that local git would be necessary. For you . . . it may be different. Have I beat this horse a bit too much ?

I wont stop, but I do not feel awesome I just know some stuff. I'm not looking for praise or anything like that. I just want people to start thinking in a way where they do not necessarily need to ask questions all the time. Meaning, yes, I ask questions too. I know a lot of things are possible, but I would just rather talk to, or ask someone whose had hands on experience about some things. A lot of times that makes me feel better about approaching a given situation. Anyway, I totally get that.
One thing everyone should probably know about my frame of mind last night is that I had just finished off a bottle of wine so . . . I was not drunk or anything, but I was not exactly sober either. Had a good buzz I guess you could say. Still, this type of situation does bother me. It's like if you do not lead the "sheep" exactly where you want them to be, they just eat, sleep and sh** all in the same spot. Except, we, do not exactly need to lead these sheep anywhere. because their problem, is not ours. So when yo utry and help them out, and they just spit back in your face. I think any normal person is going ot get pissed off, and rightly so.

It's really frustrating. Because I knew the answer to the question asked, and gave most of the answer already. I was just waiting to make sure the problem was as it seemed to be. For this, the person needed to give me some information, that should have already been provided . . .But since young people do not seen to know how to properly ask a question. It's all my fault.
Yes, yes, yes, I do not know how to properly ask a question myself sometimes. We're all guilty. But you know, I can usually find myself a way out of a wet paper sack . . . We all need help, we're all also not all knowing . . . we're people, and we're all flawed. Great. But at least when I take the time to help you out. Show some appreciation at least . . .

Wulf gave me a beast of a dell laptop power supply. It's a 12v 18A brick. Ill check it out at least. Then I ordered a couple of these: https://www.amazon.com/gp/product/B00J3MHTYG/ref=od_aui_detailpages00?ie=UTF8&psc=1
They're due to be here Wednesday, but other things still have a while.

So with the USB 3 adapter, and switch being the odd "man out" in power requirement. I think I've decided to forgo a network switch altogether, and just run ethenet panel mount adapters out through the back for both boards. Then, if I need a switch, I could do that externally. As for the USB 3.0 SATA adapter . . . Yeah not sure how to deal with that, The hard drive will only need 5v, but I've not idea what the USB converter will need for it's self :/ I may just use another adapter I have that powers from USB, and the XU4 should be able to handle that no problem.