Community RSS Feed
https://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag External Programs and Systems sorted by activeMicrocontrollerembedcode unable to connect to Arduino Yun
https://community.wolfram.com/groups/-/m/t/2166975
Hi Wolfram Community,
I was able to better pinpoint my problem area in the code that I am using and post it here in the notebook. I am trying to follow this tutorial
[Real-time data acquisition][1]
I have an Arduino Yun Rev2 hooked up exactly as it is from the reference. Everything seems to be connecting and resulting as it should be until I reach...
![One red light and one green light][2]
Which would indicate that I am missing something. I have the circuit hooked up exactly like the reference but Mathematica says
"MicrocontrollerEmbedCode::nopen: Could not open /dev/tty.usbmodem1411."
What does this mean and what can I try to remedy this? I am attempting to use this to model Simple Harmonic Motion with a spring mass system for a university presentation in April. Any insights or help would be greatly appreciated!
\[ScriptCapitalM] =
MicrocontrollerEmbedCode[sys, \[Mu]c,
"/dev/tty.usbmodem1411", <|"I2C" -> i2cspecs,
"Libraries" -> bridgeLib, "CompileOptions" -> {Automatic, "-w"}|>]
&[Wolfram Notebook][3]
[1]: https://reference.wolfram.com/language/MicrocontrollerKit/workflow/RealTimeDataAcquisition
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Problemwithcode.jpg&userId=2158933
[3]: https://www.wolframcloud.com/obj/081889c1-f458-4db3-9493-68e4ecfb6c2aJennifer Rittenhouse2021-01-18T22:15:46ZSimple DateListPlot not displaying anything
https://community.wolfram.com/groups/-/m/t/2155273
For a website I administer, I'm using Google Analytics API to pull the information I'm interested in, and want to do a little processing in WL. This includes want to do a simple plot of some data.
google = ServiceConnect["GoogleAnalytics"]
sessionsperdate = google["ReportData", {"ProfileID" -> xxxxxxx,
"Dimensions" -> "Date",
"Metrics" -> "Sessions",
"StartDate" -> "October 1, 2020",
"EndDate" -> "December 31, 2020",
MaxItems -> 1000, "StartIndex" -> 1,
"SamplingLevel" -> "HigherPrecision"
}];
This code returns a two column dataset, the first is Date (as a DateObject), the second is number of Sessions (an Integer, with values ranging from 1 to 100). Just for grins I want to see a plot of the sessions across all 92 days. So, I enter
DateListPlot[sessionsperdate]
What I get, for what I was expecting to be a no brainer, no frills plot, was an empty plot, with the x-axis ranging from 23:59:59 to 00:00:01 instead of dates of each day in the list, and the y-axis ranging from -1.0 to 1.0 instead of integers between 1 and 100.
I've tried several unsuccessful machinations, such as
sessionsperdate // Normal // Values
to get a list of pairs, which is then fed into DateListPlot.
Clearly I'm not understanding even the most basic of the WL. What do I need to do get this to work?Lawrence Winkler2021-01-05T17:39:43ZUse WSTPServer as a kernel of notebook front end in 12.2?
https://community.wolfram.com/groups/-/m/t/2165469
In the blog https://writings.stephenwolfram.com/2020/12/launching-version-12-2-of-wolfram-language-mathematica-228-new-functions-and-much-more/, I find the following idea.
It’s now possible to use WSTPServer to set up a centralized kernel pool to which you can connect the notebook front end, allowing you, for example, to keep running a particular session (or even a particular computation) in the kernel even as you **switch to a different notebook** front end, on a different computer.
In front end I can use the traditional method add a kernel to work by set MLOpen to "-LinkMode Listen ....".
The following codes also work. But I do not know how to set the WSTPServerKernels as default to run sequential codes. I want to use WSTPServerKernels as a kernel of the front end.
CloseKernels[];
Kernels[]
$MachineName
Needs["SubKernels`WSTPServerKernels`"]
LaunchKernels["wstp://192.168.1.202", 2]
Parallelize@Table[$MachineName, {i, 1, 10}]
The output is OK.
I have tried set MLOpen to "-linkmode connect -linkname 31415@192.168.1.4 -linkprotocol TCPIP -linkoptions 4" and shell command as " ssh xix@192.168.3.202 "wolfram" -wstp -LinkMode Connect -LinkProtocol TCPIP -LinkName "`linkname`" -LinkHost 192.168.1.202" .
I run "./wstpserver -l 3 -i 192.168.1.202" in the side of wstpserver.
In front end, I run the code "1+1"。 The output of wstpserver as following and the title of front end is always says "(Running...)"
WSTPServer: Logger (2, 2021-01-17 19:59:36): Debug:
An expression on the kernel link:
* with an ID of "845a-9b23-0aac",
* and bridged with the connection with an ID of "2abd-5fd2-6122"
- is ready
WSTPServer: Logger (2, 2021-01-17 19:59:36): WSTP:
ReturnPacket [
EnterExpressionPacket [
HoldComplete [
Plus [1 , 1 ]]]]
WSTPServer: Logger (2, 2021-01-17 19:59:36): Debug:
An expression was transferred from a kernel to a connection
The output of wstpserver is so ugly.xiehongye2021-01-17T12:05:56ZDrawing a chess position from FEN
https://community.wolfram.com/groups/-/m/t/2164714
I'm sure there have been many proposals on how to do this. I gave it a try, and after a few painful attempts I came up with a visually decent result, without too much code (IMHO). Also I really wanted to use unicode symbols, not drawing of pieces found on the web.
&[chess.nb][1]
TODO:
- Avoid using a hard-coded font size ;
- White pieces should not look "transparent" on a dark square.
[1]: https://www.wolframcloud.com/obj/71555ba7-132e-4569-913e-fa3e69184a85Lucien Grondin2021-01-16T13:12:04ZCUDA not working on Mathematica 12.2
https://community.wolfram.com/groups/-/m/t/2141352
hello all :)
CUDA is not working on 12.2.
Look at this:
What I am supposed to do ?
I also tried by downloading the CUDA pcklets: change nothing.
I have an NVIDIA RTX 3090 and the drivers are ok.
Thank you foe helping me.
Regards to all,
Jean-MichelJean-Michel Collard2020-12-18T02:04:15ZName of the standard LateX font in Mathematica
https://community.wolfram.com/groups/-/m/t/2164751
Hello everyone,
I am a Mathematica 12.2 user.
I would like to integrate Mathematica plots in documents that are created with LateX.
Therefore I am looking for a command that allows me to create titles and axes labels that have the same appearance as standard LateX output.
To give an example:
In Matlab there is the command <"interpreter","Latex"> that takes Latex syntax and produces LateX output. In the plot below this command was used to create the title and axes labels.![enter image description here][1]
If no such command exist it would be very helpful to know the name that is used in mathematica for the Latex default font. I only know it as computer modern and could not find a font with that name in Mathematica.
I am also thankful for other ideas on how to integrate Mathematica plots smoothly in Latex documents
I apologize if this question is answered in the documentation, but I did not find an answer there.
Thanks in advance.
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Beispiel_e_epsilonPunkt.png&userId=2164733wolfram user2021-01-16T14:06:56ZTD Ameritrade API
https://community.wolfram.com/groups/-/m/t/2114927
Does anyone have experience developing a wrapper or client in Mathematica for interfacing with an asynchronous REST API that also requires token authentication? In particular, I want to communicate with the TD Ameritrade API which would allow for the reception of real time streaming financial data of every sort and also execute trades. I'd like to use Mathematica for real time analysis of the incoming data. I have looked at the Wolfram documentation on external API's but there are not any real world examples only lists of functions which is of no help at all.Kerry Litvin2020-11-14T09:23:16Z